[Kimchi-devel] [PATCH] [Wok] Fix Ginger Base issue #122: Get immediate children while looking for selected options

Aline Manera alinefm at linux.vnet.ibm.com
Mon Oct 17 16:48:59 UTC 2016


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 at 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




More information about the Kimchi-devel mailing list