tweaks. allowevents in listbox
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Dec 2005 20:46:23 +0000 (20:46 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Dec 2005 20:46:23 +0000 (20:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2451 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/list.js
Open-ILS/xul/staff_client/server/patron/bills.js
Open-ILS/xul/staff_client/server/patron/bills_overlay.xul
Open-ILS/xul/staff_client/server/patron/display_overlay.xul

index 61a5c86..dcf7cd7 100644 (file)
@@ -88,11 +88,17 @@ util.list.prototype = {
        },
 
        'append' : function (params) {
+               var rnode;
                switch (this.node.nodeName) {
-                       case 'tree' : this._append_to_tree(params); break;
-                       case 'listbox' : this._append_to_listbox(params); break;
+                       case 'tree' : rnode = this._append_to_tree(params); break;
+                       case 'listbox' : rnode = this._append_to_listbox(params); break;
                        default: throw('NYI: Need .append() for ' + this.node.nodeName); break;
                }
+               if (rnode && params.attributes) {
+                       for (var i in params.attributes) {
+                               rnode.setAttribute(i,params.attributes[i]);
+                       }
+               }
        },
 
        '_append_to_tree' : function (params) {
index e5f028b..df0cdc3 100644 (file)
@@ -46,7 +46,7 @@ patron.bills.prototype = {
                                                        'primary' : false, 'hidden' : false, 'render' : 'obj.money_box(my.mobts)'
                                                },
                                                {
-                                                       'id' : 'current_pay', 'label' : getString('staff.bills_current_payment_label'), 'flex' : 1
+                                                       'id' : 'current_pay', 'label' : getString('staff.bills_current_payment_label'), 'flex' : 0
                                                        'render' : 'document.createElement("textbox")'
                                                }
                                ],
@@ -150,10 +150,12 @@ patron.bills.prototype = {
 
                //FIXME//.bills virtual field
                for (var i = 0; i < obj.bills.length; i++) {
-                       obj.list.append( { 'row' : { 'my' : { 'mobts' : obj.bills[i] } } } );
+                       obj.list.append( { 'row' : { 'my' : { 'mobts' : obj.bills[i] } }, 'attributes' : { 'allowevents' : true } } );
                }
        },
 
+       /*****************************************************************************************************************************/
+
        'apply_payment' : function() {
                var obj = this;
                var payment_blob = {};
index 0068a76..5b2cd51 100644 (file)
@@ -9,7 +9,7 @@
 
 <box id="bills_main" flex="1" orient="vertical" class="my_overflow">
        <vbox id="bills_top_ui" />
-       <listbox id="bill_list" />
+       <listbox id="bill_list"/>
 </box>
 
 <vbox id="bills_top_ui">
index 4a4524c..bd027a9 100644 (file)
@@ -19,7 +19,7 @@
                        <deck id="patron_left_deck"/>
                </vbox>
                <splitter id="pdms1"><grippy id="pdmsg1"/></splitter>
-               <vbox id="pdm4" flex="2">
+               <vbox id="pdm4" flex="3">
                        <deck id="patron_right_deck"/>
                </vbox>