loleaflet/build/deps.js | 5 ++++ loleaflet/css/loleaflet.css | 2 - loleaflet/css/toolbar.css | 4 +++ loleaflet/debug/document/loleaflet.html | 3 ++ loleaflet/html/loleaflet.html.m4 | 2 + loleaflet/js/toolbar.js | 28 +++++++++++++++++++++++++++ loleaflet/src/control/Signing.js | 33 ++++++++++++++++++++++++++++++++ loleaflet/src/control/Toolbar.js | 3 -- 8 files changed, 76 insertions(+), 4 deletions(-)
New commits: commit 582e461fb2fb566392b63a14efca7503133e838a Author: Tomaž Vajngerl <[email protected]> AuthorDate: Fri Nov 9 08:38:23 2018 +0100 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Fri Nov 9 09:06:33 2018 +0100 vereign logging in and logging out Change-Id: I33427c1451ae795e3692cb96a95488d85afb2db4 Reviewed-on: https://gerrit.libreoffice.org/63154 Reviewed-by: Tomaž Vajngerl <[email protected]> Tested-by: Tomaž Vajngerl <[email protected]> diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js index 5f5fe0007..2ceb076fe 100644 --- a/loleaflet/js/toolbar.js +++ b/loleaflet/js/toolbar.js @@ -231,6 +231,9 @@ function onClick(e, id, item, subItem) { map.sendUnoCommand('.uno:StatusBarFunc', command); }); } + else if (id === 'logout') { + map.signingLogout(); + } } function setBorders(left, right, bottom, top, horiz, vert) { diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index b3034d59f..f12392705 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -3,7 +3,31 @@ * Document Signing */ +/* global window setupViamAPI */ + +var library = null; + L.Map.include({ showSignDocument: function() { + this.signingLogin(); + }, + signingLogout: function() { + if (library) { + library.logout(); + } + }, + signingLogin: function() { + setupViamAPI( + 'signdocument-iframe-content', + { + onEvent: function(event) { + alert(event.type); + } + }, + 'https://dev.vereign.com/api/js/iframe' + ).then(function(lib) + { + library = lib; + }); } }); commit 1a954fa44d4d12d68f8532afdd3f7b9282afe2a2 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Fri Nov 9 08:30:51 2018 +0100 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Fri Nov 9 09:06:23 2018 +0100 add sign infobar below the toolbar Change-Id: I7def928b0cacf54f008c9402a9df229423042f48 Reviewed-on: https://gerrit.libreoffice.org/63153 Reviewed-by: Tomaž Vajngerl <[email protected]> Tested-by: Tomaž Vajngerl <[email protected]> diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css index 0920701cc..539640ea5 100644 --- a/loleaflet/css/loleaflet.css +++ b/loleaflet/css/loleaflet.css @@ -2,7 +2,7 @@ border-top: 1px solid #B6B6B6; background: #DFDFDF; position: absolute; - top: 70px; + top: 100px; bottom: 33px; right: 0px; left: 0px; diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css index 4abd84163..742aae844 100644 --- a/loleaflet/css/toolbar.css +++ b/loleaflet/css/toolbar.css @@ -17,6 +17,10 @@ z-index: 1000; } +#document-signing-bar { + background-color: #dd000088; +} + w2ui-toolbar { position: absolute; right: 10px; diff --git a/loleaflet/debug/document/loleaflet.html b/loleaflet/debug/document/loleaflet.html index 8f9d5fd9d..e69269273 100644 --- a/loleaflet/debug/document/loleaflet.html +++ b/loleaflet/debug/document/loleaflet.html @@ -78,6 +78,9 @@ <div id="toolbar-up"></div> <div id="formulabar"></div> </div> + + <div id="document-signing-bar"></div> + <input id="insertgraphic" type="file" onchange="onInsertFile()" style="position: fixed; top: -100em"> <div id="document-container"> diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 index d2669ac78..10ed38a8b 100644 --- a/loleaflet/html/loleaflet.html.m4 +++ b/loleaflet/html/loleaflet.html.m4 @@ -103,6 +103,8 @@ ifelse(MOBILEAPP,[true], </tr> </table> + <div id="document-signing-bar"></div> + <input id="insertgraphic" type="file" style="position: fixed; top: -100em"> <input id="document-name-input" type="text" disabled="true"/> diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js index 07b11d2e7..5f5fe0007 100644 --- a/loleaflet/js/toolbar.js +++ b/loleaflet/js/toolbar.js @@ -62,6 +62,10 @@ function onClick(e, id, item, subItem) { toolbar = w2ui.formulabar; item = toolbar.get(id); } + else if (w2ui['document-signing-bar'].get(id) !== null) { + toolbar = w2ui['document-signing-bar']; + item = toolbar.get(id); + } else if (w2ui['toolbar-down'].get(id) !== null) { toolbar = w2ui['toolbar-down']; item = toolbar.get(id); @@ -753,6 +757,27 @@ 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: '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({ name: 'spreadsheet-toolbar', commit bcbabbaec6b985ba3dcd294a2f6093cb5643d57d Author: Tomaž Vajngerl <[email protected]> AuthorDate: Fri Nov 9 08:24:57 2018 +0100 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Fri Nov 9 09:06:18 2018 +0100 add Signing.js to include all signing related code Change-Id: I77d9016a6fe9969ffe8639265696754272d19b89 Reviewed-on: https://gerrit.libreoffice.org/63152 Reviewed-by: Tomaž Vajngerl <[email protected]> Tested-by: Tomaž Vajngerl <[email protected]> diff --git a/loleaflet/build/deps.js b/loleaflet/build/deps.js index 448ebf136..7bfa3e4bc 100644 --- a/loleaflet/build/deps.js +++ b/loleaflet/build/deps.js @@ -399,6 +399,11 @@ var deps = { desc: 'Toolbar handler.' }, + Signing: { + src: ['control/Signing.js'], + desc: 'Document signing.' + }, + Parts: { src: ['control/Parts.js'], desc: 'Parts change handler.' diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js new file mode 100644 index 000000000..b3034d59f --- /dev/null +++ b/loleaflet/src/control/Signing.js @@ -0,0 +1,9 @@ +/* -*- js-indent-level: 8 -*- */ +/* + * Document Signing + */ + +L.Map.include({ + showSignDocument: function() { + } +}); diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index eff05e281..debc090d6 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -179,9 +179,6 @@ L.Map.include({ this._socket.sendMessage('renderfont font=' + window.encodeURIComponent(fontName)); }, - showSignDocument: function() { - }, - showLOKeyboardHelp: function() { var w = window.innerWidth / 2; var map = this; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
