Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
a74915ab58
@ -131,7 +131,9 @@ define(function () {
|
|||||||
out.saveTemplatePrompt = "Choose a title for the template";
|
out.saveTemplatePrompt = "Choose a title for the template";
|
||||||
out.templateSaved = "Template saved!";
|
out.templateSaved = "Template saved!";
|
||||||
out.selectTemplate = "Select a template or press escape";
|
out.selectTemplate = "Select a template or press escape";
|
||||||
out.useTemplate = "You have available templates for that type of pad. Do you want to use one?";
|
out.useTemplate = "Start with a template?"; //Would you like to "You have available templates for this type of pad. Do you want to use one?";
|
||||||
|
out.useTemplateOK = 'Pick a template (Enter)';
|
||||||
|
out.useTemplateCancel = 'Start fresh (Esc)';
|
||||||
|
|
||||||
out.previewButtonTitle = "Display or hide the Markdown preview mode";
|
out.previewButtonTitle = "Display or hide the Markdown preview mode";
|
||||||
|
|
||||||
|
|||||||
@ -237,6 +237,7 @@ define([
|
|||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$ok.focus();
|
$ok.focus();
|
||||||
UI.notify();
|
UI.notify();
|
||||||
|
if (!document.hasFocus()) { window.focus(); }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -282,10 +283,11 @@ define([
|
|||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
input.select().focus();
|
input.select().focus();
|
||||||
UI.notify();
|
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 () {};
|
cb = cb || function () {};
|
||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
|
|
||||||
@ -328,9 +330,10 @@ 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'));
|
||||||
}
|
}
|
||||||
|
if (!document.hasFocus()) { window.focus(); }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -490,7 +490,10 @@ define([
|
|||||||
|
|
||||||
sframeChan.query("Q_TEMPLATE_EXIST", type, function (err, data) {
|
sframeChan.query("Q_TEMPLATE_EXIST", type, function (err, data) {
|
||||||
if (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) {
|
exp.updateTitle = function (newTitle, cb) {
|
||||||
cb = cb || $.noop;
|
cb = cb || $.noop;
|
||||||
if (newTitle === exp.title) { return; }
|
if (newTitle === exp.title) { return void cb(); }
|
||||||
metadataMgr.updateTitle(newTitle);
|
metadataMgr.updateTitle(newTitle);
|
||||||
titleUpdated = cb;
|
titleUpdated = cb;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user