From 54a63267cd2dae49db636de4ea245a1c25018d0e Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 25 Oct 2016 18:34:23 +0200 Subject: [PATCH] Add a share button and merge the viewers and editors buttons --- customize.dist/src/toolbar.less | 10 ++-- customize.dist/toolbar.css | 10 ++-- www/code/main.js | 4 +- www/common/toolbar.js | 100 ++++++++++++++++++-------------- www/pad/main.js | 4 +- www/slide/main.js | 4 +- 6 files changed, 73 insertions(+), 59 deletions(-) diff --git a/customize.dist/src/toolbar.less b/customize.dist/src/toolbar.less index ab517124f..b997ca9e9 100644 --- a/customize.dist/src/toolbar.less +++ b/customize.dist/src/toolbar.less @@ -33,9 +33,9 @@ color: #000; } &.cryptpad-lag { - float: right; + float: left; line-height: 26px; - margin: 2px 0px 2px 4px; + margin: 2px 0px; } } @@ -203,6 +203,9 @@ .cryptpad-toolbar-leftside { float: left; margin-bottom: -1px; + .cryptpad-user-list { + float: right; + } .cryptpad-dropdown-container { position: relative; display: inline-block; @@ -255,7 +258,6 @@ } .cryptpad-toolbar-rightside { text-align: right; - margin-right: 30px; //float: right; } .cryptpad-spinner { @@ -267,7 +269,7 @@ font-size: 20px; } .cryptpad-readonly { - margin-right: 20px; + margin-right: 5px; font-weight: bold; text-transform: uppercase; } diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 39b060844..4f441169b 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -33,9 +33,9 @@ color: #000; } .cryptpad-toolbar div.cryptpad-lag { - float: right; + float: left; line-height: 26px; - margin: 2px 0px 2px 4px; + margin: 2px 0px; } .cryptpad-toolbar button, .cryptpad-toolbar select, @@ -210,6 +210,9 @@ float: left; margin-bottom: -1px; } +.cryptpad-toolbar-leftside .cryptpad-user-list { + float: right; +} .cryptpad-toolbar-leftside .cryptpad-dropdown-container { position: relative; display: inline-block; @@ -261,7 +264,6 @@ } .cryptpad-toolbar-rightside { text-align: right; - margin-right: 30px; } .cryptpad-spinner { float: left; @@ -272,7 +274,7 @@ font-size: 20px; } .cryptpad-readonly { - margin-right: 20px; + margin-right: 5px; font-weight: bold; text-transform: uppercase; } diff --git a/www/code/main.js b/www/code/main.js index f2db83352..0483c1bf6 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -405,8 +405,8 @@ define([ $rightside.append($import); /* add a rename button */ - var $setTitle = Cryptpad.createButton('rename', true, {suggestName: suggestName}, renameCb); - $rightside.append($setTitle); + //var $setTitle = Cryptpad.createButton('rename', true, {suggestName: suggestName}, renameCb); + //$rightside.append($setTitle); } /* add a forget button */ diff --git a/www/common/toolbar.js b/www/common/toolbar.js index e342a9241..26ade0842 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -52,6 +52,7 @@ define([ var $style; var firstConnection = true; + var lagErrors = 0; var styleToolbar = function ($container, href) { href = href || '/customize/toolbar.css'; @@ -108,29 +109,31 @@ define([ 'class': 'userlist dropbtn edit', }); var $editIconSmall = $editIcon.clone().addClass('small'); - var $viewIcon = $('