Replace the Apps button by a New button again

pull/1/head
yflory 8 years ago
parent fd33ffd56f
commit ad82a275bc

@ -83,8 +83,8 @@ define(function () {
out.shareSuccess = 'URL copiée dans le presse-papiers'; out.shareSuccess = 'URL copiée dans le presse-papiers';
out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers"; out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers";
out.appsButton = 'Apps'; out.newButton = 'Nouveau';
out.appsButtonTitle = 'Accéder aux autres applications'; out.newButtonTitle = 'Créer un nouveau document';
out.presentButton = 'PRÉSENTER'; out.presentButton = 'PRÉSENTER';
out.presentButtonTitle = "Entrer en mode présentation"; out.presentButtonTitle = "Entrer en mode présentation";

@ -88,8 +88,8 @@ define(function () {
out.shareSuccess = 'Copied URL to clipboard'; out.shareSuccess = 'Copied URL to clipboard';
out.shareFailed = "Failed to copy URL to clipboard"; out.shareFailed = "Failed to copy URL to clipboard";
out.appsButton = 'Apps'; out.newButton = 'New';
out.appsButtonTitle = 'Access other applications'; out.newButtonTitle = 'Create a new document';
out.presentButton = 'PRESENT'; out.presentButton = 'PRESENT';
out.presentButtonTitle = "Enter presentation mode"; out.presentButtonTitle = "Enter presentation mode";

@ -352,6 +352,7 @@ define([
if (config.displayed.indexOf('newpad') !== -1) { if (config.displayed.indexOf('newpad') !== -1) {
var pads_options = []; var pads_options = [];
Config.availablePadTypes.forEach(function (p) { Config.availablePadTypes.forEach(function (p) {
if (p === 'drive') { return; }
pads_options.push({ pads_options.push({
tag: 'a', tag: 'a',
attributes: { attributes: {
@ -361,14 +362,14 @@ define([
content: Messages.type[p] content: Messages.type[p]
}); });
}); });
var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-th-large'})).append(Messages.appsButton); var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-plus'})).append(Messages.newButton);
var dropdownConfig = { var dropdownConfig = {
text: $newButton.html(), // Button initial text text: $newButton.html(), // Button initial text
options: pads_options, // Entries displayed in the menu options: pads_options, // Entries displayed in the menu
left: true, // Open to the left of the button left: true, // Open to the left of the button
}; };
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig); var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
$newPadBlock.find('button').attr('title', Messages.appsButtonTitle); $newPadBlock.find('button').attr('title', Messages.newButtonTitle);
$newPadBlock.appendTo($userContainer); $newPadBlock.appendTo($userContainer);
} }
@ -407,6 +408,14 @@ define([
content: Messages.user_rename 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 // Add login or logout button depending on the current status
if (account) { if (account) {
options.push({ options.push({

Loading…
Cancel
Save