Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
ansuz 8 years ago
commit 5eb32b33ee

@ -56,6 +56,22 @@
margin-left: 5px;
}
}
&#newdoc {
// Bootstrap 4 colors
color: #fff;
background: #0275d8;
border-color: #0275d8;
&:hover {
background: #025aa5;
border: 1px solid #01549b;
}
span {
color: #fff;
}
.large {
margin-left: 5px;
}
}
&.hidden {
display: none;
}
@ -141,7 +157,6 @@
}
}
.big {
@media screen and (max-width: @media-not-big) {
display: none;

@ -132,6 +132,21 @@
.cryptpad-toolbar button#shareButton .large {
margin-left: 5px;
}
.cryptpad-toolbar button#newdoc {
color: #fff;
background: #0275d8;
border-color: #0275d8;
}
.cryptpad-toolbar button#newdoc:hover {
background: #025aa5;
border: 1px solid #01549b;
}
.cryptpad-toolbar button#newdoc span {
color: #fff;
}
.cryptpad-toolbar button#newdoc .large {
margin-left: 5px;
}
.cryptpad-toolbar button.hidden {
display: none;
}

@ -145,6 +145,7 @@ define(function () {
out.fm_filesDataName = "Tous les fichiers";
out.fm_templateName = "Modèles";
out.fm_newButton = "Nouveau";
out.fm_newButtonTitle = "Créer un nouveau pad ou un dossier";
out.fm_newFolder = "Nouveau dossier";
out.fm_newFile = "Nouveau pad";
out.fm_folder = "Dossier";

@ -147,6 +147,7 @@ define(function () {
out.fm_filesDataName = "All files";
out.fm_templateName = "Templates";
out.fm_newButton = "New";
out.fm_newButtonTitle = "Create a new pad or folder";
out.fm_newFolder = "New folder";
out.fm_newFile = "New pad";
out.fm_folder = "Folder";

@ -372,7 +372,7 @@ define([
userList = info.userList;
var config = {
displayed: ['useradmin', 'language', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
displayed: ['useradmin', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
userData: userData,
readOnly: readOnly,
ifrw: ifrw,

@ -1330,6 +1330,8 @@ define([
}
Messages._initSelector($block);
return $block;
};
var createUserAdminMenu = common.createUserAdminMenu = function (config) {

@ -432,11 +432,6 @@ define([
$userContainer.append($lag);
}
if (config.displayed.indexOf('language') !== -1) {
// Dropdown language selector
Cryptpad.createLanguageSelector($userContainer);
}
if (config.displayed.indexOf('newpad') !== -1) {
var pads_options = [];
Config.availablePadTypes.forEach(function (p) {
@ -460,6 +455,7 @@ define([
};
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
$newPadBlock.find('button').attr('title', Messages.newButtonTitle);
$newPadBlock.find('button').attr('id', 'newdoc');
$newPadBlock.appendTo($userContainer);
}

@ -379,7 +379,7 @@ span.fa-folder-open {
box-shadow: 0px 0px 2px #000;
}
#driveToolbar button.new {
padding: 0 20px;
padding: 0 5px;
}
#driveToolbar .dropdown-bar {
margin: 5px 5px;

@ -434,7 +434,7 @@ span {
}
}
&.new {
padding: 0 20px;
padding: 0 5px;
}
}
/* The container <div> - needed to position the dropdown content */

@ -1061,14 +1061,18 @@ define([
content: Messages.type[type]
});
});
var $plusIcon = $('<div>').append($('<span>', {'class': 'fa fa-plus'}));
var dropdownConfig = {
text: Messages.fm_newButton,
text: $plusIcon.html() + Messages.fm_newButton,
options: options
};
var $block = Cryptpad.createDropdown(dropdownConfig);
// Custom style:
$block.find('button').addClass('btn').addClass('btn-primary').addClass('new');
$block.find('button').attr('title', Messages.fm_newButtonTitle);
// Handlers
if (isInRoot) {
@ -2122,7 +2126,7 @@ define([
var userList = APP.userList = info.userList;
var config = {
displayed: ['useradmin', 'language', 'spinner', 'lag', 'state'],
displayed: ['useradmin', 'spinner', 'lag', 'state'],
readOnly: readOnly,
ifrw: window,
common: Cryptpad,

@ -567,7 +567,7 @@ define([
userList = info.userList;
var config = {
displayed: ['useradmin', 'language', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
displayed: ['useradmin', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
userData: userData,
readOnly: readOnly,
ifrw: ifrw,

@ -693,7 +693,7 @@ define([
userList = APP.userList = info.userList;
var config = {
displayed: ['useradmin', 'language', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
displayed: ['useradmin', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
userData: userData,
readOnly: readOnly,
share: {

@ -240,10 +240,20 @@ define([
return $div;
};
var createLanguageSelector = function () {
var $div = $('<div>', {'class': 'importLocalPads'});
var $label = $('<label>').text(Messages.language).appendTo($div);
$('<br>').appendTo($div);
var $b = Cryptpad.createLanguageSelector().appendTo($div);
$b.find('button').addClass('btn btn-secondary');
return $div;
};
var andThen = function (obj) {
APP.$container.append(createTitle());
APP.$container.append(createInfoBlock(obj));
APP.$container.append(createDisplayNameInput(obj));
APP.$container.append(createLanguageSelector());
APP.$container.append(createResetTips());
APP.$container.append(createBackupDrive(obj));
APP.$container.append(createImportLocalPads(obj));

@ -489,7 +489,7 @@ define([
userList = info.userList;
var config = {
displayed: ['useradmin', 'language', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
displayed: ['useradmin', 'spinner', 'lag', 'state', 'share', 'userlist', 'newpad'],
userData: userData,
readOnly: readOnly,
ifrw: ifrw,

Loading…
Cancel
Save