Remove tag and filepicker buttons for anon users
This commit is contained in:
parent
c18d4297e1
commit
d666e9e7ee
@ -156,7 +156,7 @@ define(function () {
|
|||||||
|
|
||||||
out.filePickerButton = "Intégrer un fichier stocké dans CryptDrive";
|
out.filePickerButton = "Intégrer un fichier stocké dans CryptDrive";
|
||||||
out.filePicker_close = "Fermer";
|
out.filePicker_close = "Fermer";
|
||||||
out.filePicker_description = "Choisissez un fichier de votre CryptDrive pour l'intégrer ou uploadez-en un nouveau";
|
out.filePicker_description = "Choisissez un fichier de votre CryptDrive pour l'intégrer ou importez-en un nouveau";
|
||||||
out.filePicker_filter = "Filtrez les fichiers par leur nom";
|
out.filePicker_filter = "Filtrez les fichiers par leur nom";
|
||||||
out.or = 'ou';
|
out.or = 'ou';
|
||||||
|
|
||||||
|
|||||||
@ -342,6 +342,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var createFilePicker = function () {
|
var createFilePicker = function () {
|
||||||
|
if (!common.isLoggedIn()) { return; }
|
||||||
common.initFilePicker({
|
common.initFilePicker({
|
||||||
onSelect: function (data) {
|
onSelect: function (data) {
|
||||||
if (data.type !== 'file') {
|
if (data.type !== 'file') {
|
||||||
@ -369,6 +370,7 @@ define([
|
|||||||
}).appendTo(toolbar.$rightside).hide();
|
}).appendTo(toolbar.$rightside).hide();
|
||||||
};
|
};
|
||||||
var setMediaTagEmbedder = function (mte) {
|
var setMediaTagEmbedder = function (mte) {
|
||||||
|
if (!common.isLoggedIn()) { return; }
|
||||||
if (!mte || readOnly) {
|
if (!mte || readOnly) {
|
||||||
$embedButton.hide();
|
$embedButton.hide();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -2638,6 +2638,10 @@ define([
|
|||||||
APP.hideMenu();
|
APP.hideMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!APP.loggedIn) {
|
||||||
|
$defaultContextMenu.find('.cp-app-drive-context-delete').text(Messages.fc_remove)
|
||||||
|
.attr('data-icon', 'fa-eraser');
|
||||||
|
}
|
||||||
$defaultContextMenu.on("click", "a", function(e) {
|
$defaultContextMenu.on("click", "a", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var paths = $(this).data('paths');
|
var paths = $(this).data('paths');
|
||||||
|
|||||||
@ -1142,6 +1142,7 @@ define([
|
|||||||
APP.$publishButton = $publish;
|
APP.$publishButton = $publish;
|
||||||
updatePublishButton();
|
updatePublishButton();
|
||||||
|
|
||||||
|
if (common.isLoggedIn()) {
|
||||||
var fileDialogCfg = {
|
var fileDialogCfg = {
|
||||||
onSelect: function (data) {
|
onSelect: function (data) {
|
||||||
if (data.type === 'file' && APP.editor) {
|
if (data.type === 'file' && APP.editor) {
|
||||||
@ -1163,6 +1164,7 @@ define([
|
|||||||
};
|
};
|
||||||
common.openFilePicker(pickerCfg);
|
common.openFilePicker(pickerCfg);
|
||||||
}).appendTo($rightside);
|
}).appendTo($rightside);
|
||||||
|
}
|
||||||
|
|
||||||
var $tags = common.createButton('hashtag', true);
|
var $tags = common.createButton('hashtag', true);
|
||||||
$rightside.append($tags);
|
$rightside.append($tags);
|
||||||
|
|||||||
@ -470,6 +470,8 @@ define([
|
|||||||
.click(function () {
|
.click(function () {
|
||||||
$('<input>', {type:'file'}).on('change', onUpload).click();
|
$('<input>', {type:'file'}).on('change', onUpload).click();
|
||||||
}).appendTo($rightside);
|
}).appendTo($rightside);
|
||||||
|
|
||||||
|
if (common.isLoggedIn()) {
|
||||||
var fileDialogCfg = {
|
var fileDialogCfg = {
|
||||||
onSelect: function (data) {
|
onSelect: function (data) {
|
||||||
if (data.type === 'file') {
|
if (data.type === 'file') {
|
||||||
@ -501,6 +503,7 @@ define([
|
|||||||
common.openFilePicker(pickerCfg);
|
common.openFilePicker(pickerCfg);
|
||||||
}).appendTo($rightside);
|
}).appendTo($rightside);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
metadataMgr.onChange(function () {
|
metadataMgr.onChange(function () {
|
||||||
var md = metadataMgr.getMetadata();
|
var md = metadataMgr.getMetadata();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user