Toolbar improvements

This commit is contained in:
yflory
2017-06-30 11:42:54 +02:00
parent 5a3e9c785c
commit b9320e6005
11 changed files with 125 additions and 98 deletions

View File

@@ -942,9 +942,11 @@ define([
var size = "17px";
switch (type) {
case 'export':
var $text = $('<span>', {'class': 'drawer'}).text(Messages.exportButton);
button = $('<button>', {
'class': 'fa fa-download',
title: Messages.exportButtonTitle,
}).append($('<span>', {'class':'fa fa-download', style: 'font:'+size+' FontAwesome'}));
}).append($text);
button.click(prepareFeedback(type));
if (callback) {
@@ -952,9 +954,11 @@ define([
}
break;
case 'import':
var $text = $('<span>', {'class': 'drawer'}).text(Messages.importButton);
button = $('<button>', {
'class': 'fa fa-upload',
title: Messages.importButtonTitle,
}).append($('<span>', {'class':'fa fa-upload', style: 'font:'+size+' FontAwesome'}));
}).append($text);
if (callback) {
button
.click(prepareFeedback(type))
@@ -1104,10 +1108,11 @@ define([
button = $('<span>');
break;
}
var $text = $('<span>', {'class': 'drawer'}).text(Messages.historyText);
button = $('<button>', {
title: Messages.historyButton,
'class': "fa fa-history history",
});
}).append($text);
if (data.histConfig) {
button
.click(prepareFeedback(type))

View File

@@ -85,6 +85,10 @@ define([
var $drawer = Cryptpad.createButton('more', true).appendTo($rightside);
$drawer.click(function () {
$drawerContent.toggle();
$drawer.removeClass('active');
if ($drawerContent.is(':visible')) {
$drawer.addClass('active');
}
});
}
@@ -463,6 +467,10 @@ define([
'class': 'saveIcon',
'title': Messages.saveTitle
}).hide();
if (config.readOnly === 1) {
$titleContainer.append($('<span>', {'class': 'readOnly'})
.text('('+Messages.readonly+')'));
}
if (config.readOnly === 1 || typeof(Cryptpad) === "undefined") { return $titleContainer; }
var $input = $('<input>', {
type: 'text',