primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,12 @@
@charset "UTF-8";
div.phpdebugbar-widgets-mails span.phpdebugbar-widgets-subject {
display: block;
}
div.phpdebugbar-widgets-mails li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-headers {
border: 1px solid #ddd;
margin: 10px;
padding: 5px;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
display: none;
}

View File

@ -0,0 +1,63 @@
(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.body || mail.html) {
var header = $('<span />').addClass(csscls('filename')).text('');
$('<a title="Mail Preview">View Mail</a>').on('click', function () {
var popup = window.open('about:blank', 'Mail Preview', 'width=650,height=440,scrollbars=yes');
var documentToWriteTo = popup.document;
var headers = !mail.headers ? '' : $('<pre style="border: 1px solid #ddd; padding: 5px;" />')
.append($('<code />').text(mail.headers));
var body = $('<pre style="border: 1px solid #ddd; padding: 5px;" />').text(mail.body)
var html = null;
if (mail.html) {
body = $('<details />').append($('<summary>Text version</summary>')).append(body);
html = $('<iframe width="100%" height="400px" sandbox="" referrerpolicy="no-referrer"/>').attr("srcdoc", mail.html)
}
documentToWriteTo.open();
documentToWriteTo.write(headers.prop('outerHTML') + body.prop('outerHTML') + (html ? html.prop('outerHTML') : ''));
documentToWriteTo.close();
}).addClass(csscls('editor-link')).appendTo(header);
header.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.$);

View File

@ -0,0 +1 @@
@charset "UTF-8";div.phpdebugbar-widgets-mails span.phpdebugbar-widgets-subject{display:block}div.phpdebugbar-widgets-mails li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-headers{border:1px solid #ddd;margin:10px;padding:5px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;display:none}

Binary file not shown.

View File

@ -0,0 +1 @@
(function(e){var s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-"),c=PhpDebugBar.Widgets.MailsWidget=PhpDebugBar.Widget.extend({className:s("mails"),render:function(){this.$list=new PhpDebugBar.Widgets.ListWidget({itemRenderer:function(d,t){if(e("<span />").addClass(s("subject")).text(t.subject).appendTo(d),e("<span />").addClass(s("to")).text(t.to).appendTo(d),t.body||t.html){var o=e("<span />").addClass(s("filename")).text("");e('<a title="Mail Preview">View Mail</a>').on("click",function(){var n=window.open("about:blank","Mail Preview","width=650,height=440,scrollbars=yes"),r=n.document,l=t.headers?e('<pre style="border: 1px solid #ddd; padding: 5px;" />').append(e("<code />").text(t.headers)):"",p=e('<pre style="border: 1px solid #ddd; padding: 5px;" />').text(t.body),i=null;t.html&&(p=e("<details />").append(e("<summary>Text version</summary>")).append(p),i=e('<iframe width="100%" height="400px" sandbox="" referrerpolicy="no-referrer"/>').attr("srcdoc",t.html)),r.open(),r.write(l.prop("outerHTML")+p.prop("outerHTML")+(i?i.prop("outerHTML"):"")),r.close()}).addClass(s("editor-link")).appendTo(o),o.appendTo(d)}if(t.headers){var a=e("<pre />").addClass(s("headers")).appendTo(d);e("<code />").text(t.headers).appendTo(a),d.click(function(){a.is(":visible")?a.hide():a.show()})}}}),this.$list.$el.appendTo(this.$el),this.bindAttr("data",function(d){this.$list.set("data",d)})}})})(PhpDebugBar.$);

Binary file not shown.