[open-ils-commits] [GIT] Evergreen ILS branch master updated. a01c7230dd455189b791c258a13f36c77cacbaaf

Evergreen Git git at git.evergreen-ils.org
Mon Mar 19 10:00:30 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a01c7230dd455189b791c258a13f36c77cacbaaf (commit)
       via  ef48c844c7927ea07a65ad281cd673c17f363810 (commit)
       via  066b233768746a03a2bccd03c3a81ed6f9e877d4 (commit)
       via  2c440e2190d0e8f5d2a5b172f77d41069838b4fb (commit)
       via  e1eb6f80360cd58f677c0ccb07f6790d88749081 (commit)
      from  3f290283b3384e8a72223aa0ad314cd588978222 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a01c7230dd455189b791c258a13f36c77cacbaaf
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Mar 15 13:54:02 2012 -0400

    AutoGrid line number CSS application cleanup
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
index ba789e1..0faa3ee 100644
--- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
+++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
@@ -30,17 +30,6 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             lineNumberWidth : '1.5',
             showColumnPicker : false,
             columnPickerPrefix : null,
-            onStyleRow : function(row) {
-                // FIXME: this really feels kludgy (sensitive to how dojo constructs the HTML), and is
-                // probably not idiomatic dojo
-                if (!this.hideLineNumber) {
-                    if (this.hideSelector) {
-                        dojo.addClass(row.node.firstChild.firstChild.firstChild.childNodes[0],'autoGridLineNumber');
-                    } else {
-                        dojo.addClass(row.node.firstChild.firstChild.firstChild.childNodes[1],'autoGridLineNumber');
-                    }
-                }
-            },
             displayLimit : 15,
             displayOffset : 0,
             requiredFields : null,
@@ -51,6 +40,14 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             /* by default, don't show auto-generated (sequence) fields */
             showSequenceFields : false, 
 
+            // style the cells in the line number column
+            onStyleRow : function(row) {
+                if (!this.hideLineNumber) {
+                    var cellIdx = this.hideSelector ? 0 : 1;
+                    dojo.addClass(this.views.views[0].getCellNode(row.index, cellIdx), 'autoGridLineNumber');
+                }
+            },
+
             startup : function() {
                 this.selectionMode = 'single';
                 this.sequence = openils.widget.AutoGrid.sequence++;

commit ef48c844c7927ea07a65ad281cd673c17f363810
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Mar 14 02:52:49 2012 -0400

    add Line# column to autogrid
    
    hidden by default, but we need to make it show up in autogrid's column picker
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/css/skin/default.css b/Open-ILS/web/css/skin/default.css
index 1973b49..2098329 100644
--- a/Open-ILS/web/css/skin/default.css
+++ b/Open-ILS/web/css/skin/default.css
@@ -75,6 +75,10 @@ table { border-collapse: collapse; }
 .dijitTooltipTable td {padding: 3px;} /* custom class for handling dialog tables */
 /* ----------------------------------------------------------------- */
 
+.autoGridLineNumber {
+    background-color: -moz-dialog;
+    font-weight: bold;
+}
 
 .oils-fm-edit-pane { margin: 5px; }
 .oils-fm-edit-pane td { padding: 5px; }
diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
index 921f977..ba789e1 100644
--- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
+++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
@@ -25,9 +25,22 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             suppressEditFields : null,
             suppressFilterFields : null,
             hideSelector : false,
+            hideLineNumber : false,
             selectorWidth : '1.5',
+            lineNumberWidth : '1.5',
             showColumnPicker : false,
             columnPickerPrefix : null,
+            onStyleRow : function(row) {
+                // FIXME: this really feels kludgy (sensitive to how dojo constructs the HTML), and is
+                // probably not idiomatic dojo
+                if (!this.hideLineNumber) {
+                    if (this.hideSelector) {
+                        dojo.addClass(row.node.firstChild.firstChild.firstChild.childNodes[0],'autoGridLineNumber');
+                    } else {
+                        dojo.addClass(row.node.firstChild.firstChild.firstChild.childNodes[1],'autoGridLineNumber');
+                    }
+                }
+            },
             displayLimit : 15,
             displayOffset : 0,
             requiredFields : null,
@@ -156,6 +169,10 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             canSort : function(rowIdx) {
                 if(rowIdx == 1 && !this.hideSelector)
                     return false;
+                if(this.hideSelector && rowIdx == 1 && !this.hideLineNumber)
+                    return false;
+                if(!this.hideSelector && rowIdx == 2 && !this.hideLineNumber)
+                    return false;
                 return true;
             },
 
@@ -189,6 +206,16 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                     });
                 }
 
