Fix the new userlist button and make the toolbar responsive

This commit is contained in:
yflory
2016-10-13 14:24:44 +02:00
parent 24fbe22c9d
commit 39bbf8a6c1
18 changed files with 221 additions and 105 deletions

View File

@@ -21,7 +21,7 @@
}
#iframe-container {
position: fixed;
top: 2.5em;
top: 2.6em;
bottom: 0px;
right: 0px;
left: 0px;

View File

@@ -47,6 +47,12 @@
.CodeMirror {
height: 100%;
}
.cryptpad-toolbar {
padding: 0px 6px;
}
#cme_toolbox div.cryptpad-lag {
line-height: 24px;
}
#cme_toolbox {
font: 12px Arial,Helvetica,Tahoma,Verdana,sans-serif;
background: -webkit-linear-gradient(#EEEEEE, #DADADA); /* For Safari 5.1 to 6.0 */

View File

@@ -303,7 +303,8 @@ define([
toolbarList = info.userList;
var config = {
userData: userList,
readOnly: readOnly
readOnly: readOnly,
ifrw: ifrw
};
if (readOnly) {delete config.changeNameID; }
toolbar = module.toolbar = Toolbar.create($bar, info.myID, info.realtime, info.getLag, info.userList, config);
@@ -326,7 +327,7 @@ define([
setName (newName);
};
var $username = Cryptpad.createButton('username', false, {lastName: lastName}, usernameCb);
$userBlock.append($username);
$userBlock.append($username).hide();
});
/* add an export button */
@@ -357,16 +358,13 @@ define([
$rightside.append($forgetPad);
if (!readOnly) {
var $links = Cryptpad.createButton('editshare', false, {editHash: editHash});
$editShare.append($links);
$editShare.append(Cryptpad.createButton('editshare', false, {editHash: editHash}));
}
if (viewHash) {
/* add a 'links' button */
var $links = Cryptpad.createButton('viewshare', false, {viewHash: viewHash + '/present'});
$viewShare.append($links);
$viewShare.append(Cryptpad.createButton('viewshare', false, {viewHash: viewHash}));
if (!readOnly) {
var $links = Cryptpad.createButton('viewopen', false, {viewHash: viewHash + '/present'});
$viewShare.append($links);
$viewShare.append(Cryptpad.createButton('viewopen', false, {viewHash: viewHash}));
}
}
@@ -377,6 +375,7 @@ define([
var $language = module.$language = $('<select>', {
title: 'syntax highlighting',
id: 'language-mode',
'class': 'rightside-element'
}).on('change', function () {
setMode($language.val());
onLocal();
@@ -401,6 +400,7 @@ define([
var $themeDropdown = $('<select>', {
title: 'color theme',
id: 'display-theme',
'class': 'rightside-element'
});
Themes.forEach(function (o) {
$themeDropdown.append($('<option>', {