There would be more than one list in the same page, so looking for all
the selected options may cause problems.
Fix that to only get the immediate children of the list widget.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/wok.list.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/wok.list.js b/ui/js/src/wok.list.js
index 1d4e526..a92db19 100644
--- a/ui/js/src/wok.list.js
+++ b/ui/js/src/wok.list.js
@@ -173,7 +173,7 @@ wok.widget.List.prototype = (function() {
},function(event) {
var grid = event.data.grid;
grid.selectedIndex = [];
- $("li :checkbox:checked", this.bodyContainer).map(function() {
+ $("li > :checkbox:checked",
this.bodyContainer).map(function() {
return $(this).parent().index();
}).each(function() {
grid.selectedIndex.push(this);
--
2.7.4