+                if(!this.hideLineNumber) {
+                    // insert the line number column
+                    pushEntry({
+                        field : '+lineno',
+                        get : function(rowIdx, item) { if(item) return 1 + rowIdx; },
+                        width : this.lineNumberWidth,
+                        name : '#',
+                        nonSelectable : false
+                    });
+                }
 
                 if(!this.fieldOrder) {
                     /* no order defined, start with any explicit grid fields */

commit 066b233768746a03a2bccd03c3a81ed6f9e877d4
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Mar 14 00:03:07 2012 -0400

    make ordinal column work in Holdings Maintenance
    
    brute force kludge
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
index 880183b..d60a119 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
@@ -1565,6 +1565,7 @@ cat.copy_browser.prototype = {
                 data.node = obj.map_tree[ 'aou_' + parent_org.id() ];
             }
             var nparams = obj.list.append(data);
+            obj.list.refresh_ordinals();
             var node = nparams.treeitem_node;
             if (params) {
                 for (var i in params) {
@@ -1631,6 +1632,7 @@ cat.copy_browser.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
+            obj.list.refresh_ordinals();
             var node = nparams.treeitem_node;
             obj.map_tree[ 'acn_' + acn_tree.id() ] =  node;
             if (params) {
@@ -1692,6 +1694,7 @@ cat.copy_browser.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
+            obj.list.refresh_ordinals();
             var node = nparams.treeitem_node;
             obj.map_tree[ 'acp_' + acp_item.id() ] =  node;
             if (params) {
@@ -1821,6 +1824,7 @@ cat.copy_browser.prototype = {
                                 if (typeof params.on_retrieve == 'function') {
                                     params.on_retrieve(row);
                                 }
+                                obj.list.refresh_ordinals();
 
                             }
                         );
@@ -1840,6 +1844,7 @@ cat.copy_browser.prototype = {
                         if (typeof window.xulG == 'object' && typeof window.xulG.on_select == 'function') {
                             window.xulG.on_select(list);
                         }
+                        obj.list.refresh_ordinals();
                     },
                     'on_dblclick' : function(ev) {
                         JSAN.use('util.functional');
@@ -1852,6 +1857,7 @@ cat.copy_browser.prototype = {
                         );
                         obj.toggle_actions();
                         util.widgets.dispatch('command','cmd_edit_items');
+                        obj.list.refresh_ordinals();
                     },
                     'on_select' : function(ev) {
                         JSAN.use('util.functional');
@@ -1868,6 +1874,7 @@ cat.copy_browser.prototype = {
                         if (typeof window.xulG == 'object' && typeof window.xulG.on_select == 'function') {
                             window.xulG.on_select(obj.sel_list);
                         }
+                        obj.list.refresh_ordinals();
                     },
                 }
             );

commit 2c440e2190d0e8f5d2a5b172f77d41069838b4fb
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Mon Mar 12 16:06:51 2012 -0400

    adds a Line# column to all xul lists
    
    displays the ordinal position of the row
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index 1a270c8..6dcc359 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -51,7 +51,23 @@ util.list.prototype = {
         if (typeof params.prebuilt != 'undefined') obj.prebuilt = params.prebuilt;
 
         if (typeof params.columns == 'undefined') throw('util.list.init: No columns');
-        obj.columns = [];
+        obj.columns = [
+            {
+                'id' : 'lineno',
+                'label' : document.getElementById('offlineStrings').getString('list.line_number'),
+                'flex' : '0',
+                'no_sort' : 'true',
+                'properties' : 'ordinal', // column properties for css styling
+                'hidden' : 'false',
+                'editable' : false,
+                'render' : function(my,scratch) {
+                    // special code will handle this based on the attribute we set
+                    // here.  All cells for this column need to be updated whenever
+                    // a list adds, removes, or sorts rows
+                    return '_';
+                }
+            }
+        ];
         for (var i = 0; i < params.columns.length; i++) {
             if (typeof params.columns[i] == 'object') {
                 obj.columns.push( params.columns[i] );
@@ -611,7 +627,7 @@ util.list.prototype = {
             } catch(E) {
             }
 
-        setTimeout( function() { obj.auto_retrieve(); }, 0 );
+        setTimeout( function() { obj.auto_retrieve(); obj.refresh_ordinals(); }, 0 );
 
         params.treeitem_node = treeitem;
         return params;
@@ -773,7 +789,7 @@ util.list.prototype = {
             } catch(E) {
             }
 
-        setTimeout( function() { obj.auto_retrieve(); }, 0 );
+        setTimeout( function() { obj.auto_retrieve(); obj.refresh_ordinals(); }, 0 );
 
         JSAN.use('util.widgets'); util.widgets.dispatch('select',obj.node);
 
@@ -782,6 +798,37 @@ util.list.prototype = {
         return params;
     },
 
+    'refresh_ordinals' : function() {
+        var obj = this;
+        try {
+            setTimeout( // Otherwise we can miss a row just added
+                function() {
+                    var nl = document.getElementsByAttribute('label','_');
+                    for (var i = 0; i < nl.length; i++) {
+                        nl[i].setAttribute(
+                            'ord_col',
+                            'true'
+                        );
+                        nl[i].setAttribute( // treecell properties for css styling
+                            'properties',
+                            'ordinal'
+                        );
+                    }
+                    nl = document.getElementsByAttribute('ord_col','true');
+                    for (var i = 0; i < nl.length; i++) {
+                        nl[i].setAttribute(
+                            'label',
+                            // we could just use 'i' here if we trust the order of elements
+                            1 + obj.node.contentView.getIndexOfItem(nl[i].parentNode.parentNode) // treeitem
+                        );
+                    }
+                }, 1000
+            );
+        } catch(E) {
+            alert('Error in list.js, refresh_ordinals(): ' + E);
+        }
+    },
+
     'put_retrieving_label' : function(treerow) {
         var obj = this;
         try {
@@ -1512,7 +1559,7 @@ util.list.prototype = {
     '_sort_tree' : function(col,sortDir) {
         var obj = this;
         try {
-            if (obj.node.getAttribute('no_sort')) {
+            if (obj.node.getAttribute('no_sort') || col.getAttribute('no_sort')) {
                 return;
             }
             var col_pos;
@@ -1592,6 +1639,7 @@ util.list.prototype = {
                     } catch(E) {
                         obj.error.standard_unexpected_error_alert('sorting',E); 
                     }
+                    obj.refresh_ordinals();
                 }
             );
         } catch(E) {
diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
index eaef490..71485fc 100644
--- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
+++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
@@ -224,6 +224,7 @@ list.actions.csv_to_file.accesskey=F
 list.actions.save_column_configuration.label=Save Column Configuration
 list.actions.save_column_configuration.accesskey=S
 list.dump_extended_format.record_separator==-=-=
+list.line_number=#
 menu.cmd_survey_wizard.inadequate_perm=You are lacking the CREATE_SURVEY permission and/or working locations.
 menu.cmd_local_admin_fonts_and_sounds.tab=Global Font and Sound Settings
 menu.cmd_local_admin_printer.tab=Printer Settings Editor
diff --git a/Open-ILS/xul/staff_client/server/skin/global.css b/Open-ILS/xul/staff_client/server/skin/global.css
index 1c9da3e..ee08b6c 100644
--- a/Open-ILS/xul/staff_client/server/skin/global.css
+++ b/Open-ILS/xul/staff_client/server/skin/global.css
@@ -19,6 +19,13 @@ treechildren::-moz-tree-row(selected) {
     border: thin dashed lightblue ! important;
 }
 
+treechildren::-moz-tree-column(ordinal) {
+    background: -moz-dialog ! important;
+}
+
+treechildren::-moz-tree-cell-text(ordinal) {
+    font-weight: bold ! important;
+}
 /*
 treechildren::-moz-tree-cell-text(selected,focus) {
     color: black;

commit e1eb6f80360cd58f677c0ccb07f6790d88749081
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Mon Mar 12 15:39:20 2012 -0400

    row_node vs my_node in util.list
    
    Both of these should be holding the same xul treeitems, and I don't recall
    wanting different names here, so I'm renaming both to treeitem_node.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index 605bc44..1a270c8 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -407,14 +407,14 @@ util.list.prototype = {
         }
         if (rparams && params.attributes) {
             for (var i in params.attributes) {
-                rparams.my_node.setAttribute(i,params.attributes[i]);
+                rparams.treeitem_node.setAttribute(i,params.attributes[i]);
             }
         }
         this.row_count.total++;
         if (this.row_count.fleshed == this.row_count.total) {
             setTimeout( function() { obj.exec_on_all_fleshed(); }, 0 );
         }
-        rparams.my_node.setAttribute('unique_row_counter',obj.unique_row_counter);
+        rparams.treeitem_node.setAttribute('unique_row_counter',obj.unique_row_counter);
         rparams.unique_row_counter = obj.unique_row_counter++;
         if (typeof params.on_append == 'function') {
             params.on_append(rparams);
@@ -431,7 +431,7 @@ util.list.prototype = {
         }
         if (rparams && params.attributes) {
             for (var i in params.attributes) {
-                rparams.my_node.setAttribute(i,params.attributes[i]);
+                rparams.treeitem_node.setAttribute(i,params.attributes[i]);
             }
         }
         this.row_count.fleshed--;
@@ -524,13 +524,13 @@ util.list.prototype = {
                         }
                     }
 
-                    params.row_node = treeitem;
+                    params.treeitem_node = treeitem;
                     params.on_retrieve = function(p) {
                         try {
                             p.row = params.row;
                             obj._map_row_to_treecell(p,treerow);
                             inc_fleshed();
-                            var idx = obj.node.contentView.getIndexOfItem( params.row_node );
+                            var idx = obj.node.contentView.getIndexOfItem( params.treeitem_node );
                             dump('idx = ' + idx + '\n');
                             // if current row is selected, send another select event to re-sync data that the client code fetches on selects
                             if ( obj.node.view.selection.isSelected( idx ) ) {
@@ -613,7 +613,7 @@ util.list.prototype = {
 
         setTimeout( function() { obj.auto_retrieve(); }, 0 );
 
-        params.my_node = treeitem;
+        params.treeitem_node = treeitem;
         return params;
     },
 
@@ -622,12 +622,12 @@ util.list.prototype = {
         var obj = this;
 
         if (typeof params.row == 'undefined') throw('util.list.refresh_row: Object must contain a row');
-        if (typeof params.my_node == 'undefined') throw('util.list.refresh_row: Object must contain a my_node');
-        if (params.my_node.nodeName != 'treeitem') throw('util.list.refresh_rwo: my_node must be a treeitem');
+        if (typeof params.treeitem_node == 'undefined') throw('util.list.refresh_row: Object must contain a treeitem_node');
+        if (params.treeitem_node.nodeName != 'treeitem') throw('util.list.refresh_rwo: treeitem_node must be a treeitem');
 
         var s = ('util.list.refresh_row: params = ' + (params) + '\n');
 
-        var treeitem = params.my_node;
+        var treeitem = params.treeitem_node;
         treeitem.setAttribute('retrieve_id',params.retrieve_id);
         if (typeof params.to_bottom != 'undefined') {
             if (typeof params.no_auto_select == 'undefined') {
@@ -684,13 +684,13 @@ util.list.prototype = {
                         }
                     }
 
-                    params.row_node = treeitem;
+                    params.treeitem_node = treeitem;
                     params.on_retrieve = function(p) {
                         try {
                             p.row = params.row;
                             obj._map_row_to_treecell(p,treerow);
                             inc_fleshed();
-                            var idx = obj.node.contentView.getIndexOfItem( params.row_node );
+                            var idx = obj.node.contentView.getIndexOfItem( params.treeitem_node );
                             dump('idx = ' + idx + '\n');
                             // if current row is selected, send another select event to re-sync data that the client code fetches on selects
                             if ( obj.node.view.selection.isSelected( idx ) ) {
@@ -967,7 +967,7 @@ util.list.prototype = {
                     //FIXME//Make async and fire when row is visible in list
                     var row;
 
-                    params.row_node = listitem;
+                    params.treeitem_node = listitem;
                     params.on_retrieve = function(row) {
                         params.row = row;
                         obj._map_row_to_listcell(params,listitem);
@@ -995,7 +995,7 @@ util.list.prototype = {
         }
 
         this.error.sdump('D_LIST',s);
-        params.my_node = listitem;
+        params.treeitem_node = listitem;
         return params;
 
     },
diff --git a/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js b/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js
index 5a0f15f..3694f65 100644
--- a/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js
+++ b/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js
@@ -109,7 +109,7 @@ function init_list() {
 }
 
 function retrieve_row(params) { // callback function for fleshing rows in a list
-    params.row_node.setAttribute('retrieve_id',params.row.my.au.id()); 
+    params.treeitem_node.setAttribute('retrieve_id',params.row.my.au.id()); 
     params.on_retrieve(params.row); 
     return params.row; 
 }
diff --git a/Open-ILS/xul/staff_client/server/admin/transit_list.js b/Open-ILS/xul/staff_client/server/admin/transit_list.js
index 4024ec1..2d841ce 100644
--- a/Open-ILS/xul/staff_client/server/admin/transit_list.js
+++ b/Open-ILS/xul/staff_client/server/admin/transit_list.js
@@ -339,7 +339,7 @@ admin.transit_list.prototype = {
                                                 if (typeof r_mvr.ilsevent != 'undefined') throw(r_mvr);
                                                 row.my.mvr = r_mvr;
 
-                                                params.row_node.setAttribute(
+                                                params.treeitem_node.setAttribute(
                                                     'retrieve_id', js2JSON( { 
                                                         'copy_id' : row.my.acp ? row.my.acp.id() : null, 
                                                         'doc_id' : row.my.mvr ? row.my.mvr.doc_id() : null,  
@@ -359,7 +359,7 @@ admin.transit_list.prototype = {
                                         }
                                     );
                                 } else {
-                                    params.row_node.setAttribute(
+                                    params.treeitem_node.setAttribute(
                                         'retrieve_id', js2JSON( { 
                                             'copy_id' : row.my.acp ? row.my.acp.id() : null, 
                                             'doc_id' : row.my.mvr ? row.my.mvr.doc_id() : null,  
diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
index ce3c578..880183b 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
@@ -1565,7 +1565,7 @@ cat.copy_browser.prototype = {
                 data.node = obj.map_tree[ 'aou_' + parent_org.id() ];
             }
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             if (params) {
                 for (var i in params) {
                     node.setAttribute(i,params[i]);
@@ -1631,7 +1631,7 @@ cat.copy_browser.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ 'acn_' + acn_tree.id() ] =  node;
             if (params) {
                 for (var i in params) {
@@ -1692,7 +1692,7 @@ cat.copy_browser.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ 'acp_' + acp_item.id() ] =  node;
             if (params) {
                 for (var i in params) {
@@ -1807,12 +1807,12 @@ cat.copy_browser.prototype = {
                                         [ row.my.circ.target_copy() ]
                                     );
 
-                                    params.row_node.setAttribute( 'retrieve_id',row.my.acp.barcode() );
+                                    params.treeitem_node.setAttribute( 'retrieve_id',row.my.acp.barcode() );
 
                                 }
                             );
                         } else {
-                            params.row_node.setAttribute( 'retrieve_id',row.my.acp.barcode() );
+                            params.treeitem_node.setAttribute( 'retrieve_id',row.my.acp.barcode() );
                         }
                     */
                         obj.funcs.push(
diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
index 74fd2bf..47a9a28 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
@@ -57,7 +57,7 @@ cat.copy_buckets.prototype = {
                         row.my.acn = blob.volume;
                         row.my.ahr = blob.hold;
                         row.my.circ = blob.circ;
-                        params.row_node.setAttribute('retrieve_id', js2JSON( [ blob.copy.id(), blob.copy.barcode(), row.my.bucket_item_id ] ));
+                        params.treeitem_node.setAttribute('retrieve_id', js2JSON( [ blob.copy.id(), blob.copy.barcode(), row.my.bucket_item_id ] ));
                         if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); }
 
                     } catch(E) {
diff --git a/Open-ILS/xul/staff_client/server/cat/manage_multi_home_items.js b/Open-ILS/xul/staff_client/server/cat/manage_multi_home_items.js
index 518b665..04df58d 100644
--- a/Open-ILS/xul/staff_client/server/cat/manage_multi_home_items.js
+++ b/Open-ILS/xul/staff_client/server/cat/manage_multi_home_items.js
@@ -97,7 +97,7 @@ function init_list() {
             {
                 'retrieve_row' : function(params) {
                     if (params.row.my.bpbcm) {
-                        params.row_node.setAttribute('retrieve_id',params.row.my.bpbcm.id());
+                        params.treeitem_node.setAttribute('retrieve_id',params.row.my.bpbcm.id());
                     }
                     params.on_retrieve(params.row);
                     return params.row;
@@ -178,7 +178,7 @@ function handle_submit(create,my_bpbcm,my_barcode) {
         };
 
         if (barcode && rows[barcode]) {
-                var node = rows[barcode].my_node;
+                var node = rows[barcode].treeitem_node;
                 var parentNode = node.parentNode;
                 parentNode.removeChild( node );
                 delete(rows[barcode]);
@@ -400,7 +400,7 @@ function handle_remove() {
                             for (var i = 0; i < ids.length; i++) {
                                 var bpbcm_id = ids[i];
                                 try {
-                                    var node = rows[ bpbcm_barcode_map[ bpbcm_id ] ].my_node;
+                                    var node = rows[ bpbcm_barcode_map[ bpbcm_id ] ].treeitem_node;
                                     var parentNode = node.parentNode;
                                     parentNode.removeChild( node );
                                     delete(rows[ bpbcm_barcode_map[ bpbcm_id ] ]);
diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js
index a7da8d7..688f269 100644
--- a/Open-ILS/xul/staff_client/server/cat/z3950.js
+++ b/Open-ILS/xul/staff_client/server/cat/z3950.js
@@ -718,21 +718,21 @@ cat.z3950.prototype = {
                                 }
                             }
                         );
-                        n.my_node.setAttribute('isbn', function(a){return a;}(obj.result_set[ obj.number_of_result_sets ].records[j].mvr).isbn());
-                        n.my_node.setAttribute(
+                        n.treeitem_node.setAttribute('isbn', function(a){return a;}(obj.result_set[ obj.number_of_result_sets ].records[j].mvr).isbn());
+                        n.treeitem_node.setAttribute(
                             'service',
                             function(a){return a;}(
                                 results[i].service
                             )
                         );
-                        n.my_node.setAttribute(
+                        n.treeitem_node.setAttribute(
                             'doc_id',
                             function(a){return a;}(
                                 (obj.result_set[ obj.number_of_result_sets ].records[j].mvr)
                             ).doc_id()
                         );
 
-                        if (!f) { n.my_node.parentNode.focus(); f = n; } 
+                        if (!f) { n.treeitem_node.parentNode.focus(); f = n; } 
                     }
                 } else {
                     x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js
index 6605700..d628861 100644
--- a/Open-ILS/xul/staff_client/server/circ/checkin.js
+++ b/Open-ILS/xul/staff_client/server/circ/checkin.js
@@ -508,7 +508,7 @@ circ.checkin.prototype = {
             try {
                 var row = params.row;
                 if (typeof params.on_retrieve == 'function') params.on_retrieve(row);
-                obj.update_no_change_label(params.my_node,row);
+                obj.update_no_change_label(params.treeitem_node,row);
                 var bill = row.my.mbts;
                 if (bill && document.getElementById('fine_tally') && ! row.already_tallied) {
                     params.row.already_tallied = true;
diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js
index c1fbbe4..af1c9b1 100644
--- a/Open-ILS/xul/staff_client/server/circ/copy_status.js
+++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js
@@ -1246,7 +1246,7 @@ circ.copy_status.prototype = {
                                     if (typeof obj.list_copyid_map[details.copy.id()][i] == 'undefined') {
                                         obj.list.append(params);
                                     } else {
-                                        params.my_node = obj.list_copyid_map[details.copy.id()][i].my_node;
+                                        params.treeitem_node = obj.list_copyid_map[details.copy.id()][i].treeitem_node;
                                         obj.list.refresh_row(params);
                                     }
                                 }
diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js
index 567dffb..5b98508 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.js
@@ -547,13 +547,13 @@ function init_lists() {
                 function handle_props(row) {
                     try {
                         if ( row && row.my && row.my.mbts && Number( row.my.mbts.balance_owed() ) < 0 ) {
-                            util.widgets.addProperty(params.row_node.firstChild,'refundable');
-                            util.widgets.addProperty(params.row_node.firstChild.childNodes[ g.payment_pending_column_idx ],'refundable');
+                            util.widgets.addProperty(params.treeitem_node.firstChild,'refundable');
+                            util.widgets.addProperty(params.treeitem_node.firstChild.childNodes[ g.payment_pending_column_idx ],'refundable');
                         }
                         if ( row && row.my && row.my.circ && ! row.my.circ.checkin_time() ) {
                             $('circulating_hint').hidden = false;
-                            util.widgets.addProperty(params.row_node.firstChild,'circulating');
-                            util.widgets.addProperty(params.row_node.firstChild.childNodes[ g.title_column_idx ],'circulating');
+                            util.widgets.addProperty(params.treeitem_node.firstChild,'circulating');
+                            util.widgets.addProperty(params.treeitem_node.firstChild.childNodes[ g.title_column_idx ],'circulating');
                         }
                     } catch(E) {
                         g.error.sdump('D_WARN','Error setting list properties in bill2.js: ' + E);
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
index ccee8c9..28f2cf7 100644
--- a/Open-ILS/xul/staff_client/server/patron/holds.js
+++ b/Open-ILS/xul/staff_client/server/patron/holds.js
@@ -126,7 +126,7 @@ patron.holds.prototype = {
                                     }
 
                                     obj.holds_map[ row.my.ahr.id() ] = blob;
-                                    params.row_node.setAttribute('retrieve_id',
+                                    params.treeitem_node.setAttribute('retrieve_id',
                                         js2JSON({
                                             'copy_id':copy_id,
                                             'barcode':row.my.acp ? row.my.acp.barcode() : null,
diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js
index cf9394c..ee7215e 100644
--- a/Open-ILS/xul/staff_client/server/patron/items.js
+++ b/Open-ILS/xul/staff_client/server/patron/items.js
@@ -745,7 +745,7 @@ patron.items.prototype = {
                                         if (typeof robj.copy == 'object' && robj.copy != null) copy_id = robj.copy.id();
                                 }
                                 
-                                params.row_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
+                                params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
             
                                 if (typeof params.on_retrieve == 'function') {
                                     params.on_retrieve(row);
@@ -767,7 +767,7 @@ patron.items.prototype = {
                             if (typeof row.my.acp == 'object' && row.my.acp != null) copy_id = row.my.acp.id();
                     }
  
-                    params.row_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':row.my.acp.id(),'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': (row.my.record ? row.my.record.id() : null) }) );
+                    params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':row.my.acp.id(),'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': (row.my.record ? row.my.record.id() : null) }) );
                     if (typeof params.on_retrieve == 'function') {
                         params.on_retrieve(row);
                     }
@@ -834,7 +834,7 @@ patron.items.prototype = {
         try {
             var nparams = obj.list_circ_map[circ_id];
             if (move_to_bottom_list) { 
-                obj.list_circ_map[circ_id].my_node.setAttribute('hidden','true');
+                obj.list_circ_map[circ_id].treeitem_node.setAttribute('hidden','true');
                 var nparams2 = obj.list2.append( { 'row' : { 'my' : { 'circ_id' : circ_id } },  'to_bottom' : true, 'which_list' : 1 } );
                 obj.list_circ_map[circ_id] = nparams2; 
             } else {
diff --git a/Open-ILS/xul/staff_client/server/patron/staged.js b/Open-ILS/xul/staff_client/server/patron/staged.js
index 706d449..a5a9d3e 100644
--- a/Open-ILS/xul/staff_client/server/patron/staged.js
+++ b/Open-ILS/xul/staff_client/server/patron/staged.js
@@ -116,7 +116,7 @@ function cancel(ids) {
                     if (idx == ids.length) { pm.value = 0; pm.hidden = true; }
                     var robj = req.getResultObject();
                     if (robj == '1') {
-                        var node = rows[ row_id_usrname_map[ id ] ].my_node;
+                        var node = rows[ row_id_usrname_map[ id ] ].treeitem_node;
                         var parentNode = node.parentNode;
                         parentNode.removeChild( node );
                         delete(rows[ row_id_usrname_map[ id ] ]);
@@ -174,7 +174,7 @@ function load( usrnames ) {
         function gen_on_save_handler(usrname) {
             return function() {
                 try {
-                    var node = rows[ usrname ].my_node;
+                    var node = rows[ usrname ].treeitem_node;
                     var parentNode = node.parentNode;
                     parentNode.removeChild( node );
                     delete(row_id_usrname_map[ rows[ usrname ].row.my.stgu.row_id() ]);
@@ -224,7 +224,7 @@ function init_list() {
 
 function retrieve_row(params) { // callback function for fleshing rows in a list
     try {
-        params.row_node.setAttribute('retrieve_id',js2JSON( { 'row_id' : params.row.my.stgu.row_id(), 'usrname' : params.row.my.stgu.usrname() } )); 
+        params.treeitem_node.setAttribute('retrieve_id',js2JSON( { 'row_id' : params.row.my.stgu.row_id(), 'usrname' : params.row.my.stgu.usrname() } )); 
         params.on_retrieve(params.row); 
     } catch(E) {
         alert('Error in staged.js, retrieve_row(): ' + E);
diff --git a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
index f72d086..b2e6b2c 100644
--- a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
+++ b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
@@ -85,7 +85,7 @@ function init_archived_list() {
 
 
 function retrieve_row (params) { // callback function for fleshing rows in a list
-    params.row_node.setAttribute('retrieve_id',params.row.my.ausp.id()); 
+    params.treeitem_node.setAttribute('retrieve_id',params.row.my.ausp.id()); 
     params.on_retrieve(params.row); 
     return params.row; 
 }
@@ -255,7 +255,7 @@ function generate_penalty_remove_function(id) {
             if (typeof req.ilsevent != 'undefined' || String(req) != '1') {
                 error.standard_unexpected_error_alert(patronStrings.getFormattedString('staff.patron.standing_penalty.remove_error',[id]),req);
             } else {
-                var node = rows[ id ].my_node;
+                var node = rows[ id ].treeitem_node;
                 var parentNode = node.parentNode;
                 parentNode.removeChild( node );
                 delete(rows[ id ]);
@@ -371,7 +371,7 @@ function handle_archive_penalty(ev) {
                             try {
                                 var res = openils.Util.readResponse(r,true);
                                 /* FIXME - test for success */
-                                var node = rows[row_id].my_node;
+                                var node = rows[row_id].treeitem_node;
                                 var parentNode = node.parentNode;
                                 parentNode.removeChild( node );
                                 delete(rows[row_id]);
diff --git a/Open-ILS/xul/staff_client/server/patron/trigger_events.js b/Open-ILS/xul/staff_client/server/patron/trigger_events.js
index 7238536..29c3fa2 100644
--- a/Open-ILS/xul/staff_client/server/patron/trigger_events.js
+++ b/Open-ILS/xul/staff_client/server/patron/trigger_events.js
@@ -158,7 +158,7 @@ function init_list() {
 }
 
 function retrieve_row(params) { // callback function for fleshing rows in a list
-    params.row_node.setAttribute('retrieve_id',params.row.my.atev.id()); 
+    params.treeitem_node.setAttribute('retrieve_id',params.row.my.atev.id()); 
     params.on_retrieve(params.row); 
     return params.row; 
 }
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_dists.js b/Open-ILS/xul/staff_client/server/serial/manage_dists.js
index 8d56f60..f3f0823 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_dists.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_dists.js
@@ -928,7 +928,7 @@ serial.manage_dists.prototype = {
                 data.node = obj.map_tree[ 'aou_' + parent_org.id() ];
             }
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             if (params) {
                 for (var i in params) {
                     node.setAttribute(i,params[i]);
@@ -993,7 +993,7 @@ serial.manage_dists.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ 'sdist_' + sdist_tree.id() ] =  node;
             if (params) {
                 for (var i in params) {
@@ -1017,7 +1017,7 @@ serial.manage_dists.prototype = {
                 'no_auto_select' : true,
             };
             nparams = obj.list.append(sstr_group_node_data);
-            obj.map_tree[ 'sdist_sstr_group_' + sdist_tree.id() ] =  nparams.my_node;
+            obj.map_tree[ 'sdist_sstr_group_' + sdist_tree.id() ] =  nparams.treeitem_node;
         } catch(E) {
             dump(E+'\n');
             alert(E);
@@ -1058,7 +1058,7 @@ serial.manage_dists.prototype = {
             };
             data['row']['my'][type] = item; // TODO: future optimization: get only the IDs of these leaves, then fetch the full row in 'retrieve_row'
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ type + '_' + sdist_tree.id() + '_' + item.id() ] =  node;
             if (label) {
                 data['row']['my']['label'] = label;
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_items.js b/Open-ILS/xul/staff_client/server/serial/manage_items.js
index 5e734ff..ec56204 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_items.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_items.js
@@ -736,8 +736,8 @@ serial.manage_items.prototype = {
                             var sitem = robj[0];
                             obj.list_sitem_map[sitem.id()] = sitem;
                             row.my.sitem = sitem;
-                            //params.row_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
-                            params.row_node.setAttribute( 'retrieve_id', js2JSON({'sitem_id':sitem.id()}) );
+                            //params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
+                            params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'sitem_id':sitem.id()}) );
                             dump('dumping... ' + js2JSON(obj.list_sitem_map[sitem.id()]));
                             if (typeof params.on_retrieve == 'function') {
                                 params.on_retrieve(row);
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_subs.js b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
index fa5c4c6..74ca397 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_subs.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
@@ -1352,7 +1352,7 @@ serial.manage_subs.prototype = {
                 data.node = obj.map_tree[ 'aou_' + parent_org.id() ];
             }
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             if (params) {
                 for (var i in params) {
                     node.setAttribute(i,params[i]);
@@ -1418,7 +1418,7 @@ serial.manage_subs.prototype = {
                 'no_auto_select' : true,
             };
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ 'ssub_' + ssub_tree.id() ] =  node;
             if (params) {
                 for (var i in params) {
@@ -1445,7 +1445,7 @@ serial.manage_subs.prototype = {
                 'no_auto_select' : true,
             };
             nparams = obj.list.append(sdist_group_node_data);
-            obj.map_tree[ 'ssub_sdist_group_' + ssub_tree.id() ] =  nparams.my_node;
+            obj.map_tree[ 'ssub_sdist_group_' + ssub_tree.id() ] =  nparams.treeitem_node;
 
             var siss_group_node_data = {
                 'row' : {
@@ -1459,7 +1459,7 @@ serial.manage_subs.prototype = {
                 'no_auto_select' : true,
             };
             nparams = obj.list.append(siss_group_node_data);
-            obj.map_tree[ 'ssub_siss_group_' + ssub_tree.id() ] =  nparams.my_node;
+            obj.map_tree[ 'ssub_siss_group_' + ssub_tree.id() ] =  nparams.treeitem_node;
 
             var scap_group_node_data = {
                 'row' : {
@@ -1473,7 +1473,7 @@ serial.manage_subs.prototype = {
                 'no_auto_select' : true,
             };
             nparams = obj.list.append(scap_group_node_data);
-            obj.map_tree[ 'ssub_scap_group_' + ssub_tree.id() ] =  nparams.my_node;
+            obj.map_tree[ 'ssub_scap_group_' + ssub_tree.id() ] =  nparams.treeitem_node;
         } catch(E) {
             dump(E+'\n');
             alert(E);
@@ -1510,7 +1510,7 @@ serial.manage_subs.prototype = {
             };
             data['row']['my'][type] = item; // TODO: future optimization: get only the IDs of these leaves, then fetch the full row in 'retrieve_row'
             var nparams = obj.list.append(data);
-            var node = nparams.my_node;
+            var node = nparams.treeitem_node;
             obj.map_tree[ type + '_' + item.id() ] =  node;
             if (attributes) {
                 for (var i in attributes) {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/css/skin/default.css                  |    4 +
 Open-ILS/web/js/dojo/openils/widget/AutoGrid.js    |   24 ++++++
 .../xul/staff_client/chrome/content/util/list.js   |   82 ++++++++++++++++----
 .../chrome/locale/en-US/offline.properties         |    1 +
 .../server/admin/patrons_due_refunds.js            |    2 +-
 .../xul/staff_client/server/admin/transit_list.js  |    4 +-
 .../xul/staff_client/server/cat/copy_browser.js    |   17 +++-
 .../xul/staff_client/server/cat/copy_buckets.js    |    2 +-
 .../server/cat/manage_multi_home_items.js          |    6 +-
 Open-ILS/xul/staff_client/server/cat/z3950.js      |    8 +-
 Open-ILS/xul/staff_client/server/circ/checkin.js   |    2 +-
 .../xul/staff_client/server/circ/copy_status.js    |    2 +-
 Open-ILS/xul/staff_client/server/patron/bill2.js   |    8 +-
 Open-ILS/xul/staff_client/server/patron/holds.js   |    2 +-
 Open-ILS/xul/staff_client/server/patron/items.js   |    6 +-
 Open-ILS/xul/staff_client/server/patron/staged.js  |    6 +-
 .../server/patron/standing_penalties.js            |    6 +-
 .../staff_client/server/patron/trigger_events.js   |    2 +-
 .../xul/staff_client/server/serial/manage_dists.js |    8 +-
 .../xul/staff_client/server/serial/manage_items.js |    4 +-
 .../xul/staff_client/server/serial/manage_subs.js  |   12 ++--
 Open-ILS/xul/staff_client/server/skin/global.css   |    7 ++
 22 files changed, 153 insertions(+), 62 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list