diff options
author | Anaël Closson <ac2550@intl.att.com> | 2017-10-09 14:01:27 +0200 |
---|---|---|
committer | Anaël Closson <ac2550@intl.att.com> | 2017-10-09 14:01:27 +0200 |
commit | 5fce1d5e1eaaccdd4fb219d7b370bee9af5b66e5 (patch) | |
tree | 7a99b646f2e1ad80dc1e9280e34d73789cb767cd /src | |
parent | 433d254989ecef089586db6b20da1a68891b6e4d (diff) |
Inverted patch commited
The previous patch on this file has been commited
with a not up to date codebase and previously made
changes were overwritten.
Change-Id: I0731a4a228e8bbdff46c09dee757d076eebcc799
Issue-ID: CLAMP-54
Signed-off-by: Anaël Closson <ac2550@intl.att.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js | 87 |
1 files changed, 31 insertions, 56 deletions
diff --git a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js index 89807d627..01a39b62d 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js +++ b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js @@ -112,62 +112,37 @@ function loadPropertyWindow(type) { } function setMultiSelect() { - $("select").each(function(index, mySelect) { - if ($(mySelect).parents(".multiselect-native-select") && - $(mySelect).parents(".multiselect-native-select").length < 1) { - if (!$(mySelect).attr("multiple")) { - if ($(mySelect).attr("enableFilter")) { - $(mySelect).multiselect({ - numberDisplayed: 1, - maxHeight: 200 - }); - } else { - $(mySelect).multiselect({ - numberDisplayed: 1, - enableFiltering: true, - maxHeight: 200 - }); - } - - } else { - $(mySelect).multiselect({ - numberDisplayed: 1, - includeSelectAllOption: true, - enableFiltering: true, - maxHeight: 200, - enableCaseInsensitiveFiltering: true - }); - } - - } else if ($(mySelect).parents(".multiselect-native-select") && - $(mySelect).parents(".multiselect-native-select").length > 0) { - var selectDrop = $(mySelect).parent(".multiselect-native-select").find("select"); - $(mySelect).parent(".multiselect-native-select").parent().html(selectDrop); - if (!$(mySelect).attr("multiple")) { - if ($(mySelect).attr("enableFilter")) { - $(mySelect).multiselect({ - numberDisplayed: 1, - maxHeight: 200 - }); - } else { - $(mySelect).multiselect({ - numberDisplayed: 1, - enableFiltering: true, - maxHeight: 200 - }); - } - } else { - $(mySelect).multiselect({ - numberDisplayed: 1, - includeSelectAllOption: true, - enableFiltering: true, - maxHeight: 200, - enableCaseInsensitiveFiltering: true - }); - } - } - }); - //refeshMultiSelect(); + $("select").each(function(index, mySelect) { + + var mySelectObj = $(mySelect); + if (! mySelectObj.parents(".multiselect-native-select")) { + // keep native for this one + return; + } + + if (mySelectObj.parents(".multiselect-native-select").length > 0) { + var selectDrop = mySelectObj.parent(".multiselect-native-select").find("select"); + mySelectObj.parent(".multiselect-native-select").parent().html(selectDrop); + } + + var options = { + numberDisplayed: 1, + maxHeight: 200 + }; + + if (mySelectObj.attr("multiple") + && mySelectObj.attr("multiple") != 'false') { + options.includeSelectAllOption = true; + } + + if (mySelectObj.attr("enableFilter") + && mySelectObj.attr("enableFilter") != 'false') { + options.enableCaseInsensitiveFiltering = true; + options.enableFiltering = true; + } + + mySelectObj.multiselect(options); + }); } function loadSharedPropertyByService(onChangeUUID, refresh, callBack) { |