Checking for 'twisty' leads to false negatives in Serial Control
authorDan Wells <dbw2@calvin.edu>
Thu, 26 May 2011 14:53:42 +0000 (10:53 -0400)
committerDan Wells <dbw2@calvin.edu>
Thu, 26 May 2011 14:53:42 +0000 (10:53 -0400)
Since a tree can be opened with a double-click, we can't rely on 'twisty'
being set to load the child data.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/xul/staff_client/server/serial/manage_dists.js
Open-ILS/xul/staff_client/server/serial/manage_subs.js

index c1a5df0..9e02c1f 100644 (file)
@@ -647,12 +647,10 @@ serial.manage_dists.prototype = {
             if (!sel_lists[row_type]) sel_lists[row_type] = [];
             sel_lists[row_type].push(id);
 
-            if (twisty) {
-                switch(row_type) {
-                    case 'aou' : obj.on_click_aou(id,twisty); break;
-                    case 'sdist' : obj.on_select_sdist(id,twisty); break;
-                    default: break;
-                }
+            switch(row_type) {
+                case 'aou' : obj.on_click_aou(id,twisty); break;
+                case 'sdist' : obj.on_select_sdist(id,twisty); break;
+                default: break;
             }
         }
 
index 2ce4184..628ebbe 100644 (file)
@@ -1117,12 +1117,10 @@ serial.manage_subs.prototype = {
             if (!sel_lists[row_type]) sel_lists[row_type] = [];
             sel_lists[row_type].push(id);
 
-            if (twisty) {
-                switch(row_type) {
-                    case 'aou' : obj.on_click_aou(id,twisty); break;
-                    case 'ssub' : obj.on_select_ssub(id,twisty); break;
-                    default: break;
-                }
+            switch(row_type) {
+                case 'aou' : obj.on_click_aou(id,twisty); break;
+                case 'ssub' : obj.on_select_ssub(id,twisty); break;
+                default: break;
             }
         }