summaryrefslogtreecommitdiffstats
path: root/modules-available/permissionmanager/templates
diff options
context:
space:
mode:
authorUdo Walter2017-03-29 11:30:15 +0200
committerUdo Walter2017-03-29 11:30:15 +0200
commitf430266adc72bf73e3ac4ceee915d1377c3869ab (patch)
tree07a8c78c304f672b601e017e38f7d4fa59371b16 /modules-available/permissionmanager/templates
parent[permission-manager] changed module id to module name (diff)
downloadslx-admin-f430266adc72bf73e3ac4ceee915d1377c3869ab.tar.gz
slx-admin-f430266adc72bf73e3ac4ceee915d1377c3869ab.tar.xz
slx-admin-f430266adc72bf73e3ac4ceee915d1377c3869ab.zip
[permission-manager] changed include/exclude to all/selected
Diffstat (limited to 'modules-available/permissionmanager/templates')
-rw-r--r--modules-available/permissionmanager/templates/roleEditor.html26
1 files changed, 17 insertions, 9 deletions
diff --git a/modules-available/permissionmanager/templates/roleEditor.html b/modules-available/permissionmanager/templates/roleEditor.html
index 99cf3053..98d87b70 100644
--- a/modules-available/permissionmanager/templates/roleEditor.html
+++ b/modules-available/permissionmanager/templates/roleEditor.html
@@ -13,9 +13,9 @@
<div class="row">
<div class="col-md-3">
<b style="line-height: 34px">Locations:</b>
- <div class="pull-right"><input name="include" {{includeChecked}} type="checkbox" id="locSwitch"></div>
+ <div class="pull-right"><input name="allLocations" {{allLocChecked}} type="checkbox" id="allLocations"></div>
</div>
- <div class="col-md-9 text-left">
+ <div id="selectize-container" class="col-md-9 text-left {{selectizeClass}}">
<select multiple name="locations[]" id="select-location">
<option value></option>
{{#locations}}
@@ -55,13 +55,21 @@
plugins: [ "remove_button" ]
});
- var locSwitch = $("#locSwitch");
- locSwitch.bootstrapSwitch("size", "normal");
- locSwitch.bootstrapSwitch("labelWidth", 1);
- locSwitch.bootstrapSwitch("onText", "include");
- locSwitch.bootstrapSwitch("offText", "exclude");
- locSwitch.bootstrapSwitch("onColor", "success");
- locSwitch.bootstrapSwitch("offColor", "danger");
+ var allLocations = $("#allLocations");
+ allLocations.bootstrapSwitch("size", "normal");
+ allLocations.bootstrapSwitch("labelWidth", 1);
+ allLocations.bootstrapSwitch("onText", "all");
+ allLocations.bootstrapSwitch("offText", "selected");
+ allLocations.bootstrapSwitch("onColor", "default");
+ allLocations.bootstrapSwitch("offColor", "primary");
+
+ allLocations.on('switchChange.bootstrapSwitch', function(event, state) {
+ if (state) {
+ $("#selectize-container").addClass("disabled");
+ } else {
+ $("#selectize-container").removeClass("disabled");
+ }
+ });
$("form input").keydown(function(e) {
if (e.keyCode === 13) e.preventDefault();