diff options
author | Jannik Schönartz | 2018-03-13 17:22:06 +0100 |
---|---|---|
committer | Jannik Schönartz | 2018-03-13 17:22:06 +0100 |
commit | 514e59e06f2ee1122d3b913c7ae0819cd80ba3d1 (patch) | |
tree | b4b268386a4c8f89ba6002fa179677a2ac827e56 /modules-available/usblockoff/templates/usb-rules-config.html | |
parent | [usb-lock-off] Better selection color for the add device table. Some warning ... (diff) | |
parent | [usb-lock-off] drag n drop now with color to show where the item will be droped (diff) | |
download | slx-admin-514e59e06f2ee1122d3b913c7ae0819cd80ba3d1.tar.gz slx-admin-514e59e06f2ee1122d3b913c7ae0819cd80ba3d1.tar.xz slx-admin-514e59e06f2ee1122d3b913c7ae0819cd80ba3d1.zip |
Merge branch 'usb-lock-off' into usb-lock-off
Diffstat (limited to 'modules-available/usblockoff/templates/usb-rules-config.html')
-rw-r--r-- | modules-available/usblockoff/templates/usb-rules-config.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules-available/usblockoff/templates/usb-rules-config.html b/modules-available/usblockoff/templates/usb-rules-config.html index 56dd1ae2..15c7a2f7 100644 --- a/modules-available/usblockoff/templates/usb-rules-config.html +++ b/modules-available/usblockoff/templates/usb-rules-config.html @@ -79,10 +79,13 @@ handle: '.drag-handler', start: function(evt, ui) { oldIndex = ui.item.index(); + ui.placeholder.css("visibility", "visible"); + ui.placeholder.css("opacity", "0.152"); + ui.placeholder.css("background-color", "LawnGreen"); }, stop: function(evt, ui) { updateTable(ui.item.index()); - }, + } }); $('a.overload').tooltip({placement: "auto", html: true}); @@ -92,7 +95,7 @@ // Called after a drag & drop event is finished. function updateTable(new_index) { var old_i = -1; - if (oldIndex == -1) { + if (oldIndex === -1) { return; } else { old_i = oldIndex; @@ -101,7 +104,6 @@ var rule = rules[old_i]; rules.splice(old_i, 1); rules.splice(new_index, 0, rule); - console.log(JSON.stringify(rules)); $('#rules').val(JSON.stringify(rules)); } </script>
\ No newline at end of file |