weirdness with overflow, and toward patron search
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Dec 2005 06:36:01 +0000 (06:36 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Dec 2005 06:36:01 +0000 (06:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2341 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/main/constants.js
Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js
Open-ILS/xul/staff_client/server/circ/checkout_overlay.xul
Open-ILS/xul/staff_client/server/main/menu.js
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/display.xul
Open-ILS/xul/staff_client/server/patron/display_overlay.xul
Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
Open-ILS/xul/staff_client/server/skin/evergreen.css

index 7ae40b2..cd7d886 100644 (file)
@@ -36,7 +36,8 @@ var urls = {
        'remote_patron_holds' : 'data:text/html,<h1>Holds Here</h1>',
        'remote_patron_info' : 'data:text/html,<h1>Info Here</h1>',
        'remote_patron_items' : 'data:text/html,<h1>Items Here</h1>',
-       'remote_patron_search' : '/xul/server/patron/search.xul',
+       'remote_patron_search_form' : '/xul/server/patron/search_form.xul',
+       'remote_patron_search_result' : '/xul/server/patron/search_result.xul',
        'remote_patron_summary' : '/xul/server/patron/summary.xul',
        'test_html' : '/xul/server/main/test.html',
        'test_xul' : '/xul/server/main/test.xul',
index afa5b6f..75c56a2 100644 (file)
@@ -13,7 +13,7 @@ util.deck = function (id) {
                throw(error);
        }
        if (this.node.nodeName != 'deck') {
-               var error = 'util.deck: ' + id + 'is not a deck';
+               var error = 'util.deck: ' + id + 'is not a deck' + "\nIt's a " + this.node.nodeName;
                this.error.sdump('D_ERROR',error);
                throw(error);
        }
@@ -55,7 +55,9 @@ util.deck.prototype = {
 
                var iframe = document.createElement('iframe');
                iframe.setAttribute('src',url);
-               iframe.setAttribute('flex','1');
+               //iframe.setAttribute('flex','1');
+               //iframe.setAttribute('style','overflow: scroll');
+               //iframe.setAttribute('style','border: solid thin red');
                this.node.appendChild( iframe );
                this.node.selectedIndex = this.node.childNodes.length - 1;
                if (content_params) {
index 6fe2698..b2f5eb8 100644 (file)
@@ -8,15 +8,17 @@
 <commandset id="checkout_cmds" />
 
 <box id="checkout_main" flex="1" orient="vertical" class="my_overflow">
+       <vbox id="cmvb1" flex="1"/>
+</box>
 
+<vbox id="cmvb1" flex="1">
        <groupbox id="cmgb1" flex="2">
                <caption label="&staff.patron_navbar.checkout;" />
                <hbox id="checkout_top_ui" />
                <tree id="checkout_list" flex="1" enableColumnDrag="true"/>
                <hbox id="checkout_bottom_ui" />
        </groupbox>
-
-</box>
+</vbox>
 
 <hbox id="checkout_top_ui">
        <label id="checkout_scan_barcode_label" 
index f63a95f..1e6717f 100644 (file)
@@ -29,6 +29,7 @@ main.menu.prototype = {
                                function() { alert('Not Yet Implemented'); }
                        ],
 
+                       /* File Menu */
                        'cmd_close_window' : [ 
                                ['command','keypress'], 
                                function() { obj.w.close(); } 
@@ -49,10 +50,12 @@ main.menu.prototype = {
                                function() { obj.close_tab(); }
                        ],
 
-                       'cmd_circ_checkout' : [
+                       /* Search Menu */
+                       'cmd_patron_search' : [
                                ['command','keypress'],
-                               function() { 
-                                       obj.set_tab(urls.remote_patron_barcode_entry + '?session='+obj.w.escape(session),{},{});
+                               function() {
+                                       obj.set_tab(urls.remote_patron_display 
+                                               + '?session='+obj.w.escape(session),{},{});
                                }
                        ],
                        'cmd_search_opac' : [
@@ -63,6 +66,16 @@ main.menu.prototype = {
                                }
                        ],
 
+
+                       /* Circulation Menu */
+                       'cmd_circ_checkout' : [
+                               ['command','keypress'],
+                               function() { 
+                                       obj.set_tab(urls.remote_patron_barcode_entry + '?session='+obj.w.escape(session),{},{});
+                               }
+                       ],
+
+                       /* Admin menu */
                        'cmd_test_html' : [
                                ['command','keypress'],
                                function() {
index ebf47cf..fadb360 100644 (file)
@@ -21,7 +21,7 @@ patron.display.prototype = {
                JSAN.use('OpenILS.data'); this.OpenILS = {}; 
                obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});
 
-               JSAN.use('util.deck');  
+               JSAN.use('util.deck'); 
                obj.right_deck = new util.deck('patron_right_deck');
                obj.left_deck = new util.deck('patron_left_deck');
 
@@ -39,7 +39,7 @@ patron.display.prototype = {
                                                        obj.controller.view.patron_name.setAttribute(
                                                                'value','Retrieving...'
                                                        );
-                                                       obj.retrieve();
+                                                       obj.summary_window.g.summary.retrieve();
                                                }
                                        ],
                                        'cmd_patron_checkout' : [
@@ -105,11 +105,13 @@ patron.display.prototype = {
                                                                        obj.patron.family_name() + ', ' + obj.patron.first_given_name()
                                                                );
                                                                e.setAttribute('style','background-color: lime');
-                                                               //FIXME//bills should become a virtual field
-                                                               if (obj.patron.bills.length > 0)
-                                                                       e.setAttribute('style','background-color: yellow');
-                                                               if (obj.patron.standing() == 2)
-                                                                       e.setAttribute('style','background-color: lightred');
+                                                               if (obj.summary_window) {
+                                                                       //FIXME//bills should become a virtual field
+                                                                       if (obj.summary_window.g.summary.patron.bills.length > 0)
+                                                                               e.setAttribute('style','background-color: yellow');
+                                                                       if (obj.summary_window.g.summary.patron.standing() == 2)
+                                                                               e.setAttribute('style','background-color: lightred');
+                                                               }
 
                                                        };
                                                }
@@ -131,6 +133,15 @@ patron.display.prototype = {
                                }
                        );
                        obj.summary_window = frame.contentWindow;
+               } else {
+                       var frame = obj.left_deck.set_iframe(
+                               urls.remote_patron_search_form
+                               +'?session=' + window.escape(obj.session),
+                               {},
+                               {
+                               }
+                       );
+                       obj.search_window = frame.contentWindow;        
                }
        },
 }
index c624c0d..9bf5766 100644 (file)
@@ -45,7 +45,8 @@
        
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\n" + E + '\n';
+                                       "system administrator or software developer the following:\n" 
+                                       + 'patron/display.xul\n' + E + '\n';
                                try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
                                alert(err_msg);
                        }
index ac70793..d7e3dd2 100644 (file)
@@ -7,15 +7,22 @@
 
 <commandset id="patron_display_cmds" />
 
-<box id="patron_display_main" flex="1" orient="vertical" class="my_overflow">
+<box id="patron_display_main" flex="1" orient="vertical">
+<vbox id="pdm2" flex="1">
        <hbox id="PatronNavBar" flex="0"/>
        <hbox id="PatronNotNavBar" flex="1">
-               <deck id="patron_left_deck" />
-               <deck id="patron_right_deck" />
+               <vbox id="pdm3" flex="1">
+                       <deck id="patron_left_deck"/>
+               </vbox>
+               <vbox id="pdm4" flex="3">
+                       <deck id="patron_right_deck"/>
+               </vbox>
+       
        </hbox>
+</vbox>
 </box>
 
-<deck id="patron_right_deck" flex="2">
+<deck id="patron_right_deck" flex="1">
 </deck>
 <deck id="patron_left_deck" flex="1">
 </deck>
index b61aff8..d065db5 100644 (file)
@@ -11,7 +11,7 @@
        <vbox id="patron_info_sidebar" />
 </box>
 
-<vbox id="patron_info_sidebar" flex="0">
+<vbox id="patron_info_sidebar" flex="1">
        <groupbox id="PatronSummaryStatus_groupbox" flex="0"/>
        <groupbox id="PatronSummarySurvey_groupbox" flex="0">
                <caption id="pdsgbc" label="Surveys" />
index 5a4646c..fdf56e3 100644 (file)
@@ -4,7 +4,7 @@
 tabpanel { border: 2px groove black; }
 caption { font-weight: bold; }
 
-.my_overflow { overflow: auto; }
+.my_overflow { overflow: scroll; }
 
 .text_left { text-align: left; }
 .text_right { text-align: right; }