[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/js loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Feb 7 10:30:38 UTC 2019
loleaflet/js/toolbar.js | 17 +----------------
loleaflet/src/control/Signing.js | 27 +++++++++++++++++++--------
2 files changed, 20 insertions(+), 24 deletions(-)
New commits:
commit 706f241ded7bd6d382d2a01ceaf95784868e6527
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Feb 6 15:08:08 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Feb 7 11:30:18 2019 +0100
Move toolbar init. to Signing.js, remove logout
Change-Id: I6d65a3cedbc0bce6d6792a8114537bcc6e014a37
(cherry picked from commit d10541cd58d030f36818084d7a39b2c815962986)
Reviewed-on: https://gerrit.libreoffice.org/67485
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 591f96361..b23e58be7 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -1092,22 +1092,7 @@ function initNormalToolbar(toolItems) {
toolbar.w2toolbar({
name: 'document-signing-bar',
tooltip: 'bottom',
- items: [
- {type: 'html', id: 'left'},
- {type: 'html', id: 'logo', html: '<img src="images/vereign.png" style="padding-right: 16px; padding-left: 6px; height: 32px"/>' },
- {type: 'menu', id: 'passport', caption: _('Select passport'), items: []},
- {type: 'html', id: 'current-passport', html: _('Passport: N/A')},
- {type: 'break', id: 'passport-break' },
- {type: 'button', id: 'sign-upload', caption: _('Sign & Upload'), img: '', hint: _('Sign and upload document')},
- {type: 'break', id: 'sign-upload-break' },
- {type: 'html', id: 'current-document-status-label', html: '<p><b>' + _('Status:') + ' </b></p>'},
- {type: 'html', id: 'current-document-status', html: _('N/A')},
- {type: 'spacer'},
- {type: 'html', id: 'identity', html: ''},
- {type: 'button', id: 'logout', caption: _('Logout'), img: '', hint: _('Logout')},
- {type: 'button', id: 'login', caption: _('Login'), img: '', hint: _('Login')},
- {type: 'button', id: 'close-document-signing-bar', img: 'closetoolbar', hint: _('Close')},
- ],
+ items: map.setupSigningToolbarItems(),
onClick: function (e) {
onClick(e, e.target);
hideTooltip(this, e.target);
diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js
index 3f795686f..da60783ea 100644
--- a/loleaflet/src/control/Signing.js
+++ b/loleaflet/src/control/Signing.js
@@ -158,7 +158,6 @@ function adjustUIState() {
w2ui['document-signing-bar'].show('identity');
w2ui['document-signing-bar'].hide('login');
- w2ui['document-signing-bar'].show('logout');
}
else {
w2ui['document-signing-bar'].hide('passport');
@@ -172,7 +171,6 @@ function adjustUIState() {
w2ui['document-signing-bar'].show('login');
else
w2ui['document-signing-bar'].hide('login');
- w2ui['document-signing-bar'].hide('logout');
}
w2ui['document-signing-bar'].get('current-document-status').html = '<p>' + currentDocumentSigningStatus + '</p>';
@@ -447,7 +445,7 @@ L.Map.include({
if (el)
el.resize();
},
- hideSignDocument: function() {
+ hideSignToolbar: function() {
$('#document-signing-bar').hide();
library = null;
identity = null;
@@ -577,14 +575,12 @@ L.Map.include({
},
handleSigningClickEvent: function(id, item) {
if (id === 'close-document-signing-bar') {
- this.hideSignDocument();
+ this.signingLogout();
+ this.hideSignToolbar();
}
- else if (id === 'login') {
+ else if (id === 'login' || id === 'identity') {
this.signingLogin();
}
- else if (id === 'logout') {
- this.signingLogout();
- }
else if (id === 'sign-upload') {
vereignSignAndUploadDocument();
}
@@ -593,6 +589,21 @@ L.Map.include({
}
return false;
},
+ setupSigningToolbarItems: function() {
+ return [
+ {type: 'html', id: 'logo', html: '<a href="http://www.vereign.com" target="_blank"><img src="images/vereign.png" style="padding-right: 16px; padding-left: 6px; height: 32px"/></a>' },
+ {type: 'menu', id: 'passport', caption: _('Select passport'), items: []},
+ {type: 'html', id: 'current-passport', html: _('Passport: N/A')},
+ {type: 'break', id: 'passport-break' },
+ {type: 'button', id: 'sign-upload', caption: _('Sign'), img: '', hint: _('Sign document')},
+ {type: 'break', id: 'sign-upload-break' },
+ {type: 'html', id: 'current-document-status-label', html: '<p><b>' + _('Status:') + ' </b></p>'},
+ {type: 'html', id: 'current-document-status', html: _('N/A')},
+ {type: 'spacer'},
+ {type: 'html', id: 'identity', html: ''},
+ {type: 'button', id: 'login', caption: _('Login'), img: '', hint: _('Login')},
+ {type: 'button', id: 'close-document-signing-bar', img: 'closetoolbar', hint: _('Close')}];
+ },
onChangeSignStatus: function(signstatus) {
var statusText = '';
// This is meant to be in sync with core.git
More information about the Libreoffice-commits
mailing list