clean up api for Cryptpad.confirm

This commit is contained in:
ansuz 2017-09-11 16:24:43 +02:00
parent 37dca9c155
commit 1943c83f69
2 changed files with 7 additions and 6 deletions

View File

@ -285,7 +285,7 @@ define([
});
};
UI.confirm = function (msg, cb, opt, force, styleCB) {
UI.confirm = function (msg, cb, opt, force) {
cb = cb || function () {};
opt = opt || {};
@ -328,8 +328,8 @@ define([
document.body.appendChild(frame);
setTimeout(function () {
UI.notify();
if (typeof(styleCB) === 'function') {
styleCB($ok.closest('.dialog'));
if (typeof(opt.done) === 'function') {
opt.done($ok.closest('.dialog'));
}
});
};

View File

@ -217,9 +217,10 @@ define([
cancelClass: 'safe',
okClass: 'danger',
reverseOrder: true,
}, true, function ($dialog) {
$dialog.find('> div').addClass('half');
});
done: function ($dialog) {
$dialog.find('> div').addClass('half');
},
}, true);
}, 150);
});