diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 6f0177bc0..ffd6684ca 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -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; diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index fb297eae7..de9558909 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -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; } diff --git a/www/code/main.js b/www/code/main.js index be2c49969..f7ae95cb9 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -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, diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 190b05508..625568a24 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1308,6 +1308,8 @@ define([ } Messages._initSelector($block); + + return $block; }; var createUserAdminMenu = common.createUserAdminMenu = function (config) { diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 297a4d857..c455467c5 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -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); } diff --git a/www/drive/file.css b/www/drive/file.css index c2fa83b65..cd9f856e1 100644 --- a/www/drive/file.css +++ b/www/drive/file.css @@ -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; diff --git a/www/drive/file.less b/www/drive/file.less index 251400ef0..42bfc94ed 100644 --- a/www/drive/file.less +++ b/www/drive/file.less @@ -434,7 +434,7 @@ span { } } &.new { - padding: 0 20px; + padding: 0 5px; } } /* The container
- needed to position the dropdown content */ diff --git a/www/drive/main.js b/www/drive/main.js index d1b381cd7..479b9daab 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -1061,8 +1061,11 @@ define([ content: Messages.type[type] }); }); + var $plusIcon = $('
').append($('', {'class': 'fa fa-plus'})); + + var dropdownConfig = { - text: Messages.fm_newButton, + text: $plusIcon.html() + Messages.fm_newButton, options: options }; var $block = Cryptpad.createDropdown(dropdownConfig); @@ -2122,7 +2125,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, diff --git a/www/pad/main.js b/www/pad/main.js index a5a135082..df854fd04 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -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, diff --git a/www/poll/main.js b/www/poll/main.js index 95b540edf..10d441f08 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -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: { diff --git a/www/settings/main.js b/www/settings/main.js index a158225fc..a8cf81480 100644 --- a/www/settings/main.js +++ b/www/settings/main.js @@ -240,10 +240,20 @@ define([ return $div; }; + var createLanguageSelector = function () { + var $div = $('
', {'class': 'importLocalPads'}); + var $label = $('