prepend certain lists
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 26 Aug 2006 07:56:12 +0000 (07:56 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 26 Aug 2006 07:56:12 +0000 (07:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5706 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/list.js
Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/copy_status.js
Open-ILS/xul/staff_client/server/circ/in_house_use.js

index 11a1eae..d803248 100644 (file)
@@ -324,7 +324,15 @@ util.list.prototype = {
 
                var treeitem = document.createElement('treeitem');
                treeitem.setAttribute('retrieve_id',params.retrieve_id);
-               treechildren_node.appendChild( treeitem );
+               if (typeof params.to_top == 'undefined') {
+                       treechildren_node.appendChild( treeitem );
+               } else {
+                       if (treechildren_node.firstChild) {
+                               treechildren_node.insertBefore( treeitem, treechildren_node.firstChild );
+                       } else {
+                               treechildren_node.appendChild( treeitem );
+                       }
+               }
                var treerow = document.createElement('treerow');
                treeitem.appendChild( treerow );
                treerow.setAttribute('retrieve_id',params.retrieve_id);
index 654639c..970308e 100644 (file)
@@ -280,7 +280,8 @@ circ.checkin.prototype = {
                                                        'route_to' : checkin.route_to,
                                                        'message' : checkin.message,
                                                }
-                                       }
+                                       },
+                                       'to_top' : true,
                                //I could override map_row_to_column here
                                }
                        );
index ab4719f..f4a7d1b 100644 (file)
@@ -268,7 +268,8 @@ circ.copy_status.prototype = {
                                                                'mvr' : my_mvr,
                                                                'acp' : copy,
                                                        }
-                                               }
+                                               },
+                                               'to_top' : true,
                                        }
                                );
                                obj.controller.view.copy_status_barcode_entry_textbox.value = '';
index 1fac7bd..14d4b65 100644 (file)
@@ -250,7 +250,8 @@ circ.in_house_use.prototype = {
                                                        'acp' : copy,
                                                        'uses' : result.length,
                                                }
-                                       }
+                                       },
+                                       'to_top' : true,
                                //I could override map_row_to_column here
                                }
                        );