aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Closset <cc697w@intl.att.com>2017-10-12 07:43:01 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-12 07:43:01 +0000
commit988cf497fa276db67016fe804776005114c1b04c (patch)
tree70033b87ef71d90e9015818a0e07f65dd0cf8be0
parent993331539bbe8d2e2190c9dd7caf277872246236 (diff)
parent5fce1d5e1eaaccdd4fb219d7b370bee9af5b66e5 (diff)
Merge "Inverted patch commited"
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js87
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) {