summaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2021-08-27 16:11:39 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2021-08-27 17:28:40 -0400
commitdb784313b8ba29f5d4396c1cc96bb5f3c853677f (patch)
treef26c260919b39751747ad64e87b1a7932c222046 /gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js
parentbcca60b3c9e50e93a0f309905049ddbbf45768ef (diff)
Fix sonar issues in policy/gui
Issue-ID: POLICY-3077 Change-Id: Idcd08427cbff2cfdd8ba99db7cf32a0f5c978415 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js')
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js
index 3657fd4..d18b38e 100644
--- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,11 +61,11 @@ function dropdownList_filter(optionDiv, optionUl) {
ul = document.getElementById(optionDiv + "_options_list_ul");
var lis = ul.querySelectorAll("#" + ul.id + " > li"); // get li direct
// child elements
- for (var i = 0; i < lis.length; i++) {
- if (lis[i].innerHTML.toUpperCase().indexOf(filter) > -1) {
- lis[i].style.display = "";
+ for (let value of lis) {
+ if (value.innerHTML.toUpperCase().indexOf(filter) > -1) {
+ value.style.display = "";
} else {
- lis[i].style.display = "none";
+ value.style.display = "none";
}
}
}
@@ -123,8 +124,8 @@ function dropdownList_ChangeOptions(dropdownListDIV, options, selected, disabled
// that
// are
// divs
- for (var d = 0; d < subdivs.length; d++) {
- retdiv.removeChild(subdivs[d]);
+ for (let value of subdivs) {
+ retdiv.removeChild(value);
}
var onselect = null;
if (retdiv["_dropDownList_listener"]) {