Ability to access the drive from any pad

pull/1/head
yflory 8 years ago
parent b0fb56fa63
commit 91299f5f30

@ -13,6 +13,7 @@ define(function () {
out.type.code = 'Code';
out.type.poll = 'Sondage';
out.type.slide = 'Présentation';
out.type.drive = 'Drive';
out.errorBox_errorType_disconnected = 'Connexion perdue';
out.errorBox_errorExplanation_disconnected = [
@ -82,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.newPadButton = 'Nouveau';
out.newPadButtonTitle = 'Créer un nouveau document';
out.appsButton = 'Apps';
out.appsButtonTitle = 'Accéder aux autres applications';
out.presentButton = 'PRÉSENTER';
out.presentButtonTitle = "Entrer en mode présentation";

@ -14,6 +14,7 @@ define(function () {
out.type.code = 'Code';
out.type.poll = 'Poll';
out.type.slide = 'Presentation';
out.type.drive = 'Drive';
out.errorBox_errorType_disconnected = 'Connection Lost';
out.errorBox_errorExplanation_disconnected = [
@ -87,8 +88,8 @@ define(function () {
out.shareSuccess = 'Copied URL to clipboard';
out.shareFailed = "Failed to copy URL to clipboard";
out.newPadButton = 'New';
out.newPadButtonTitle = 'Create a new document';
out.appsButton = 'Apps';
out.appsButtonTitle = 'Access other applications';
out.presentButton = 'PRESENT';
out.presentButtonTitle = "Enter presentation mode";

@ -349,24 +349,24 @@ define([
if (config.displayed.indexOf('newpad') !== -1) {
var pads_options = [];
['pad', 'code', 'slide', 'poll'].forEach(function (p) {
['drive', 'pad', 'code', 'slide', 'poll'].forEach(function (p) {
pads_options.push({
tag: 'a',
attributes: {
'target': '_blank', // TODO: open in the same window?
'target': '_blank',
'href': '/' + p,
},
content: Messages.type[p] // Pretty name of the language value
content: Messages.type[p]
});
});
var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-plus'})).append(Messages.newPadButton);
var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-th-large'})).append(Messages.appsButton);
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.newPadButtonTitle);
$newPadBlock.find('button').attr('title', Messages.appsButtonTitle);
$newPadBlock.appendTo($userContainer);
}

Loading…
Cancel
Save