[Libreoffice-commits] online.git: loleaflet/js
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 16 12:48:57 UTC 2018
loleaflet/js/toolbar.js | 52 ++++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 25 deletions(-)
New commits:
commit 1f60282c6593de644777e670de1f7ed73dddd826
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Nov 16 12:25:18 2018 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Nov 16 13:48:39 2018 +0100
document signing: No document signing bar when it's disabled.
Change-Id: Iaec13c5166654e735aba0714763d97cf92486bd7
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index cbe94ab0b..c31a48e0b 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -62,7 +62,7 @@ function onClick(e, id, item, subItem) {
toolbar = w2ui.formulabar;
item = toolbar.get(id);
}
- else if (w2ui['document-signing-bar'].get(id) !== null) {
+ else if ('document-signing-bar' in w2ui && w2ui['document-signing-bar'].get(id) !== null) {
toolbar = w2ui['document-signing-bar'];
item = toolbar.get(id);
}
@@ -765,30 +765,32 @@ function createToolbar() {
e.isCancelled = true;
});
- toolbar = $('#document-signing-bar');
- toolbar.w2toolbar({
- name: 'document-signing-bar',
- tooltip: 'bottom',
- items: [
- {type: 'html', id: 'left'},
- {type: 'html', id: 'logo', html: '<p><b>Vereign</b></p>'},
- {type: 'button', id: 'sign', caption: 'Sign', img: '', hint: _('Sign document')},
- {type: 'break' },
- {type: 'html', id: 'user-label', html: '<p>User:</p>'},
- {type: 'html', id: 'user', html: '<none>'},
- {type: 'break' },
- {type: 'button', id: 'logout', caption: 'Logout', img: '', hint: _('Logout')},
- ],
- onClick: function (e) {
- onClick(e, e.target);
- hideTooltip(this, e.target);
- },
- onRefresh: function() {
- }
- });
- toolbar.bind('touchstart', function() {
- w2ui['document-signing-bar'].touchStarted = true;
- });
+ if (L.DomUtil.get('document-signing-bar') !== null) {
+ toolbar = $('#document-signing-bar');
+ toolbar.w2toolbar({
+ name: 'document-signing-bar',
+ tooltip: 'bottom',
+ items: [
+ {type: 'html', id: 'left'},
+ {type: 'html', id: 'logo', html: '<p><b>Vereign</b></p>'},
+ {type: 'button', id: 'sign', caption: 'Sign', img: '', hint: _('Sign document')},
+ {type: 'break' },
+ {type: 'html', id: 'user-label', html: '<p>User:</p>'},
+ {type: 'html', id: 'user', html: '<none>'},
+ {type: 'break' },
+ {type: 'button', id: 'logout', caption: 'Logout', img: '', hint: _('Logout')},
+ ],
+ onClick: function (e) {
+ onClick(e, e.target);
+ hideTooltip(this, e.target);
+ },
+ onRefresh: function() {
+ }
+ });
+ toolbar.bind('touchstart', function() {
+ w2ui['document-signing-bar'].touchStarted = true;
+ });
+ }
toolbar = $('#spreadsheet-toolbar')
toolbar.w2toolbar({
More information about the Libreoffice-commits
mailing list