Hide pad creation screen features if it is disabled in app config
This commit is contained in:
parent
b01d00f74a
commit
db0d2e161c
@ -803,7 +803,7 @@ define(function () {
|
|||||||
// Properties about creation data
|
// Properties about creation data
|
||||||
out.creation_owners = "Propriétaires";
|
out.creation_owners = "Propriétaires";
|
||||||
out.creation_ownedByOther = "Possédé par un autre utilisateur";
|
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_expiration = "Date d'expiration";
|
||||||
out.creation_propertiesTitle = "Disponibilité";
|
out.creation_propertiesTitle = "Disponibilité";
|
||||||
out.creation_appMenuName = "Mode avancé (Ctrl + E)";
|
out.creation_appMenuName = "Mode avancé (Ctrl + E)";
|
||||||
|
|||||||
@ -933,6 +933,7 @@ define([
|
|||||||
content: $('<div>').append(UI.getIcon(p)).html() + Messages.type[p]
|
content: $('<div>').append(UI.getIcon(p)).html() + Messages.type[p]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (Config.displayCreationScreen) {
|
||||||
pads_options.push({
|
pads_options.push({
|
||||||
tag: 'a',
|
tag: 'a',
|
||||||
attributes: {
|
attributes: {
|
||||||
@ -941,6 +942,12 @@ define([
|
|||||||
},
|
},
|
||||||
content: '<span class="fa fa-plus-circle"></span> ' + Messages.creation_appMenuName
|
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 = {
|
var dropdownConfig = {
|
||||||
text: '', // Button initial text
|
text: '', // Button initial text
|
||||||
options: pads_options, // Entries displayed in the menu
|
options: pads_options, // Entries displayed in the menu
|
||||||
|
|||||||
@ -9,6 +9,7 @@ define([
|
|||||||
'/common/common-hash.js',
|
'/common/common-hash.js',
|
||||||
'/customize/messages.js',
|
'/customize/messages.js',
|
||||||
'/common/hyperscript.js',
|
'/common/hyperscript.js',
|
||||||
|
'/customize/application_config.js',
|
||||||
|
|
||||||
'/bower_components/file-saver/FileSaver.min.js',
|
'/bower_components/file-saver/FileSaver.min.js',
|
||||||
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||||
@ -24,7 +25,8 @@ define([
|
|||||||
Util,
|
Util,
|
||||||
Hash,
|
Hash,
|
||||||
Messages,
|
Messages,
|
||||||
h
|
h,
|
||||||
|
AppConfig
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var saveAs = window.saveAs;
|
var saveAs = window.saveAs;
|
||||||
@ -65,6 +67,10 @@ define([
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!AppConfig.dislayCreationScreen) {
|
||||||
|
delete categories.creation;
|
||||||
|
}
|
||||||
|
|
||||||
var create = {};
|
var create = {};
|
||||||
|
|
||||||
// Account settings
|
// Account settings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user