CoreFiles by mySites.guru
widget.js40 lines, 1,306 bytes, from Joomla_4.2.1-Stable-Full_Package.zip
Raw History Compare with 4.2.0
md5
b86034ede67da5f5a88da4e08725fb2d
sha1
5d2c0549420655dd3899069dafe95d8131d07092
sha256
08503ace2b1a625f463e3028376f00fc1ea2c400663337ca7b715670ce346d4a
(function($) {

    var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');

    /**
     * Widget for the displaying mails data
     *
     * Options:
     *  - data
     */
    var MailsWidget = PhpDebugBar.Widgets.MailsWidget = PhpDebugBar.Widget.extend({

        className: csscls('mails'),

        render: function() {
            this.$list = new  PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, mail) {
                $('<span />').addClass(csscls('subject')).text(mail.subject).appendTo(li);
                $('<span />').addClass(csscls('to')).text(mail.to).appendTo(li);
                if (mail.headers) {
                    var headers = $('<pre />').addClass(csscls('headers')).appendTo(li);
                    $('<code />').text(mail.headers).appendTo(headers);
                    li.click(function() {
                        if (headers.is(':visible')) {
                            headers.hide();
                        } else {
                            headers.show();
                        }
                    });
                }
            }});
            this.$list.$el.appendTo(this.$el);

            this.bindAttr('data', function(data) {
                this.$list.set('data', data);
            });
        }

    });

})(PhpDebugBar.$);

The same content is in 161 releases, Joomla 4.0.0-alpha5 to 5.1.0-alpha4. See them all, or every version of this file.