Froze Release11.2 (#177)
Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-authored-by: Dariusz Augustyniak <augustyd@noreply.example.com> Co-authored-by: Mikolaj Widla <widlam@noreply.example.com> Reviewed-on: #177
This commit is contained in:
		| @@ -6,14 +6,15 @@ | ||||
|     <meta charset="utf-8" /> | ||||
|  | ||||
|     <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|     <link rel="stylesheet" href="../assets/css/json.css"> | ||||
|     <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
|     <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script src="../assets/scripts/tools/json.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
|   </head> | ||||
|  | ||||
|   <body> | ||||
|   <body onload="init()"> | ||||
|     <div class="container"> | ||||
|       <div id="tool" class="tool rwd-expandable"> | ||||
|         <div class="tool-context"> | ||||
| @@ -224,38 +225,11 @@ | ||||
|  | ||||
|       hljs.addPlugin(mergeHTMLPlugin); | ||||
|  | ||||
|       const editorEle = document.getElementById('jsonBlock'); | ||||
|  | ||||
|       // Handle the `paste` event | ||||
|       editorEle.addEventListener('paste', function (e) { | ||||
|         // Prevent the default action | ||||
|         e.preventDefault(); | ||||
|  | ||||
|         // Get the copied text from the clipboard | ||||
|         const text = e.clipboardData | ||||
|             ? (e.originalEvent || e).clipboardData.getData('text/plain') | ||||
|             : // For IE | ||||
|             window.clipboardData | ||||
|                 ? window.clipboardData.getData('Text') | ||||
|                 : ''; | ||||
|  | ||||
|         if (document.queryCommandSupported('insertText')) { | ||||
|           document.execCommand('insertText', false, text); | ||||
|         } else { | ||||
|           // Insert text at the current position of caret | ||||
|           const range = document.getSelection().getRangeAt(0); | ||||
|           range.deleteContents(); | ||||
|  | ||||
|           const textNode = document.createTextNode(text); | ||||
|           range.insertNode(textNode); | ||||
|           range.selectNodeContents(textNode); | ||||
|           range.collapse(false); | ||||
|  | ||||
|           const selection = window.getSelection(); | ||||
|           selection.removeAllRanges(); | ||||
|           selection.addRange(range); | ||||
|         } | ||||
|       }); | ||||
|       function init() { | ||||
|         // Make sure that only plain text is pasted | ||||
|         configurePastingInElement("jsonBlock"); | ||||
|          | ||||
|       } | ||||
|     </script> | ||||
|   </body> | ||||
| </html> | ||||
|   | ||||
| @@ -4,7 +4,12 @@ | ||||
|     <head> | ||||
|         <!-- <link rel="stylesheet" href="styles.css"> --> | ||||
|         <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|         <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
|         <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> | ||||
|         <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|         <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|         <script>hljs.highlightAll();</script> | ||||
|  | ||||
|         <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|         <meta charset="utf-8" /> | ||||
|     </head> | ||||
| @@ -34,10 +39,7 @@ | ||||
|  | ||||
|                     </div> | ||||
|  | ||||
|                     <textarea id="xmlArea" name="xmlArea" rows="15" | ||||
|                         class="textarea-700 bordered-field vertically-resizeable max-width" | ||||
|                         onblur="setDefaultContent(this, 'Insert XML here');" | ||||
|                         onfocus="clearDefaultContent(this, 'Insert XML here');"></textarea> | ||||
|                     <pre><code class="language-xml bordered-field textarea-700" id="xmlArea" contenteditable="True"></code></pre> | ||||
|                     <br><br> | ||||
|                     <button id="prettifyButton" class="max-width block-label action-button active" | ||||
|                         onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Prettify XML</button> | ||||
| @@ -70,7 +72,7 @@ | ||||
|             } | ||||
|  | ||||
|             function init() { | ||||
|                 setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here'); | ||||
|                 configurePastingInElement("xmlArea"); | ||||
|             } | ||||
|         </script> | ||||
|  | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -4,7 +4,11 @@ | ||||
| <head> | ||||
|     <!-- <link rel="stylesheet" href="styles.css"> --> | ||||
|     <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|     <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
|     <script src="../assets/scripts/common/hljs.min.js"></script> | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <meta charset="utf-8" /> | ||||
| </head> | ||||
| @@ -36,32 +40,25 @@ | ||||
|                         <button class="action-button active" id="prettyXMLButton" style="padding: 3px 10px;" | ||||
|                             onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Format XML</button> | ||||
|                         <button class="action-button active" id="defaultXMLButton" style="padding: 3px 10px;" | ||||
|                             onclick="fillDefaultXML(this)">Insert default XML</button> | ||||
|                             onclick="fillDefaultXSD(this);">Insert default XML/XSD</button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|  | ||||
|                 <!-- <span id="processorTooltipInfo">procInfo</span><br> --> | ||||
|  | ||||
|                 <label for="xmlArea"><b>Insert your XML:</b></label> | ||||
|                 <textarea id="xmlArea" name="xmlArea" rows="15" | ||||
|                     class="textarea-300 bordered-field vertically-resizeable max-width" | ||||
|                     onblur="setDefaultContent(this, 'Insert XML here');" | ||||
|                     onfocus="clearDefaultContent(this, 'Insert XML here');"></textarea> | ||||
|                 <br><br> | ||||
|                 <pre><code class="language-xml bordered-field textarea-300" id="xmlArea" contenteditable="True"></code></pre> | ||||
|                 <br> | ||||
|  | ||||
|                 <label for="transformArea"><b>Insert your XSD:</b></label> | ||||
|                 <textarea id="transformArea" name="transformArea" rows="15" | ||||
|                     class="textarea-300 bordered-field vertically-resizeable max-width" | ||||
|                     onblur="setDefaultContent(this, 'Insert XSD here');" | ||||
|                     onfocus="clearDefaultContent(this, 'Insert XSD here');"></textarea> | ||||
|                 <pre><code class="language-xml bordered-field textarea-300" id="transformArea" contenteditable="True"></code></pre> | ||||
|                 <br> | ||||
|                 <button id="requestButton" class="max-width block-label action-button active" | ||||
|                     onclick="performRequest('xsd', true, true)">Verify XSD</button> | ||||
|                 <br><br> | ||||
|                 <br> | ||||
|  | ||||
|                 <label for="resultArea"><b>Result:<span id="procinfo"></span></b></label> | ||||
|                 <textarea disabled id="resultArea" name="resultArea" rows="2" | ||||
|                     class="bordered-field vert2ically-resizeable max-width" style="margin-bottom: 50px;"></textarea> | ||||
|                 <pre><code class="language-xml bordered-field" id="resultArea"></code></pre> | ||||
|  | ||||
|             </div> | ||||
|         </div> | ||||
| @@ -84,6 +81,10 @@ | ||||
|  | ||||
|     <script> | ||||
|         function init() { | ||||
|             // Make sure that only plain text is pasted | ||||
|             configurePastingInElement("xmlArea"); | ||||
|             configurePastingInElement("transformArea"); | ||||
|  | ||||
|             //Handle clicks in whole form and set info in tooltip | ||||
|             setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here'); | ||||
|             setDefaultContent(document.getElementById("transformArea"), 'Insert XSD here'); | ||||
| @@ -98,7 +99,7 @@ | ||||
|                 } | ||||
|  | ||||
|                 processTooltip(); | ||||
|                 //  | ||||
|                  | ||||
|             }) | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,13 @@ | ||||
| <head> | ||||
|     <!-- <link rel="stylesheet" href="styles.css"> --> | ||||
|     <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|     <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
|     <script src="../assets/scripts/common/hljs.min.js"></script> | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
|  | ||||
|  | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <meta charset="utf-8" /> | ||||
| </head> | ||||
| @@ -25,7 +31,7 @@ | ||||
|                             <option value="libxml">libXML</option> | ||||
|                         </select> | ||||
|                         <select name="versions" id="versions" style="display: none;"> | ||||
|                             <option class="hideable libxml xalan"value="1.0">1.0</option> | ||||
|                             <option class="hideable libxml xalan" value="1.0">1.0</option> | ||||
|                             <option class="hideable saxon" value="2.0">2.0</option> | ||||
|                             <option class="hideable saxon" value="3.0">3.0</option> | ||||
|                             <option class="hideable saxon" value="3.1">3.1</option> | ||||
| @@ -45,26 +51,25 @@ | ||||
|                 <br> | ||||
|  | ||||
|                 <label for="xmlArea"><b>Insert your XML:</b></label> | ||||
|                 <textarea id="xmlArea" name="xmlArea" rows="15" | ||||
|                     class="textarea-300 bordered-field vertically-resizeable max-width" | ||||
|                     onblur="setDefaultContent(this, 'Insert XML here');" | ||||
|                     onfocus="clearDefaultContent(this, 'Insert XML here');"></textarea> | ||||
|                 <br><br> | ||||
|                 <pre><code class="language-xml bordered-field textarea-300" id="xmlArea" contenteditable="True"></code></pre> | ||||
|                 <br> | ||||
|  | ||||
|                 <label for="transformArea"><b>Insert your XSLT:</b></label> | ||||
|                 <textarea id="transformArea" name="transformArea" rows="15" | ||||
|                     class="textarea-300 bordered-field vertically-resizeable max-width" | ||||
|                     onblur="setDefaultContent(this, 'Insert XSLT here');" | ||||
|                     onfocus="clearDefaultContent(this, 'Insert XSLT here');"></textarea> | ||||
|                 <div class="display-space-between"> | ||||
|                     <label for="transformArea"><b>Insert your XSLT:</b></label> | ||||
|                     <div> | ||||
|                         <button class="action-button active" id="defaultXSLTButton" style="padding: 3px 10px;" | ||||
|                             onclick="fillDefaultXSLT()">Insert default XSLT | ||||
|                         </button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <pre><code class="language-xml bordered-field textarea-300" id="transformArea" contenteditable="True"></code></pre> | ||||
|                 <br> | ||||
|                 <button id="requestButton" class="max-width block-label action-button active" | ||||
|                     onclick="performRequest('xslt', true, true)">Execute XSLT transform</button> | ||||
|                 <br><br> | ||||
|                 <br> | ||||
|  | ||||
|                 <label for="resultArea"><b>Transform result:<span id="procinfo"></span></b></label> | ||||
|                 <textarea disabled id="resultArea" name="resultArea" rows="10" | ||||
|                     class="textarea-300 bordered-field vertically-resizeable max-width" | ||||
|                     style="margin-bottom: 50px;"></textarea> | ||||
|                 <pre><code class="language-xml bordered-field textarea-300" id="resultArea"></code></pre> | ||||
|  | ||||
|             </div> | ||||
|         </div> | ||||
| @@ -1144,7 +1149,7 @@ | ||||
|  | ||||
|     <script> | ||||
|         function processTooltip() { | ||||
|              | ||||
|  | ||||
|             if (getProcessor() == "xalan" || getProcessor() == "libxml") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions"; | ||||
|                 document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0"; | ||||
| @@ -1158,9 +1163,9 @@ | ||||
|  | ||||
|         var triggerList = document.getElementsByClassName("collapseTrigger"); | ||||
|         for (i = 0; i < triggerList.length; i++) { | ||||
|              | ||||
|  | ||||
|             triggerList[i].addEventListener("click", function () { | ||||
|                  | ||||
|  | ||||
|                 var collapsible = this.parentElement; | ||||
|                 var collapsibleData = this.nextElementSibling; | ||||
|                 if (collapsibleData.style.maxHeight > "0px") { | ||||
| @@ -1194,10 +1199,14 @@ | ||||
|         } | ||||
|  | ||||
|         function init() { | ||||
|             // Make sure that only plain text is pasted | ||||
|             configurePastingInElement("xmlArea"); | ||||
|             configurePastingInElement("transformArea"); | ||||
|  | ||||
|             //Handle clicks in whole form and set info in tooltip | ||||
|             setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here'); | ||||
|             setDefaultContent(document.getElementById("transformArea"), 'Insert XSLT here'); | ||||
|              | ||||
|  | ||||
|             // refreshTooltip(); | ||||
|             processTooltip(); | ||||
|             tool.addEventListener('click', event => { | ||||
| @@ -1218,8 +1227,11 @@ | ||||
|                 } | ||||
|  | ||||
|                 processTooltip(); | ||||
|                  | ||||
|             }) | ||||
|              | ||||
|         } | ||||
|          | ||||
|     </script> | ||||
|  | ||||
| </body> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user