diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-02-25 13:45:34 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-02-25 13:45:34 +0100 |
commit | dbd565ec8195117306ae869f4e7b507ff275ed32 (patch) | |
tree | c2861cab1fe17a50464aec710ecdf7f52b5862c4 /simpleSigning/src/main/resources/js | |
parent | d420ee89e58d271e3f5ab202309e659f709fd0f5 (diff) | |
download | einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.tar.gz einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.tar.bz2 einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.zip |
added QR Code generation + Base64 Data provising
Diffstat (limited to 'simpleSigning/src/main/resources/js')
-rw-r--r-- | simpleSigning/src/main/resources/js/pdfas.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/simpleSigning/src/main/resources/js/pdfas.js b/simpleSigning/src/main/resources/js/pdfas.js index 1017fee..30f27f9 100644 --- a/simpleSigning/src/main/resources/js/pdfas.js +++ b/simpleSigning/src/main/resources/js/pdfas.js @@ -37,11 +37,15 @@ var pdfAs = {}; * @returns */ pdfAs.signText = function(content, error, success) { - this.createAsyncSignature(content.content, content.connector, content.uiId, pdfAsUrl, "TEXT", success, error); + this.createAsyncSignature(content.content, content.connector, content.uiId, pdfAsUrl, content.qrdata, "TEXT", success, error); }; pdfAs.signPdf = function(content, error, success) { - this.createAsyncSignature(content.content, content.connector, content.uiId, pdfAsUrl, "PDF", success, error); + this.createAsyncSignature(content.content, content.connector, content.uiId, pdfAsUrl, content.qrdata, "PDF", success, error); +}; + +pdfAs.signPdfBase64 = function(content, error, success) { + this.createAsyncSignature(content.content, content.connector, content.uiId, pdfAsUrl, content.qrdata, "B64", success, error); }; pdfAs.getVersion = function(cb, err) { @@ -132,7 +136,7 @@ pdfAs.autoResize = function(eventId, height, width){ element.style.margin = '-' + element.scrollHeight / 2 + 'px 0 0 -' + element.scrollWidth / 2 + 'px'; }; -pdfAs.createAsyncSignature = function(pdfUrl, connector, divID, pdfAsURL, type, success, error) { +pdfAs.createAsyncSignature = function(pdfUrl, connector, divID, pdfAsURL, qrcode, type, success, error) { // generate EventID var eventId = guid(); @@ -142,7 +146,8 @@ pdfAs.createAsyncSignature = function(pdfUrl, connector, divID, pdfAsURL, type, EVENTID: eventId, TYPE: type, TARGETURL: document.URL, - NEW: "1" + NEW: "1", + QRCODE: qrcode }; /*var querystring = encodeQueryData(parameters); |