From ad82a275bc5578d39fd8b80043ec2b431ca0bb55 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 6 Feb 2017 11:39:04 +0100 Subject: [PATCH] Replace the Apps button by a New button again --- customize.dist/translations/messages.fr.js | 4 ++-- customize.dist/translations/messages.js | 4 ++-- www/common/toolbar.js | 13 +++++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 31c45a4ca..dd646bc5d 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -83,8 +83,8 @@ define(function () { out.shareSuccess = 'URL copiée dans le presse-papiers'; out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers"; - out.appsButton = 'Apps'; - out.appsButtonTitle = 'Accéder aux autres applications'; + out.newButton = 'Nouveau'; + out.newButtonTitle = 'Créer un nouveau document'; out.presentButton = 'PRÉSENTER'; out.presentButtonTitle = "Entrer en mode présentation"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index ec377939a..cfdfde7d4 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -88,8 +88,8 @@ define(function () { out.shareSuccess = 'Copied URL to clipboard'; out.shareFailed = "Failed to copy URL to clipboard"; - out.appsButton = 'Apps'; - out.appsButtonTitle = 'Access other applications'; + out.newButton = 'New'; + out.newButtonTitle = 'Create a new document'; out.presentButton = 'PRESENT'; out.presentButtonTitle = "Enter presentation mode"; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 0cd4ac938..1c7003747 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -352,6 +352,7 @@ define([ if (config.displayed.indexOf('newpad') !== -1) { var pads_options = []; Config.availablePadTypes.forEach(function (p) { + if (p === 'drive') { return; } pads_options.push({ tag: 'a', attributes: { @@ -361,14 +362,14 @@ define([ content: Messages.type[p] }); }); - var $newButton = $('
').append($('', {'class': 'fa fa-th-large'})).append(Messages.appsButton); + var $newButton = $('
').append($('', {'class': 'fa fa-plus'})).append(Messages.newButton); var dropdownConfig = { text: $newButton.html(), // Button initial text options: pads_options, // Entries displayed in the menu left: true, // Open to the left of the button }; var $newPadBlock = Cryptpad.createDropdown(dropdownConfig); - $newPadBlock.find('button').attr('title', Messages.appsButtonTitle); + $newPadBlock.find('button').attr('title', Messages.newButtonTitle); $newPadBlock.appendTo($userContainer); } @@ -407,6 +408,14 @@ define([ content: Messages.user_rename }); } + options.push({ + tag: 'a', + attributes: { + 'target': '_blank', + 'href': '/drive/' + }, + content: Messages.login_accessDrive + }); // Add login or logout button depending on the current status if (account) { options.push({