From eeaf298adb3436fcf8dd7fac46d8d0de4b923fc8 Mon Sep 17 00:00:00 2001 From: Stipe Varnica Date: Tue, 25 Jun 2024 10:08:40 +0200 Subject: [PATCH] Code refactoring --- TEMPEST/tempest-devel | 1 - index.html | 12 +----------- javascript/filesHandling.js | 8 ++++---- javascript/index.js | 10 +++------- node_modules/.package-lock.json | 2 +- package-lock.json | 2 +- 6 files changed, 10 insertions(+), 25 deletions(-) delete mode 160000 TEMPEST/tempest-devel diff --git a/TEMPEST/tempest-devel b/TEMPEST/tempest-devel deleted file mode 160000 index 8da3234..0000000 --- a/TEMPEST/tempest-devel +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8da32343531799e827816124932063a28e9c885b diff --git a/index.html b/index.html index 97ee00d..263a327 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@ +
@@ -186,16 +187,6 @@
- -

Upload a file

@@ -280,7 +271,6 @@ > - diff --git a/javascript/filesHandling.js b/javascript/filesHandling.js index 1eb52e2..ba60148 100644 --- a/javascript/filesHandling.js +++ b/javascript/filesHandling.js @@ -99,14 +99,14 @@ document.addEventListener("DOMContentLoaded", function () { return textFile; }; - var download = document.getElementById("downloadFirstEditor"); - var download2 = document.getElementById("downloadSpecifications"); + var downloadEditorText = document.getElementById("downloadFirstEditor"); + var downloadSpecifications = document.getElementById("downloadSpecifications"); var input1 = editor; var input2 = editor2; // Add an event listener to the button for the click event - download.addEventListener("click", function () { + downloadEditorText.addEventListener("click", function () { // Check if the editor is empty if (!editor.getValue()) { Toastify({ @@ -137,7 +137,7 @@ document.addEventListener("DOMContentLoaded", function () { } }); - download2.addEventListener("click", function () { + downloadSpecifications.addEventListener("click", function () { if (!editor2.getValue()) { Toastify({ text: "Specifications field empty", diff --git a/javascript/index.js b/javascript/index.js index def584b..dde1e16 100644 --- a/javascript/index.js +++ b/javascript/index.js @@ -15,13 +15,7 @@ var editor2 = CodeMirror.fromTextArea(input2, { lineNumbers: true, }); document.addEventListener("DOMContentLoaded", function () { - // var input = document.createElement("input"); - // input.type = "file"; - // input.classList.add("customInput", "col-3"); - // input.setAttribute("id", "fileInputEditor"); - // const position = { line: 1, ch: 2 }; - - // editor.addWidget(position, input, false); + //Run function document.getElementById("runBtn").addEventListener("click", function () { @@ -69,6 +63,8 @@ function graphFunction(svg) { graph = svg; } + + function getActiveTabContent() { var activeTabId = document.querySelector(".rightNav.active").id; switch (activeTabId) { diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index a6e59e9..5dc7729 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,5 +1,5 @@ { - "name": "Internship", + "name": "testingwasm_new", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package-lock.json b/package-lock.json index 4068fde..5c6eb91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "Internship", + "name": "testingwasm_new", "lockfileVersion": 3, "requires": true, "packages": {