Show sheets toolbar in readonly mode

Change-Id: Iac6390d7cb5186ca9538cd3ed9d7c896aa9c8f81
This commit is contained in:
Szymon Kłos 2018-12-07 15:11:23 +01:00 committed by Jan Holesovsky
parent 2768d8b9fd
commit b4baf6d82c
2 changed files with 12 additions and 5 deletions

View file

@ -2123,7 +2123,7 @@ function onUpdatePermission(e) {
}
}
var spreadsheetButtons = ['firstrecord', 'prevrecord', 'nextrecord', 'lastrecord', 'insertsheet'];
var spreadsheetButtons = ['insertsheet'];
var formulaBarButtons = ['sum', 'function'];
var presentationButtons = ['insertpage', 'duplicatepage', 'deletepage'];
var toolbarDownButtons = ['next', 'prev'];
@ -2167,7 +2167,6 @@ function onUpdatePermission(e) {
case 'spreadsheet':
$('#document-container').css('bottom', '68px'); // FIXME this and spreadsheet-row-column-frame are supposed to be the same, but are not
$('#spreadsheet-row-column-frame').css('bottom', '65px');
$('#spreadsheet-tabs-container').show();
$('#spreadsheet-toolbar').show();
break;
case 'presentation':
@ -2215,10 +2214,9 @@ function onUpdatePermission(e) {
$('#document-container').css('bottom', '0');
break;
case 'spreadsheet':
$('#document-container').css('bottom', '0');
$('#document-container').css('bottom', '35px');
$('#spreadsheet-row-column-frame').css('bottom', '0');
$('#spreadsheet-tabs-container').hide();
$('#spreadsheet-toolbar').hide();
$('#spreadsheet-toolbar').show();
break;
case 'presentation':
$('#document-container').css('bottom', '0');

View file

@ -21,6 +21,15 @@ L.Control.Tabs = L.Control.extend({
setTimeout(function() {
$('.spreadsheet-tab').contextMenu(e.perm === 'edit');
}, 1000);
if (e.perm === 'edit') {
$('.spreadsheet-tabs-container').css('bottom', '33px');
$('#spreadsheet-toolbar').css('bottom', '33px');
}
else {
$('.spreadsheet-tabs-container').css('bottom', '0px');
$('#spreadsheet-toolbar').css('bottom', '0px');
}
},
_initialize: function () {