kit/ChildSession.cpp | 2 ++ loleaflet/src/control/Signing.js | 17 +++++++++++++---- loleaflet/src/layer/tile/TileLayer.js | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-)
New commits: commit fe59a510fd9347de6e72444da943e1aa6824192b Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Jan 17 16:58:20 2019 +0100 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Thu Jan 17 16:58:20 2019 +0100 send a signal that the export, sign and upload was successful Change-Id: Ic55a2d5ea452c9153945d3bc9bcbb514a46e70e9 diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index e4c899cca..2b8534c01 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1562,6 +1562,8 @@ bool ChildSession::exportSignAndUploadDocument(const char* buffer, int length, c return false; } + sendTextFrame("signeddocumentuploadstatus: OK"); + return true; } diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 17d605128..3f795686f 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -639,5 +639,14 @@ L.Map.include({ } awaitForDocumentStatusToUpload = false; currentDocumentType = null; + }, + onVereignUploadStatus: function(uploadStatus) { + if (uploadStatus == 'OK') { + _map.fire('infobar', { + msg: _('Document uploaded.'), + action: null, + actionLabel: null + }); + } } }); diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 0134298d5..32e0951e1 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -491,6 +491,10 @@ L.TileLayer = L.GridLayer.extend({ var signstatus = textMsg.substring('signaturestatus:'.length + 1); this._map.onChangeSignStatus(signstatus); } + else if (textMsg.startsWith('signeddocumentuploadstatus:')) { + var status = textMsg.substring('signeddocumentuploadstatus:'.length + 1); + this._map.onVereignUploadStatus(status); + } else if (textMsg.startsWith('removesession')) { var viewId = parseInt(textMsg.substring('removesession'.length + 1)); if (this._map._docLayer._viewId === viewId) { commit a5ca9620922adaeb2bbe75cffc06ed7ec68f498c Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Jan 17 15:19:35 2019 +0100 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Thu Jan 17 15:19:35 2019 +0100 use export,sign,upload codepath for DOCX and ODT too Change-Id: Ic6c397e3936bfd659a6b4e8627ba45dbd4e6ae25 diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 4195cb185..17d605128 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -368,7 +368,7 @@ function vereignUpload(documentType) { }); } -function vereignSignAndUploadPDF(documentType) { +function vereignExportSignAndUploadToVereign(documentType) { library.getOneTimeCertificateByPassport(currentPassport.uuid).then(function(result) { if (!isSuccess(result)) { return; @@ -417,10 +417,10 @@ function vereignSignAndUploadForType(uploadDocType) { if (documentType == null) return; - if (uploadDocType == 'PDF') { - vereignSignAndUploadPDF(documentType); + if (uploadDocType == 'PDF' || uploadDocType == 'DOCX' || uploadDocType == 'ODT') { + vereignExportSignAndUploadToVereign(documentType); } - else if (uploadDocType == 'DOCX' || uploadDocType == 'ODT') { + else { library.getOneTimeCertificateByPassport(currentPassport.uuid).then(function(result) { if (isSuccess(result)) { var otp = result.data; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits