From 4dfbb4a0dcb9db7313946828308f961051f398f7 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 30 Aug 2022 13:17:58 +0200 Subject: [PATCH] js unique identifiers fix --- .../static/js/main_inventory.build.js | 31 ------------------- ereuse_devicehub/static/js/main_inventory.js | 31 ------------------- 2 files changed, 62 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.build.js b/ereuse_devicehub/static/js/main_inventory.build.js index 7737a44c..0ae433c1 100644 --- a/ereuse_devicehub/static/js/main_inventory.build.js +++ b/ereuse_devicehub/static/js/main_inventory.build.js @@ -178,8 +178,6 @@ function deviceSelect() { $("#addingLotModal .btn-primary").hide(); $("#removeLotModal .pol").show(); $("#removeLotModal .btn-primary").hide(); - $("#addingTagModal .pol").show(); - $("#addingTagModal .btn-primary").hide(); $("#actionModal .pol").show(); $("#actionModal .btn-primary").hide(); $("#allocateModal .pol").show(); @@ -197,8 +195,6 @@ function deviceSelect() { $("#allocateModal .btn-primary").show(); $("#datawipeModal .pol").hide(); $("#datawipeModal .btn-primary").show(); - $("#addingTagModal .pol").hide(); - $("#addingTagModal .btn-primary").show(); } } @@ -214,33 +210,6 @@ function removeLot() { $("#activeRemoveLotModal").click(); } -function removeTag() { - const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr('data')); - - if (devices_id.length == 1) { - const url = "/inventory/tag/devices/".concat(devices_id[0], "/del/"); - window.location.href = url; - } else { - $("#unlinkTagAlertModal").click(); - } -} - -function addTag() { - const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr('data')); - - if (devices_id.length == 1) { - $("#addingTagModal .pol").hide(); - $("#addingTagModal .btn-primary").show(); - } else { - $("#addingTagModal .pol").show(); - $("#addingTagModal .btn-primary").hide(); - } - - $("#addTagAlertModal").click(); -} - function select_shift() { const chkboxes = $('.deviceSelect'); var lastChecked = null; diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index d80d6c66..061c82e0 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -163,9 +163,6 @@ function deviceSelect() { $("#removeLotModal .pol").show(); $("#removeLotModal .btn-primary").hide(); - $("#addingTagModal .pol").show(); - $("#addingTagModal .btn-primary").hide(); - $("#actionModal .pol").show(); $("#actionModal .btn-primary").hide(); @@ -189,9 +186,6 @@ function deviceSelect() { $("#datawipeModal .pol").hide(); $("#datawipeModal .btn-primary").show(); - - $("#addingTagModal .pol").hide(); - $("#addingTagModal .btn-primary").show(); } } @@ -205,31 +199,6 @@ function removeLot() { $("#activeRemoveLotModal").click(); } -function removeTag() { - const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr("data")); - if (devices_id.length == 1) { - const url = `/inventory/tag/devices/${devices_id[0]}/del/`; - window.location.href = url; - } else { - $("#unlinkTagAlertModal").click(); - } -} - -function addTag() { - const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr("data")); - if (devices_id.length == 1) { - $("#addingTagModal .pol").hide(); - $("#addingTagModal .btn-primary").show(); - } else { - $("#addingTagModal .pol").show(); - $("#addingTagModal .btn-primary").hide(); - } - - $("#addTagAlertModal").click(); -} - function select_shift() { const chkboxes = $(".deviceSelect"); let lastChecked = null;