send a signal that the export, sign and upload was successful

Change-Id: Ic55a2d5ea452c9153945d3bc9bcbb514a46e70e9
This commit is contained in:
Tomaž Vajngerl 2019-01-17 16:58:20 +01:00
parent a5ca962092
commit fe59a510fd
3 changed files with 15 additions and 0 deletions

View file

@ -1562,6 +1562,8 @@ bool ChildSession::exportSignAndUploadDocument(const char* buffer, int length, c
return false; return false;
} }
sendTextFrame("signeddocumentuploadstatus: OK");
return true; return true;
} }

View file

@ -639,5 +639,14 @@ L.Map.include({
} }
awaitForDocumentStatusToUpload = false; awaitForDocumentStatusToUpload = false;
currentDocumentType = null; currentDocumentType = null;
},
onVereignUploadStatus: function(uploadStatus) {
if (uploadStatus == 'OK') {
_map.fire('infobar', {
msg: _('Document uploaded.'),
action: null,
actionLabel: null
});
}
} }
}); });

View file

@ -491,6 +491,10 @@ L.TileLayer = L.GridLayer.extend({
var signstatus = textMsg.substring('signaturestatus:'.length + 1); var signstatus = textMsg.substring('signaturestatus:'.length + 1);
this._map.onChangeSignStatus(signstatus); 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')) { else if (textMsg.startsWith('removesession')) {
var viewId = parseInt(textMsg.substring('removesession'.length + 1)); var viewId = parseInt(textMsg.substring('removesession'.length + 1));
if (this._map._docLayer._viewId === viewId) { if (this._map._docLayer._viewId === viewId) {