From: Alexander Ebert Date: Wed, 20 Jun 2012 17:56:47 +0000 (+0200) Subject: Improved System.Notification to provide custom HTML X-Git-Tag: 2.0.0_Beta_1~1062 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73b84427856b24c791cedda6c15ce32df87b70aa;p=GitHub%2FWoltLab%2FWCF.git Improved System.Notification to provide custom HTML --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index baad301f16..4a412e6607 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4256,8 +4256,9 @@ WCF.System.Confirmation = { * @param string message * @param object callback * @param object parameters + * @param jQuery template */ - show: function(message, callback, parameters) { + show: function(message, callback, parameters, template) { if (this._visible) { console.debug('[WCF.System.Confirmation] Confirmation dialog is already open, refusing action.'); return; @@ -4274,6 +4275,11 @@ WCF.System.Confirmation = { this._createDialog(); } + this._dialog.find('#wcfSystemConfirmationContent').empty().hide(); + if (template && template.length) { + template.appendTo(this._dialog.find('#wcfSystemConfirmationContent').show()); + } + this._dialog.find('p').html(message); this._dialog.wcfDialog({ onClose: $.proxy(this._close, this), @@ -4288,7 +4294,7 @@ WCF.System.Confirmation = { * Creates the confirmation dialog on first use. */ _createDialog: function() { - this._dialog = $('

').hide().appendTo(document.body); + this._dialog = $('

').hide().appendTo(document.body); var $formButtons = $('
').appendTo(this._dialog); $('').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons);