summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
authorJannik Schönartz2018-03-13 17:22:06 +0100
committerJannik Schönartz2018-03-13 17:22:06 +0100
commit514e59e06f2ee1122d3b913c7ae0819cd80ba3d1 (patch)
treeb4b268386a4c8f89ba6002fa179677a2ac827e56 /modules-available
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)
downloadslx-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')
-rw-r--r--modules-available/usblockoff/templates/usb-edit-config.html7
-rw-r--r--modules-available/usblockoff/templates/usb-rules-config.html8
2 files changed, 6 insertions, 9 deletions
diff --git a/modules-available/usblockoff/templates/usb-edit-config.html b/modules-available/usblockoff/templates/usb-edit-config.html
index 8e75b96d..694101d4 100644
--- a/modules-available/usblockoff/templates/usb-edit-config.html
+++ b/modules-available/usblockoff/templates/usb-edit-config.html
@@ -11,7 +11,7 @@
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
- <label>{{lang_configName}}</label>
+ <label for="configName">{{lang_configName}}</label>
</div>
<div class="col-sm-7">
<input required class="form-control" name="configName" id="configName" maxlength="50" value="{{configName}}">
@@ -47,11 +47,6 @@
</div>
<div class="pull-right">
- <!-- TODO: Reset Button should't call loadConfig instead do not reset the select input... but how? -->
- <button class="btn btn-warning" type="reset" onclick="location.reload();">
- <!-- TODO: Add discardChanges to the main-> globalVariables -->
- <span class="glyphicon glyphicon-refresh"></span> {{lang_discardChanges}}
- </button>
<a href="?do=usblockoff" class="btn btn-default">Cancel</a>
<button type="submit" id="configFormButton" class="btn btn-primary">
<span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}
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