From fe59a510fd9347de6e72444da943e1aa6824192b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= Date: Thu, 17 Jan 2019 16:58:20 +0100 Subject: [PATCH] send a signal that the export, sign and upload was successful Change-Id: Ic55a2d5ea452c9153945d3bc9bcbb514a46e70e9 --- kit/ChildSession.cpp | 2 ++ loleaflet/src/control/Signing.js | 9 +++++++++ loleaflet/src/layer/tile/TileLayer.js | 4 ++++ 3 files changed, 15 insertions(+) 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) {