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.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";

@ -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";

@ -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 = $('<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 = {
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({

Loading…
Cancel
Save