|
|
@ -1092,29 +1092,30 @@ define([
|
|
|
|
return e;
|
|
|
|
return e;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
UIElements.createHelpMenu = function (common, categories) {
|
|
|
|
UIElements.createHelpMenu = function (common /*, categories */) {
|
|
|
|
var type = common.getMetadataMgr().getMetadata().type || 'pad';
|
|
|
|
var type = common.getMetadataMgr().getMetadata().type || 'pad';
|
|
|
|
|
|
|
|
|
|
|
|
var elements = [];
|
|
|
|
|
|
|
|
if (Messages.help && Messages.help.generic) {
|
|
|
|
var apps = {
|
|
|
|
Object.keys(Messages.help.generic).forEach(function (el) {
|
|
|
|
pad: 'richtext',
|
|
|
|
elements.push(setHTML(h('li'), Messages.help.generic[el]));
|
|
|
|
code: 'code',
|
|
|
|
});
|
|
|
|
slide: 'slides',
|
|
|
|
}
|
|
|
|
sheet: 'sheets',
|
|
|
|
if (categories) {
|
|
|
|
poll: 'poll',
|
|
|
|
categories.forEach(function (cat) {
|
|
|
|
kanban: 'kanban',
|
|
|
|
var msgs = Messages.help[cat];
|
|
|
|
whiteboard: 'whiteboard',
|
|
|
|
if (msgs) {
|
|
|
|
};
|
|
|
|
Object.keys(msgs).forEach(function (el) {
|
|
|
|
|
|
|
|
elements.push(setHTML(h('li'), msgs[el]));
|
|
|
|
var href = "https://docs.cryptpad.fr/en/user_guide/applications.html";
|
|
|
|
});
|
|
|
|
if (apps[type]) {
|
|
|
|
}
|
|
|
|
href = "https://docs.cryptpad.fr/en/user_guide/apps/" + apps[type] + ".html";
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var content = setHTML(h('p'), Messages.help.generic.more);
|
|
|
|
|
|
|
|
$(content).find('a').attr('href', href);
|
|
|
|
|
|
|
|
|
|
|
|
var text = h('p.cp-help-text', [
|
|
|
|
var text = h('p.cp-help-text', [
|
|
|
|
h('h1', Messages.help.title),
|
|
|
|
content
|
|
|
|
h('ul', elements)
|
|
|
|
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
common.fixLinks(text);
|
|
|
|
common.fixLinks(text);
|
|
|
|