clean up api for Cryptpad.confirm
This commit is contained in:
@@ -285,7 +285,7 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
UI.confirm = function (msg, cb, opt, force, styleCB) {
|
UI.confirm = function (msg, cb, opt, force) {
|
||||||
cb = cb || function () {};
|
cb = cb || function () {};
|
||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
|
|
||||||
@@ -328,8 +328,8 @@ define([
|
|||||||
document.body.appendChild(frame);
|
document.body.appendChild(frame);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
UI.notify();
|
UI.notify();
|
||||||
if (typeof(styleCB) === 'function') {
|
if (typeof(opt.done) === 'function') {
|
||||||
styleCB($ok.closest('.dialog'));
|
opt.done($ok.closest('.dialog'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -217,9 +217,10 @@ define([
|
|||||||
cancelClass: 'safe',
|
cancelClass: 'safe',
|
||||||
okClass: 'danger',
|
okClass: 'danger',
|
||||||
reverseOrder: true,
|
reverseOrder: true,
|
||||||
}, true, function ($dialog) {
|
done: function ($dialog) {
|
||||||
$dialog.find('> div').addClass('half');
|
$dialog.find('> div').addClass('half');
|
||||||
});
|
},
|
||||||
|
}, true);
|
||||||
}, 150);
|
}, 150);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user