[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/js loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Feb 7 08:37:02 UTC 2019
loleaflet/css/toolbar.css | 2 +-
loleaflet/js/toolbar.js | 17 +----------------
loleaflet/src/control/Signing.js | 27 +++++++++++++++++++--------
3 files changed, 21 insertions(+), 25 deletions(-)
New commits:
commit d10541cd58d030f36818084d7a39b2c815962986
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Feb 6 15:08:08 2019 +0100
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Feb 6 15:09:34 2019 +0100
Move toolbar init. to Signing.js, remove logout
Change-Id: I6d65a3cedbc0bce6d6792a8114537bcc6e014a37
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index e612d9da1..b6673b5e0 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -1096,22 +1096,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
commit 2acfb2943a69423adf56aa3e8ad40ba32385ec4e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Feb 6 14:35:47 2019 +0100
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Feb 6 15:09:34 2019 +0100
Change the signing toolbar color to Vereign color
Change-Id: I6b0cdd489e663a255ff427c2790b7b27382b4c32
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 1276e14f3..93d9f9215 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -20,7 +20,7 @@
}
#document-signing-bar {
- background-color: #dd000088;
+ background-color: #ef324e;;
}
w2ui-toolbar {
More information about the Libreoffice-commits
mailing list