diff --git a/index.html b/index.html index 2b2a4b7..2f5357f 100644 --- a/index.html +++ b/index.html @@ -19,8 +19,8 @@ textarea.errorMessage { background-color: #FFEEEE; font-size: 1em; height: 3em; width: 100%;} select.elementString { background-color: #CCCCFF; font-size: 1em} select.digitalLink { background-color: #FFD9CC; font-size: 1em} - input {width: 100%;} +div.showHide {background-color: #EEEEEE; font-size: 1em; width: 25em; height: 1em; text-align: center; border-radius: 0.8em; padding-top: 0.3em; padding-bottom: 0.3em;} @@ -37,10 +37,14 @@

Convert GS1 element strings to GS1 Digital Link URI

Input: Element string OptionsUse alphabetic short names e.g. /gtin/
Custom URI stem    -Output: GS1 Digital Link URI +Output: GS1 Digital Link URI Error:  
+
{{showHideMessage[showHide]}}
+
+ +

 

Convert GS1 Digital Link URI to GS1 element strings

@@ -48,7 +52,7 @@

Convert GS1 Digital Link URI to GS1 element strings

Input: GS1 Digital Link URI OptionsUse brackets / human-readable output   -Output: Element string +Output: Element string Error: @@ -62,7 +66,9 @@

Convert GS1 Digital Link URI to GS1 element strings

var uristem="http://example.org"; var brackets="true"; var gs1dlt = new GS1DigitalLinkToolkit(); - +var showHide=0; +var showHideMessage=["Show QR code encoded with GS1 Digital Link URI","Hide QR code encoded with GS1 Digital Link URI"]; +var qrURI="blank.png"; var app1 = new Vue({ el: "#app1", @@ -74,9 +80,21 @@

Convert GS1 Digital Link URI to GS1 element strings

gs1dlt : gs1dlt, shortnames: shortnames, uristem: uristem, - brackets: brackets + brackets: brackets, + showHide: showHide, + showHideMessage: showHideMessage, + blank: qrURI }, computed : { + qrURI: function() { + if (this.digitalLinkOutput !== "") { + return "https://zxing.org/w/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl="+encodeURIComponent(this.digitalLinkOutput); + } else { + return this.blank; + } + }, + + digitalLinkOutput : function() { if (this.elementStringInput !== "") { try { @@ -112,6 +130,9 @@

Convert GS1 Digital Link URI to GS1 element strings

}, demo2 : function() { this.digitalLinkInput="https://example.org/gtin/054123450013/lot/ABC%26%2B123?3103=000189&3923=2172"; + }, + showHideQRcode : function() { + this.showHide = 1- this.showHide; } } });