From c7d0cff300bf1823f85e4ea91d5374487017c37f Mon Sep 17 00:00:00 2001 From: Ziad-I <68874104+Ziad-I@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:01:09 +0300 Subject: [PATCH] edit or commented left over console.log --- .../bim/data/webui/static/js/drawings.js | 15 +++++++------ .../bonsai/bim/data/webui/static/js/gantt.js | 21 ++++++++++--------- .../bonsai/bim/data/webui/static/js/index.js | 14 ++++++------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/bonsai/bonsai/bim/data/webui/static/js/drawings.js b/src/bonsai/bonsai/bim/data/webui/static/js/drawings.js index fa23d335c4..0d02810c11 100644 --- a/src/bonsai/bonsai/bim/data/webui/static/js/drawings.js +++ b/src/bonsai/bonsai/bim/data/webui/static/js/drawings.js @@ -46,7 +46,7 @@ function handleWebConnect() { // Function to handle 'blender_connect' event function handleBlenderConnect(blenderId) { - console.log("blender_connect: ", blenderId); + console.log("blender connected: ", blenderId); if (!connectedClients.hasOwnProperty(blenderId)) { connectedClients[blenderId] = { shown: false, @@ -77,7 +77,7 @@ function handleDefaultData(data) { // Function to handle 'blender_disconnect' event function handleBlenderDisconnect(blenderId) { - console.log("blender_disconnect: ", blenderId); + console.log("blender disconnected: ", blenderId); if (connectedClients.hasOwnProperty(blenderId)) { delete connectedClients[blenderId]; removeSelectOption(blenderId); @@ -90,7 +90,7 @@ function handleBlenderDisconnect(blenderId) { function handleConnectedClients(data) { $("#blender-count").text(data.length); - console.log(data); + // console.log(data); data.forEach(function (id) { connectedClients[id] = { shown: false, @@ -101,7 +101,7 @@ function handleConnectedClients(data) { } function handleThemeData(themeData) { - console.log(themeData); + // console.log(themeData); function arrayToRgbString(arr) { const [r, g, b, a] = arr.map((num) => Math.round(num * 255)); @@ -145,7 +145,7 @@ function handleDrawingsData(data) { const hasDrawings = drawings.length > 0 || sheets.length > 0; - console.log(connectedClients); + // console.log(connectedClients); if (connectedClients.hasOwnProperty(blenderId)) { if (!connectedClients[blenderId].shown) { @@ -203,11 +203,10 @@ function addSelectOption(blenderId, filename) { function updateSelectOption(blenderId, filename) { $("#blender-" + blenderId).text(filename); - console.log(blenderId, filename); + // console.log(blenderId, filename); console.log($("#dropdown-menu").val()); if ($("#dropdown-menu").val() === filename) { - console.log("here"); displayDrawingsNames(blenderId, filename); } } @@ -253,7 +252,7 @@ function displayDrawingsNames(blenderId, ifcFile) { const msg = { path: path, }; - console.log(msg); + // console.log(msg); socket.emit("get_svg", msg); $("li").removeClass("selected-svg"); diff --git a/src/bonsai/bonsai/bim/data/webui/static/js/gantt.js b/src/bonsai/bonsai/bim/data/webui/static/js/gantt.js index 9c81bf4791..864feaef4e 100644 --- a/src/bonsai/bonsai/bim/data/webui/static/js/gantt.js +++ b/src/bonsai/bonsai/bim/data/webui/static/js/gantt.js @@ -47,7 +47,7 @@ function connectSocket() { // Function to handle 'blender_connect' event function handleBlenderConnect(blenderId) { - console.log("blender_connect: ", blenderId); + console.log("blender connected: ", blenderId); if (!connectedClients.hasOwnProperty(blenderId)) { connectedClients[blenderId] = { shown: false, @@ -63,7 +63,7 @@ function handleBlenderConnect(blenderId) { // Function to handle 'blender_disconnect' event function handleBlenderDisconnect(blenderId) { - console.log("blender_disconnect: ", blenderId); + console.log("blender disconnected: ", blenderId); if (connectedClients.hasOwnProperty(blenderId)) { delete connectedClients[blenderId]; removeGanttElement(blenderId); @@ -76,7 +76,7 @@ function handleBlenderDisconnect(blenderId) { function handleConnectedClients(data) { $("#blender-count").text(data.length); - console.log(data); + // console.log(data); data.forEach(function (id) { connectedClients[id] = { shown: false, @@ -87,7 +87,7 @@ function handleConnectedClients(data) { } function handleThemeData(themeData) { - console.log(themeData); + // console.log(themeData); function arrayToRgbString(arr) { const [r, g, b, a] = arr.map((num) => Math.round(num * 255)); @@ -385,12 +385,12 @@ function generateTooltip(task) { // Event handlers for editing gantt table data function editValue(list, task, event, cell, column) { - console.log("editValue function called with the following parameters:"); - console.log("list:", list); - console.log("task:", task); - console.log("event:", event); - console.log("cell:", cell); - console.log("column:", column); + // console.log("editValue function called with the following parameters:"); + // console.log("list:", list); + // console.log("task:", task); + // console.log("event:", event); + // console.log("cell:", cell); + // console.log("column:", column); const ganttId = task.getGantt()["vDiv"].id; const index = ganttId.indexOf("-") + 1; @@ -413,6 +413,7 @@ function editValue(list, task, event, cell, column) { value: event.target.value, }, }; + console.log("web operator: " + msg); socket.emit("web_operator", msg); } diff --git a/src/bonsai/bonsai/bim/data/webui/static/js/index.js b/src/bonsai/bonsai/bim/data/webui/static/js/index.js index bf8f89ea3a..ef54f5fcb7 100644 --- a/src/bonsai/bonsai/bim/data/webui/static/js/index.js +++ b/src/bonsai/bonsai/bim/data/webui/static/js/index.js @@ -33,7 +33,7 @@ function connectSocket() { // Function to handle 'blender_connect' event function handleBlenderConnect(blenderId) { - console.log("blender_connect: ", blenderId); + console.log("blender connected: ", blenderId); if (!connectedClients.hasOwnProperty(blenderId)) { connectedClients[blenderId] = { shown: false, ifc_file: "" }; } @@ -45,7 +45,7 @@ function handleBlenderConnect(blenderId) { // Function to handle 'blender_disconnect' event function handleBlenderDisconnect(blenderId) { - console.log("blender_disconnect: ", blenderId); + console.log("blender disconnected: ", blenderId); if (connectedClients.hasOwnProperty(blenderId)) { delete connectedClients[blenderId]; removeTableElement(blenderId); @@ -58,14 +58,14 @@ function handleBlenderDisconnect(blenderId) { function handleConnectedClients(data) { $("#blender-count").text(data.length); - console.log(data); + // console.log(data); data.forEach(function (id) { connectedClients[id] = { shown: false, ifc_file: "" }; }); } function handleThemeData(themeData) { - console.log(themeData); + // console.log(themeData); function arrayToRgbString(arr) { const [r, g, b, a] = arr.map((num) => Math.round(num * 255)); @@ -141,7 +141,7 @@ function addTableElement(blenderId, csvData, filename) { const csvHeaders = csvData.substring(0, firstLine).split(","); connectedClients[blenderId].headers = csvHeaders; - console.log(connectedClients[blenderId]); + // console.log(connectedClients[blenderId]); const tableContainer = $("
") .addClass("table-container") .attr("id", "container-" + blenderId); @@ -188,8 +188,8 @@ function addTableElement(blenderId, csvData, filename) { // Toggle current column visibility column.visible = !column.visible; - console.log(column.title, column.visible); - // Change menu item checkbox + // console.log(column.title, column.visible); + if (column.visible) { table.showColumn(column.title); checkbox.textContent = "\u2611"; // ☑