Hide pad creation screen features if it is disabled in app config
parent
b01d00f74a
commit
db0d2e161c
|
@ -803,7 +803,7 @@ define(function () {
|
|||
// Properties about creation data
|
||||
out.creation_owners = "Propriétaires";
|
||||
out.creation_ownedByOther = "Possédé par un autre utilisateur";
|
||||
out.creation_noOwner = "Pad de propriétaire";
|
||||
out.creation_noOwner = "Pas de propriétaire";
|
||||
out.creation_expiration = "Date d'expiration";
|
||||
out.creation_propertiesTitle = "Disponibilité";
|
||||
out.creation_appMenuName = "Mode avancé (Ctrl + E)";
|
||||
|
|
|
@ -933,14 +933,21 @@ define([
|
|||
content: $('<div>').append(UI.getIcon(p)).html() + Messages.type[p]
|
||||
});
|
||||
});
|
||||
pads_options.push({
|
||||
tag: 'a',
|
||||
attributes: {
|
||||
id: 'cp-app-toolbar-creation-advanced',
|
||||
href: origin
|
||||
},
|
||||
content: '<span class="fa fa-plus-circle"></span> ' + Messages.creation_appMenuName
|
||||
});
|
||||
if (Config.displayCreationScreen) {
|
||||
pads_options.push({
|
||||
tag: 'a',
|
||||
attributes: {
|
||||
id: 'cp-app-toolbar-creation-advanced',
|
||||
href: origin
|
||||
},
|
||||
content: '<span class="fa fa-plus-circle"></span> ' + Messages.creation_appMenuName
|
||||
});
|
||||
$(window).keydown(function (e) {
|
||||
if (e.which === 69 && e.ctrlKey) {
|
||||
Common.createNewPadModal();
|
||||
}
|
||||
});
|
||||
}
|
||||
var dropdownConfig = {
|
||||
text: '', // Button initial text
|
||||
options: pads_options, // Entries displayed in the menu
|
||||
|
|
|
@ -9,6 +9,7 @@ define([
|
|||
'/common/common-hash.js',
|
||||
'/customize/messages.js',
|
||||
'/common/hyperscript.js',
|
||||
'/customize/application_config.js',
|
||||
|
||||
'/bower_components/file-saver/FileSaver.min.js',
|
||||
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
|
@ -24,7 +25,8 @@ define([
|
|||
Util,
|
||||
Hash,
|
||||
Messages,
|
||||
h
|
||||
h,
|
||||
AppConfig
|
||||
)
|
||||
{
|
||||
var saveAs = window.saveAs;
|
||||
|
@ -65,6 +67,10 @@ define([
|
|||
]
|
||||
};
|
||||
|
||||
if (!AppConfig.dislayCreationScreen) {
|
||||
delete categories.creation;
|
||||
}
|
||||
|
||||
var create = {};
|
||||
|
||||
// Account settings
|
||||
|
|
Loading…
Reference in New Issue