retrieve_row for util.list is responsible for calling on_retrieve to finish mapping...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 27 Dec 2005 11:24:49 +0000 (11:24 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 27 Dec 2005 11:24:49 +0000 (11:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2530 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/list.js
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/search_result.js

index 7f0caf3..0e77634 100644 (file)
@@ -133,6 +133,13 @@ util.list.prototype = {
                                        treerow.setAttribute('retrieve_id',params.retrieve_id);
                                        //FIXME//Make async and fire when row is visible in list
                                        var row;
+
+                                       params.row_node = treeitem;
+                                       params.on_retrieve = function(row) {
+                                               params.row = row;
+                                               obj._map_row_to_treecell(params,treerow);
+                                       }
+
                                        if (typeof params.retrieve_row == 'function') {
 
                                                row = params.retrieve_row( params );
@@ -145,8 +152,6 @@ util.list.prototype = {
 
                                                }
                                        }
-                                       params.row = row;
-                                       obj._map_row_to_treecell(params,treerow);
                                }, 0
                        );
                } else {
@@ -176,6 +181,14 @@ util.list.prototype = {
                                        listitem.setAttribute('retrieve_id',params.retrieve_id);
                                        //FIXME//Make async and fire when row is visible in list
                                        var row;
+
+                                       params.row_node = listitem;
+                                       params.on_retrieve = function(row) {
+                                               params.row = row;
+                                               obj._map_row_to_treecell(params,treerow);
+                                               obj.node.appendChild( listitem );
+                                       }
+
                                        if (typeof params.retrieve_row == 'function') {
 
                                                row = params.retrieve_row( params );
@@ -188,9 +201,6 @@ util.list.prototype = {
 
                                                }
                                        }
-                                       params.row = row;
-                                       obj._map_row_to_listcell(params,listitem);
-                                       obj.node.appendChild( listitem );
                                }, 0
                        );
                } else {
index 054378a..d364d0b 100644 (file)
@@ -55,6 +55,9 @@ patron.holds.prototype = {
                                        } catch(E) {
                                                obj.error.sdump('D_ERROR','retrieve_row: ' + E );
                                        }
+                                       if (typeof params.on_retrieve == 'function') {
+                                               params.on_retrieve(row);
+                                       }
                                         return row;
                                }
                        }
index 62a7b49..560efd6 100644 (file)
@@ -45,7 +45,9 @@ patron.search_result.prototype = {
                                        var row = params.row;
                                        if (typeof row.my == 'undefined') row.my = {};
                                        row.my.au = au_obj;
-
+                                       if (typeof params.on_retrieve == 'function') {
+                                               params.on_retrieve(row);
+                                       }
                                        return row;
                                },
                                'on_select' : function(ev) {