Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -237,6 +237,7 @@ define([
|
||||
setTimeout(function () {
|
||||
$ok.focus();
|
||||
UI.notify();
|
||||
if (!document.hasFocus()) { window.focus(); }
|
||||
});
|
||||
};
|
||||
|
||||
@@ -282,10 +283,11 @@ define([
|
||||
setTimeout(function () {
|
||||
input.select().focus();
|
||||
UI.notify();
|
||||
if (!document.hasFocus()) { window.focus(); }
|
||||
});
|
||||
};
|
||||
|
||||
UI.confirm = function (msg, cb, opt, force, styleCB) {
|
||||
UI.confirm = function (msg, cb, opt, force) {
|
||||
cb = cb || function () {};
|
||||
opt = opt || {};
|
||||
|
||||
@@ -328,9 +330,10 @@ 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'));
|
||||
}
|
||||
if (!document.hasFocus()) { window.focus(); }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -490,7 +490,10 @@ define([
|
||||
|
||||
sframeChan.query("Q_TEMPLATE_EXIST", type, function (err, data) {
|
||||
if (data) {
|
||||
Cryptpad.confirm(Messages.useTemplate, onConfirm);
|
||||
Cryptpad.confirm(Messages.useTemplate, onConfirm, {
|
||||
ok: Messages.useTemplateOK,
|
||||
cancel: Messages.useTemplateCancel,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ define(['jquery'], function ($) {
|
||||
|
||||
exp.updateTitle = function (newTitle, cb) {
|
||||
cb = cb || $.noop;
|
||||
if (newTitle === exp.title) { return; }
|
||||
if (newTitle === exp.title) { return void cb(); }
|
||||
metadataMgr.updateTitle(newTitle);
|
||||
titleUpdated = cb;
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user