Moved scripts from .html files to seperate js .files #191
@@ -146,7 +146,13 @@ const mergeHTMLPlugin = (function () {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is executed after the page is loaded.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name init
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// Make sure that only plain text is pasted
|
// Make sure that only plain text is pasted
|
||||||
configurePastingInElement("jsonBlock");
|
configurePastingInElement("jsonBlock");
|
||||||
|
|||||||
@@ -1,11 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* This function is executed after the page is loaded.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name init
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
|
function init() {
|
||||||
|
configurePastingInElement("xmlArea");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function returns processor that will be used to transform XML.
|
||||||
|
* This solution allows to use one function for sending request from every tool
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name getProcessor
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function getProcessor() {
|
function getProcessor() {
|
||||||
return "libxml";
|
return "libxml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function returns version of XML processor that will be used to transform XML.
|
||||||
|
* This solution allows to use one function for sending request from every tool
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name getVersion
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function getVersion() {
|
function getVersion() {
|
||||||
return "1.0"
|
return "1.0"
|
||||||
}
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
configurePastingInElement("xmlArea");
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,13 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* The `processVersionSelector()` function is responsible for updating the display of the web page
|
||||||
|
* based on the selected processor and version.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name processVersionSelector
|
||||||
|
* @kind function
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
function processVersionSelector() {
|
function processVersionSelector() {
|
||||||
var processor = getProcessor();
|
var processor = getProcessor();
|
||||||
var hideableOptions = document.getElementsByClassName("hideable");
|
var hideableOptions = document.getElementsByClassName("hideable");
|
||||||
@@ -24,6 +33,15 @@ function processVersionSelector() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
|
||||||
|
* It shows or hides different sections of the tooltip based on the selected version.
|
||||||
|
* It also handles the click event on the form and updates the tooltip accordingly.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name processTooltip
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function processTooltip() {
|
function processTooltip() {
|
||||||
var filter = "collapse" + getVersion();
|
var filter = "collapse" + getVersion();
|
||||||
var collList;
|
var collList;
|
||||||
@@ -58,49 +76,15 @@ function processTooltip() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 function is executed after the page is loaded.
|
||||||
|
*
|
||||||
this.classList.toggle("active", false);
|
* @function
|
||||||
if (!this.classList.contains("collapsibleMini")) {
|
* @name init
|
||||||
collapsible.classList.toggle("active", false);
|
* @kind function
|
||||||
}
|
*/
|
||||||
|
|
||||||
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() {
|
function init() {
|
||||||
|
|
||||||
// Make sure that only plain text is pasted
|
// Make sure that only plain text is pasted
|
||||||
@@ -143,5 +127,48 @@ function init() {
|
|||||||
}
|
}
|
||||||
processTooltip();
|
processTooltip();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* This function is executed after the page is loaded.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name init
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// Make sure that only plain text is pasted
|
// Make sure that only plain text is pasted
|
||||||
configurePastingInElement("xmlArea");
|
configurePastingInElement("xmlArea");
|
||||||
@@ -21,6 +28,15 @@ function init() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
|
||||||
|
* It shows or hides different sections of the tooltip based on the selected version.
|
||||||
|
* It also handles the click event on the form and updates the tooltip accordingly.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name processTooltip
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function processTooltip() {
|
function processTooltip() {
|
||||||
|
|
||||||
if (getProcessor() == "xalan") {
|
if (getProcessor() == "xalan") {
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
|
||||||
|
* It shows or hides different sections of the tooltip based on the selected version.
|
||||||
|
* It also handles the click event on the form and updates the tooltip accordingly.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name processTooltip
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function processTooltip() {
|
function processTooltip() {
|
||||||
|
|
||||||
if (getProcessor() == "xalan" || getProcessor() == "libxml") {
|
if (getProcessor() == "xalan" || getProcessor() == "libxml") {
|
||||||
@@ -48,6 +57,14 @@ for (i = 0; i < triggerList.length; i++) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is executed after the page is loaded.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name init
|
||||||
|
* @kind function
|
||||||
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// Make sure that only plain text is pasted
|
// Make sure that only plain text is pasted
|
||||||
configurePastingInElement("xmlArea");
|
configurePastingInElement("xmlArea");
|
||||||
|
|||||||
Reference in New Issue
Block a user