From 413d9a6f0bf8d0bfb48780a574ee2eda35a87b5b Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 14 Mar 2017 12:01:42 +0100 Subject: [PATCH] add a style-callback to confirm --- www/common/cryptpad-common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index f4f2fe0af..3cdb1c906 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1499,7 +1499,7 @@ define([ }); }; - common.confirm = function (msg, cb, opt, force) { + common.confirm = function (msg, cb, opt, force, styleCB) { opt = opt || {}; cb = cb || function () {}; if (force !== true) { msg = fixHTML(msg); } @@ -1529,6 +1529,9 @@ define([ if (opt.reverseOrder) { $ok.insertBefore($ok.prev()); } + if (typeof(styleCB) === 'function') { + styleCB($ok.closest('.dialog')); + } }, 0); };