loleaflet: completely hide document signing bar by default

This used to be mostly hidden by the document container, but a 1px
horizontal red line was still visible.

Also return early in adjustUIState() to silence errors when the feature
is not enabled in loolwsd.xml.

Change-Id: I140bc5a79bdb85790021f57dd0ab810587bb2529
This commit is contained in:
Miklos Vajna 2018-12-05 11:40:50 +01:00
parent 2e9af9da16
commit 0b15bd381c

View file

@ -110,6 +110,9 @@ function updateCurrentPassport() {
}
function adjustUIState() {
if (w2ui['document-signing-bar'] === undefined)
return;
if (library && identity) {
w2ui['document-signing-bar'].hide('login');
w2ui['document-signing-bar'].show('logout');
@ -264,18 +267,21 @@ function vereignRestoreIdentity() {
L.Map.include({
showSignDocument: function() {
$('#document-signing-bar').show();
this.initializeLibrary();
oldtoolbarSize = $('#document-container').css('top');
$('#document-container').css('top', '110px');
},
hideSignDocument: function() {
$('#document-signing-bar').hide();
library = null;
identity = null;
currentPassport = null;
$('#document-container').css('top', oldtoolbarSize);
},
signingInitializeBar: function() {
$('#document-signing-bar').hide();
adjustUIState();
},
signDocument: function() {