Fixed merge conflicts
This commit is contained in:
		| @@ -12,10 +12,6 @@ server { | ||||
|         add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; | ||||
|     } | ||||
|  | ||||
| <<<<<<< HEAD | ||||
|     #error_page  404              /404.html; | ||||
|  | ||||
| ======= | ||||
|     location /java/ { | ||||
|         proxy_pass http://xmltools-backend:8081/; | ||||
|         proxy_set_header Host $host; | ||||
| @@ -36,7 +32,6 @@ server { | ||||
|  | ||||
|  | ||||
|  | ||||
| >>>>>>> master | ||||
|     # redirect server error pages to the static page /50x.html | ||||
|     # | ||||
|     error_page   500 502 503 504  /50x.html; | ||||
|   | ||||
| @@ -7,16 +7,9 @@ | ||||
|  | ||||
|     <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|     <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
| <<<<<<< HEAD | ||||
|     <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 src="../assets/scripts/common/hljs.min.js"></script> | ||||
|     <script src="../assets/scripts/tools/jsonFormatter.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
| >>>>>>> master | ||||
|     <script>hljs.highlightAll();</script> | ||||
|   </head> | ||||
|  | ||||
| @@ -67,178 +60,5 @@ | ||||
|       </div> | ||||
|  | ||||
|     </div> | ||||
| <<<<<<< HEAD | ||||
|  | ||||
|     <script> | ||||
|       const mergeHTMLPlugin = (function () { | ||||
|         'use strict'; | ||||
|  | ||||
|         var originalStream; | ||||
|  | ||||
|         /** | ||||
|          * @param {string} value | ||||
|          * @returns {string} | ||||
|          */ | ||||
|         function escapeHTML(value) { | ||||
|           return value | ||||
|           .replace(/&/g, '&') | ||||
|           .replace(/</g, '<') | ||||
|           .replace(/>/g, '>') | ||||
|           .replace(/"/g, '"') | ||||
|           .replace(/'/g, '''); | ||||
|         } | ||||
|  | ||||
|         /* plugin itself */ | ||||
|  | ||||
|         /** @type {HLJSPlugin} */ | ||||
|         const mergeHTMLPlugin = { | ||||
|           // preserve the original HTML token stream | ||||
|           "before:highlightElement": ({el}) => { | ||||
|             originalStream = nodeStream(el); | ||||
|           }, | ||||
|           // merge it afterwards with the highlighted token stream | ||||
|           "after:highlightElement": ({el, result, text}) => { | ||||
|             if (!originalStream.length) { | ||||
|               return; | ||||
|             } | ||||
|  | ||||
|             const resultNode = document.createElement('div'); | ||||
|             resultNode.innerHTML = result.value; | ||||
|             result.value = mergeStreams(originalStream, nodeStream(resultNode), text); | ||||
|             el.innerHTML = result.value; | ||||
|           } | ||||
|         }; | ||||
|  | ||||
|         /** | ||||
|          * @param {Node} node | ||||
|          */ | ||||
|         function tag(node) { | ||||
|           return node.nodeName.toLowerCase(); | ||||
|         } | ||||
|  | ||||
|         /** | ||||
|          * @param {Node} node | ||||
|          */ | ||||
|         function nodeStream(node) { | ||||
|           /** @type Event[] */ | ||||
|           const result = []; | ||||
|           (function _nodeStream(node, offset) { | ||||
|             for (let child = node.firstChild; child; child = child.nextSibling) { | ||||
|               if (child.nodeType === 3) { | ||||
|                 offset += child.nodeValue.length; | ||||
|               } else if (child.nodeType === 1) { | ||||
|                 result.push({ | ||||
|                   event: 'start', | ||||
|                   offset: offset, | ||||
|                   node: child | ||||
|                 }); | ||||
|                 offset = _nodeStream(child, offset); | ||||
|  | ||||
|                 if (!tag(child).match(/br|hr|img|input/)) { | ||||
|                   result.push({ | ||||
|                     event: 'stop', | ||||
|                     offset: offset, | ||||
|                     node: child | ||||
|                   }); | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|             return offset; | ||||
|           })(node, 0); | ||||
|           return result; | ||||
|         } | ||||
|  | ||||
|         /** | ||||
|          * @param {any} original - the original stream | ||||
|          * @param {any} highlighted - stream of the highlighted source | ||||
|          * @param {string} value - the original source itself | ||||
|          */ | ||||
|         function mergeStreams(original, highlighted, value) { | ||||
|           let processed = 0; | ||||
|           let result = ''; | ||||
|           const nodeStack = []; | ||||
|  | ||||
|           function selectStream() { | ||||
|             if (!original.length || !highlighted.length) { | ||||
|               return original.length ? original : highlighted; | ||||
|             } | ||||
|             if (original[0].offset !== highlighted[0].offset) { | ||||
|               return (original[0].offset < highlighted[0].offset) ? original : highlighted; | ||||
|             } | ||||
|  | ||||
|             return highlighted[0].event === 'start' ? original : highlighted; | ||||
|           } | ||||
|  | ||||
|           /** | ||||
|            * @param {Node} node | ||||
|            */ | ||||
|           function open(node) { | ||||
|             /** @param {Attr} attr */ | ||||
|             function attributeString(attr) { | ||||
|               return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"'; | ||||
|             } | ||||
|  | ||||
|             // @ts-ignore | ||||
|             result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') | ||||
|                 + '>'; | ||||
|           } | ||||
|  | ||||
|           /** | ||||
|            * @param {Node} node | ||||
|            */ | ||||
|           function close(node) { | ||||
|             result += '</' + tag(node) + '>'; | ||||
|           } | ||||
|  | ||||
|           /** | ||||
|            * @param {Event} event | ||||
|            */ | ||||
|           function render(event) { | ||||
|             (event.event === 'start' ? open : close)(event.node); | ||||
|           } | ||||
|  | ||||
|           while (original.length || highlighted.length) { | ||||
|             let stream = selectStream(); | ||||
|             result += escapeHTML(value.substring(processed, stream[0].offset)); | ||||
|             processed = stream[0].offset; | ||||
|             if (stream === original) { | ||||
|               /* | ||||
|               On any opening or closing tag of the original markup we first close | ||||
|               the entire highlighted node stack, then render the original tag along | ||||
|               with all the following original tags at the same offset and then | ||||
|               reopen all the tags on the highlighted stack. | ||||
|               */ | ||||
|               nodeStack.reverse().forEach(close); | ||||
|               do { | ||||
|                 render(stream.splice(0, 1)[0]); | ||||
|                 stream = selectStream(); | ||||
|               } while (stream === original && stream.length && stream[0].offset === processed); | ||||
|               nodeStack.reverse().forEach(open); | ||||
|             } else { | ||||
|               if (stream[0].event === 'start') { | ||||
|                 nodeStack.push(stream[0].node); | ||||
|               } else { | ||||
|                 nodeStack.pop(); | ||||
|               } | ||||
|               render(stream.splice(0, 1)[0]); | ||||
|             } | ||||
|           } | ||||
|           return result + escapeHTML(value.substr(processed)); | ||||
|         } | ||||
|  | ||||
|         return mergeHTMLPlugin; | ||||
|  | ||||
|       }()); | ||||
|  | ||||
|       hljs.addPlugin(mergeHTMLPlugin); | ||||
|  | ||||
|       function init() { | ||||
|         // Make sure that only plain text is pasted | ||||
|         configurePastingInElement("jsonBlock"); | ||||
|          | ||||
|       } | ||||
|     </script> | ||||
| ======= | ||||
| >>>>>>> master | ||||
|   </body> | ||||
| </html> | ||||
|   | ||||
| @@ -42,35 +42,6 @@ | ||||
|             <div class="tool-context"> | ||||
|                 <div> | ||||
|                     <h1>MockedServices</h1> | ||||
| <<<<<<< HEAD:Backend/mocked-services/src/main/resources/static/html/mock.html | ||||
|                 </div> | ||||
|                 <div> | ||||
|                     <label for="uuid-input" class="block-display">UUID</label> | ||||
|                     <div id="uuid-edit"> | ||||
|                         <div id="uuid-edit-field" class="bordered-field disabled"> | ||||
|                             <input id="uuid-input" disabled onfocusout="changeUUID(this);" value="UUID" /> | ||||
|                             <button onclick="copyUUIDToClipboard();" class="uuid-inputField-icon modification-button flex-item btn-copy action-button">  | ||||
|                                 <span class="material-icons uuid-inputField-icon-span ">content_copy</span>  | ||||
|                             </button> | ||||
|                         </div> | ||||
|                         <div id="editableBlock"> | ||||
|                             <input type="checkbox" onchange="changeEditionOfUUID(this)" name="editable" id="editable" value="false"/> | ||||
|                             <label for="editable">Editable</label> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                      | ||||
|                     <div class="hiddable" id="uuid-validation-strategy"> | ||||
|                         <label><b>UUID generation strategy:</b></label> | ||||
|                          | ||||
|                         <input type="radio" checked name="uuid-validation-type" value="new" id="generateNew"/> | ||||
|                         <label for="generateNew">Generate new UUID</label> | ||||
|                          | ||||
|                         <input type="radio" name="uuid-validation-type" value="restore" id="restore"/> | ||||
|                         <label for="restore">Restore previous UUID</label> | ||||
|                     </div> | ||||
|  | ||||
| ======= | ||||
| >>>>>>> master:Frontend/tools/mock.html | ||||
|                 </div> | ||||
|                 <div> | ||||
|                     <!-- h2 --> | ||||
| @@ -254,13 +225,7 @@ | ||||
|         </div> | ||||
|         <div class="body">You haven't saved your message!<br> Do you want to save it?</div> | ||||
|         <div class="function"> | ||||
| <<<<<<< HEAD:Backend/mocked-services/src/main/resources/static/html/mock.html | ||||
|  | ||||
|                 <button type = "button" onclick = "updateData()" value = "Display">Save</button> | ||||
|  | ||||
| ======= | ||||
|                 <button type = "button" onclick = "updateData()" value = "Display">Save</button> | ||||
| >>>>>>> master:Frontend/tools/mock.html | ||||
|             <button>No</button> | ||||
|         </div> | ||||
|     </div> | ||||
|   | ||||
| @@ -5,14 +5,9 @@ | ||||
|         <!-- <link rel="stylesheet" href="styles.css"> --> | ||||
|         <link rel="stylesheet" href="../assets/css/tools/r11form.css"> | ||||
|         <link rel="stylesheet" href="../assets/css/highlight.css"> | ||||
| <<<<<<< HEAD | ||||
|         <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/common/hljs.min.js"></script> | ||||
|         <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|         <script src="../assets/scripts/tools/xmlFormatter.js"></script> | ||||
| >>>>>>> master | ||||
|         <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|         <script>hljs.highlightAll();</script> | ||||
|  | ||||
|   | ||||
| @@ -5,10 +5,7 @@ | ||||
|     <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> | ||||
| <<<<<<< HEAD | ||||
| ======= | ||||
|     <script src="../assets/scripts/tools/xpath.js"></script> | ||||
| >>>>>>> master | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
| @@ -17119,159 +17116,6 @@ | ||||
|  | ||||
|     </div> | ||||
|  | ||||
| <<<<<<< HEAD | ||||
|     <script> | ||||
|         function processVersionSelector() { | ||||
|             var processor = getProcessor(); | ||||
|             var hideableOptions = document.getElementsByClassName("hideable"); | ||||
|             for (let i = 0; i < hideableOptions.length; i++) { | ||||
|                 hideableOptions[i].style = "display: none;"; | ||||
|             } | ||||
|             if (processor == "xalan" || processor == "libxml") { | ||||
|                 var xalanOptions = document.getElementsByClassName("xalan"); | ||||
|                 for (let i = 0; i < xalanOptions.length; i++) { | ||||
|                     xalanOptions[i].style = ""; | ||||
|                 } | ||||
|                 document.getElementById("versions").selectedIndex = 0; | ||||
|             } | ||||
|             else { | ||||
|                 var saxonOptions = document.getElementsByClassName("saxon"); | ||||
|                 for (let i = 0; i < saxonOptions.length; i++) { | ||||
|                     saxonOptions[i].style = ""; | ||||
|                 } | ||||
|                 document.getElementById("versions").selectedIndex = 3; | ||||
|  | ||||
|             } | ||||
|             processTooltip(); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         function processTooltip() { | ||||
|             var filter = "collapse" + getVersion(); | ||||
|             var collList; | ||||
|  | ||||
|  | ||||
|             if (filter == "collapse3.0") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XPath 3.0 functions"; | ||||
|                 hideList(document.getElementsByName("collapse10")); | ||||
|                 hideList(document.getElementsByName("collapse20")); | ||||
|                 showList(document.getElementsByName("collapse30")); | ||||
|                 hideList(document.getElementsByName("collapse31")); | ||||
|  | ||||
|             } else if (filter == "collapse3.1") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XPath 3.1 functions"; | ||||
|                 hideList(document.getElementsByName("collapse10")); | ||||
|                 hideList(document.getElementsByName("collapse20")); | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|                 showList(document.getElementsByName("collapse31")); | ||||
|             } else if (filter == "collapse2.0") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XPath 2.0 functions"; | ||||
|                 hideList(document.getElementsByName("collapse10")); | ||||
|                 showList(document.getElementsByName("collapse20")); | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|                 hideList(document.getElementsByName("collapse31")); | ||||
|             } else { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XPath 1.0 functions"; | ||||
|                 showList(document.getElementsByName("collapse10")); | ||||
|                 hideList(document.getElementsByName("collapse20")); | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|                 hideList(document.getElementsByName("collapse31")); | ||||
|  | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         var triggerList = document.getElementsByClassName("collapseTrigger"); | ||||
|         for (i = 0; i < triggerList.length; i++) { | ||||
|  | ||||
|             triggerList[i].addEventListener("click", function () { | ||||
|                 var collapsible = this.parentElement; | ||||
|                 if (this.tagName == "A") { | ||||
|                     var collapsibleData = this.nextElementSibling; | ||||
|                 } else { | ||||
|                     var collapsibleData = this.parentElement.nextElementSibling; | ||||
|  | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 if (collapsibleData.style.maxHeight > "0px") { | ||||
|                     collapsibleData.style.maxHeight = "0px"; | ||||
|  | ||||
|                     this.classList.toggle("active", false); | ||||
|                     if (!this.classList.contains("collapsibleMini")) { | ||||
|                         collapsible.classList.toggle("active", false); | ||||
|                     } | ||||
|  | ||||
|                     var subLists1 = collapsibleData.getElementsByClassName("content"); | ||||
|                     var subLists2 = collapsibleData.getElementsByClassName("active"); | ||||
|                     for (j = 0; j < subLists1.length; j++) { | ||||
|                         subLists1[j].style.maxHeight = "0px"; | ||||
|                     } | ||||
|                     for (j = 0; j < subLists2.length; j++) { | ||||
|                         subLists2[j].classList.toggle("active", false); | ||||
|                     } | ||||
|                 } else { | ||||
|                     collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px"; | ||||
|  | ||||
|                     this.classList.toggle("active", true); | ||||
|                     if (!this.classList.contains("collapsibleMini")) { | ||||
|                         collapsible.classList.toggle("active", true); | ||||
|                     } else { | ||||
|                         var parentContent = this.closest(".content"); | ||||
|                         parentContent.style.maxHeight = (parentContent.scrollHeight + collapsibleData.scrollHeight) + "px"; | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         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 XPath expression here'); | ||||
|  | ||||
|             processVersionSelector(); | ||||
|             processTooltip(); | ||||
|             tool.addEventListener('change', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID == "processors") { | ||||
|                     processVersionSelector(); | ||||
|                     processTooltip(); | ||||
|                 } | ||||
|                 else if (targetID == "versions") { | ||||
|                     processTooltip(); | ||||
|                 } | ||||
|  | ||||
|  | ||||
|             }) | ||||
|             tool.addEventListener('click', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID !== "xmlArea" && targetID !== "transformArea") { | ||||
|                     return; | ||||
|                 } | ||||
|                 processTooltip(); | ||||
|  | ||||
|             }) | ||||
|             tool.addEventListener('change', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID !== "xmlArea" && targetID !== "transformArea") { | ||||
|                     return; | ||||
|                 } | ||||
|                 processTooltip(); | ||||
|             }) | ||||
|         } | ||||
|  | ||||
|          | ||||
|      | ||||
|     </script> | ||||
|  | ||||
| ======= | ||||
| >>>>>>> master | ||||
| </body> | ||||
|  | ||||
| </html> | ||||
| @@ -6,10 +6,7 @@ | ||||
|     <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> | ||||
| <<<<<<< HEAD | ||||
| ======= | ||||
|     <script src="../assets/scripts/tools/xsd.js"></script> | ||||
| >>>>>>> master | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
| @@ -83,48 +80,6 @@ | ||||
|  | ||||
|     </div> | ||||
|  | ||||
| <<<<<<< HEAD | ||||
|     <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'); | ||||
|              | ||||
|             // refreshTooltip(); | ||||
|             processTooltip(); | ||||
|             tool.addEventListener('click', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID !== "processors" && targetID !== "xmlArea" && targetID !== "transformArea" && targetID !== "versions") { | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 processTooltip(); | ||||
|                  | ||||
|             }) | ||||
|         } | ||||
|  | ||||
|         function processTooltip() { | ||||
|  | ||||
|             if (getProcessor() == "xalan") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions"; | ||||
|                 document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0"; | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|             } else { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0, 2.0 & 3.0 functions"; | ||||
|                 document.getElementById("processorTooltipInfo").innerText = "Supports XSLT up to 3.0"; | ||||
|                 showList(document.getElementsByName("collapse30")); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|     </script> | ||||
|  | ||||
| ======= | ||||
| >>>>>>> master | ||||
| </body> | ||||
|  | ||||
| </html> | ||||
| @@ -6,10 +6,7 @@ | ||||
|     <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> | ||||
| <<<<<<< HEAD | ||||
| ======= | ||||
|     <script src="../assets/scripts/tools/xslt.js"></script> | ||||
| >>>>>>> master | ||||
|     <script src="../assets/scripts/tools/scripts.js"></script> | ||||
|     <script src="../assets/scripts/tools/highlight.js"></script> | ||||
|     <script>hljs.highlightAll();</script> | ||||
| @@ -1151,96 +1148,6 @@ | ||||
|  | ||||
|     </div> | ||||
|  | ||||
| <<<<<<< HEAD | ||||
|     <script> | ||||
|         function processTooltip() { | ||||
|  | ||||
|             if (getProcessor() == "xalan" || getProcessor() == "libxml") { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions"; | ||||
|                 document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0"; | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|             } else { | ||||
|                 document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0, 2.0 & 3.0 functions"; | ||||
|                 document.getElementById("processorTooltipInfo").innerText = "Supports XSLT up to 3.0"; | ||||
|                 showList(document.getElementsByName("collapse30")); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         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") { | ||||
|                     collapsibleData.style.maxHeight = "0px"; | ||||
|  | ||||
|                     this.classList.toggle("active", false); | ||||
|                     if (!this.classList.contains("collapsibleMini")) { | ||||
|                         collapsible.classList.toggle("active", false); | ||||
|                     } | ||||
|  | ||||
|                     var subLists1 = collapsibleData.getElementsByClassName("content"); | ||||
|                     var subLists2 = collapsibleData.getElementsByClassName("active"); | ||||
|                     for (j = 0; j < subLists1.length; j++) { | ||||
|                         subLists1[j].style.maxHeight = "0px"; | ||||
|                     } | ||||
|                     for (j = 0; j < subLists2.length; j++) { | ||||
|                         subLists2[j].classList.toggle("active", false); | ||||
|                     } | ||||
|                 } else { | ||||
|                     collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px"; | ||||
|  | ||||
|                     this.classList.toggle("active", true); | ||||
|                     if (!this.classList.contains("collapsibleMini")) { | ||||
|                         collapsible.classList.toggle("active", true); | ||||
|                     } else { | ||||
|                         var parentContent = this.closest(".content"); | ||||
|                         parentContent.style.maxHeight = (parentContent.scrollHeight + collapsibleData.scrollHeight) + "px"; | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         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 => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID !== "processors" && targetID !== "xmlArea" && targetID !== "transformArea" && targetID !== "versions") { | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 processTooltip(); | ||||
|             }) | ||||
|  | ||||
|             tool.addEventListener('change', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
|                 if (targetID !== "processors") { | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 processTooltip(); | ||||
|                  | ||||
|             }) | ||||
|              | ||||
|         } | ||||
|          | ||||
|     </script> | ||||
|  | ||||
| ======= | ||||
| >>>>>>> master | ||||
| </body> | ||||
|  | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user