[open-ils-commits] r15169 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/locale/en-US xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Dec 15 16:03:58 EST 2009


Author: phasefx
Date: 2009-12-15 16:03:53 -0500 (Tue, 15 Dec 2009)
New Revision: 15169

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
   trunk/Open-ILS/xul/staff_client/server/patron/display.js
   trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
   trunk/Open-ILS/xul/staff_client/server/patron/summary.js
   trunk/Open-ILS/xul/staff_client/server/patron/summary.xul
   trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
Log:
Layout tweaks for horizontal patron summary pane, including slim Group Members tab

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-15 21:03:53 UTC (rev 15169)
@@ -1227,6 +1227,15 @@
 <!ENTITY staff.patron_display.checkouts.label 'Check Outs:'>
 <!ENTITY staff.patron_display.checkouts_overdue.label 'Overdue:'>
 <!ENTITY staff.patron_display.contact.caption 'Identity &amp; Contact Info'>
+<!ENTITY staff.patron_display.account_info.caption 'Account Info'>
+<!ENTITY staff.patron_display.patron_info.caption 'Patron Info'>
+<!ENTITY staff.patron_display.phone_numbers.caption 'Phone Numbers'>
+<!ENTITY staff.patron_display.tab.identification.label 'Identification'>
+<!ENTITY staff.patron_display.tab.identification.accesskey ''>
+<!ENTITY staff.patron_display.tab.group.label 'Group'>
+<!ENTITY staff.patron_display.tab.group.accesskey ''>
+<!ENTITY staff.patron_display.tab.stat_cats.label 'Stat Cats'>
+<!ENTITY staff.patron_display.tab.stat_cats.accesskey ''>
 <!ENTITY staff.patron_display.credit.label 'Credit:'>
 <!ENTITY staff.patron_display.date_of_birth.label 'Date of Birth:'>
 <!ENTITY staff.patron_display.day_phone.label 'Day Phone:'>
@@ -1257,6 +1266,12 @@
 <!ENTITY staff.patron_display.mailing.street1.label 'Mailing Address 1:'>
 <!ENTITY staff.patron_display.mailing.street2.label 'Mailing Address 2:'>
 <!ENTITY staff.patron_display.mailing_address 'Mailing Address'>
+<!ENTITY staff.patron_display.addresses.caption 'Addresses'>
+<!ENTITY staff.patron_display.address.copy '(Copy)'>
+<!ENTITY staff.patron_display.radio.mailing_address.label 'Mailing'>
+<!ENTITY staff.patron_display.radio.mailing_address.accesskey ''>
+<!ENTITY staff.patron_display.radio.physical_address.label 'Billing'>
+<!ENTITY staff.patron_display.radio.physical_address.accesskey ''>
 <!ENTITY staff.patron_display.name.label 'Patron Name'>
 <!ENTITY staff.patron_display.other_phone.label 'Other Phone:'>
 <!ENTITY staff.patron_display.physical.copy '(Copy)'>
@@ -2755,6 +2770,8 @@
 <!ENTITY staff.patron.summary_overlay.noncat_label.value "Non Cataloged:">
 <!ENTITY staff.patron.summary_overlay.summary_contact.label "ID and Contact Information">
 <!ENTITY staff.patron.summary_overlay.opac_login.value "OPAC Login:">
+<!ENTITY staff.patron.summary_overlay.group_tab.retrieve_patron.label "Retrieve Patron">
+<!ENTITY staff.patron.summary_overlay.group_tab.retrieve_patron.accesskey "">
 <!ENTITY staff.patron.user_buckets.stub_not_implemented "Just a stub, Not Yet Implemented">
 <!ENTITY staff.patron.user_edit.title "Evergreen User Editor">
 <!ENTITY staff.patron.user_edit.user_name.label "User Name:">

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-12-15 21:03:53 UTC (rev 15169)
@@ -328,6 +328,10 @@
 staff.patron.summary.expires_on=Expires on
 staff.patron.summary.standing_penalty.remove=Remove
 staff.patron.summary.standing_penalty.none=No Blocks/Penalties
+staff.patron.summary.group_list.column.family_name.label=Family Name
+staff.patron.summary.group_list.column.first_given_name.label=First Name
+staff.patron.summary.group_list.column.second_given_name.label=Middle Name
+staff.patron.summary.group_list.column.home_ou.label=Home Lib
 staff.patron.staged.register_patron=Registering Pending Patron: %1$s
 staff.patron.staged.confirm_patron_delete=Delete the selected patrons?
 staff.patron.staged.error_on_delete=Error deleting pending patron with row_id = %1$s

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-12-15 21:03:53 UTC (rev 15169)
@@ -545,6 +545,9 @@
                     'refresh' : function() { obj.refresh_all(); },
                     'on_finished' : obj.gen_patron_summary_finish_func(),
                     'stop_sign_page' : obj.gen_patron_stop_sign_page_func(),
+                    'new_patron_tab' : xulG.new_patron_tab,
+                    'new_tab' : xulG.new_tab,
+                    'set_tab' : xulG.set_tab,
                     'on_error' : function(E) {
                         try {
                             var error;

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul	2009-12-15 21:03:53 UTC (rev 15169)
@@ -36,7 +36,7 @@
             <deck id="patron_left_deck" oils_persist="height"/>
         </hbox>
         <splitter id="deck_splitter" collapse="before" oils_persist="state hidden"><grippy id="splitter_grippy"/></splitter>
-        <hbox id="right_deck_vbox" flex="8" oils_persist="height">
+        <hbox id="right_deck_vbox" flex="3" oils_persist="height">
             <deck id="patron_right_deck" oils_persist="height"/>
         </hbox>
     </vbox>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2009-12-15 21:03:53 UTC (rev 15169)
@@ -30,6 +30,39 @@
         obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});
         var obscure_dob = String( obj.OpenILS.data.hash.aous['circ.obscure_dob'] ) == 'true';
 
+        JSAN.use('util.functional'); JSAN.use('patron.util'); JSAN.use('util.list'); obj.group_list = new util.list('group_list');
+        obj.group_list.init( {
+            'columns' : [
+                { 'id' : 'gl_family_name', 'flex' : 1, 
+                    'label' : patronStrings.getString('staff.patron.summary.group_list.column.family_name.label'),
+                    'render' : function(my) { return my.family_name; } },
+                { 'id' : 'gl_first_given_name', 'flex' : 1, 
+                    'label' : patronStrings.getString('staff.patron.summary.group_list.column.first_given_name.label'),
+                    'render' : function(my) { return my.first_given_name; } },
+                { 'id' : 'gl_second_given_name', 'flex' : 1, 'hidden' : true, 
+                    'label' : patronStrings.getString('staff.patron.summary.group_list.column.second_given_name.label'),
+                    'render' : function(my) { return my.second_given_name; } },
+                { 'id' : 'gl_home_lib', 'flex' : 1, 'hidden' : true, 
+                    'label' : patronStrings.getString('staff.patron.summary.group_list.column.home_ou.label'),
+                    'render' : function(my) { return obj.OpenILS.data.hash.aou[ my.home_ou ].shortname(); } }
+            ],
+            'retrieve_row' : function(params) {
+                var id = params.retrieve_id;
+                var blob = patron.util.retrieve_name_via_id( ses(), id );
+                var row = params.row; if (typeof row.my == 'undefined') { row.my = {}; }
+                row.my.family_name = blob[0];
+                row.my.first_given_name = blob[1];
+                row.my.second_given_name = blob[2];
+                row.my.home_ou = blob[3];
+                if (typeof params.on_retrieve == 'function') {
+                    params.on_retrieve(row);
+                }
+                return row;
+            }
+        } );
+        $('group_list_actions').appendChild( obj.group_list.render_list_actions() );
+        obj.group_list.set_list_actions();
+
         JSAN.use('util.controller'); obj.controller = new util.controller();
         obj.controller.init(
             {
@@ -38,6 +71,53 @@
                         ['command'],
                         function() { alert($("commonStrings").getString('common.unimplemented')); }
                     ],
+                    'radio_address' : [
+                        ['render'],
+                        function(e) {
+                            return function() {
+                                if (e.value == 'physical') { e.selectedIndex = 1; $('address_deck').selectedIndex = 1; }
+                            };
+                        }
+                    ],
+                    'group_tab' : [
+                        ['command'],
+                        function() {
+                            try {
+                                if (! obj.group_frame_loaded) {
+                                    obj.group_frame();
+                                    obj.group_frame_loaded = true;
+                                }
+                            } catch(E) {
+                                alert('Error in summary.js, group_tab: ' + E);
+                            }
+                        }
+                    ],
+                    'group_tab_retrieve_patron' : [
+                        ['command'],
+                        function() {
+                            var selected_ids = util.functional.map_list(
+                                obj.group_list.retrieve_selection(),
+                                function(o) {
+                                    return o.getAttribute('retrieve_id');
+                                }
+                            );
+                            for (var i = 0; i < selected_ids.length; i++) {
+                                try {
+                                    window.xulG.new_patron_tab(
+                                        { 'tab_name' : patronStrings.getString('staff.patron.info_group.retrieve_patron.tab_name') },
+                                        {
+                                            'id' : selected_ids[i],
+                                            'url_prefix' : xulG.url_prefix,
+                                            'new_tab' : xulG.new_tab,
+                                            'set_tab' : xulG.set_tab
+                                        }
+                                    );
+                                } catch(E) {
+                                    alert('Error in summary.js, group_tab_retrieve_patron: ' + E);
+                                }
+                            }
+                        }
+                    ],
                     'patron_alert' : [
                         ['render'],
                         function(e) {
@@ -734,6 +814,36 @@
                 alert(js2JSON(E));
             }
         }
+    },
+
+    'group_frame' : function() {
+        var obj = this;
+        try {
+            obj.group_list.clear();
+
+            var robj = obj.network.simple_request(
+                'FM_AU_LIST_RETRIEVE_VIA_GROUP.authoritative',
+                [ ses(), obj.patron.usrgroup() ]
+            );
+            if ((robj == null) || (typeof robj.ilsevent != 'undefined') ) throw(robj);
+            var ids = util.functional.filter_list( robj, function(o) { return o != obj.patron.id(); });
+            var funcs = [];
+
+                function gen_func(r) {
+                    return function() {
+                        obj.group_list.append( { 'retrieve_id' : r, 'row' : {} } );
+                    }
+                }
+
+            //funcs.push( gen_func(obj.patron.id()) );
+            for (var i = 0; i < ids.length; i++) {
+                funcs.push( gen_func(ids[i]) );
+            }
+            JSAN.use('util.exec'); var exec = new util.exec(4);
+            exec.chain( funcs );
+        } catch(E) {
+            alert('Error in summary.js, group_frame(): ' + E);
+        }
     }
 }
 

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.xul	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.xul	2009-12-15 21:03:53 UTC (rev 15169)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_summary_win" 
-    onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }" onunload="try { observer.unregister(); } catch(E) { alert(E); }"
+    onload="try { font_helper(); my_init(); } catch(E) { alert(E); }" onunload="try { observer.unregister(); } catch(E) { alert(E); }"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
     <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -49,7 +49,7 @@
             observe: function(subject,topic,data) {
                 dump('observe: <'+subject+','+topic+','+data+'>\n');
                 // setTimeout is needed here for xulrunner 1.8
-                setTimeout( function() { try { post_overlay(); } catch(E) { alert(E); } }, 0 );
+                setTimeout( function() { try { persist_helper(); post_overlay(); } catch(E) { alert(E); } }, 0 );
             }
         }
                 
@@ -95,6 +95,14 @@
             );
         }
 
+        function copy_displayed_address() {
+            if ( $('radio_address').selectedIndex == 0 ) {
+                copy_mailing_address();
+            } else {
+                copy_billing_address();
+            }
+        }
+
         function copy_mailing_address() {
             var a = g.summary.patron.mailing_address();
             if (!a) return;
@@ -134,8 +142,8 @@
     
     <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
 
-    <commandset id="patron_summary_cmds">
-    </commandset>
+    <commandset id="patron_summary_cmds" />
+    <popupset id="patron_summary_popups" />
 
     <box id="patron_summary_main" />
 

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-12-15 20:25:33 UTC (rev 15168)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-12-15 21:03:53 UTC (rev 15169)
@@ -7,104 +7,124 @@
 
 <script>dump('loading patron/summary_overlay.xul\n');</script>
 
-<commandset id="patron_summary_cmds" />
+<commandset id="patron_summary_cmds">
+    <command id="group_tab_retrieve_patron"/>
+</commandset>
 
+<popupset id="patron_summary_popups">
+    <popup id="group_actions" position="at_pointer">
+        <menuitem command="group_tab_retrieve_patron"
+            label="&staff.patron.summary_overlay.group_tab.retrieve_patron.label;"
+            accesskey="&staff.patron.summary_overlay.group_tab.retrieve_patron.accesskey;" />
+    </popup>
+</popupset>
+
 <box id="patron_summary_main" flex="1" orient="vertical" class="my_overflow">
     <hbox id="patron_info_sidebar" flex="1"/>
 </box>
 
-<hbox id="patron_info_sidebar">
+<hbox id="patron_info_sidebar" flex="1">
     <image id="patron_photo_url" />
-    <vbox id="patron_info" flex="1">
-        <groupbox flex="1">
-            <caption label="Patron Info"/>
-            <description id="patron_name" />
-            <grid>
-                <columns>
-                    <column/>
-                    <column/>
-                </columns>
-                <rows>
-                    <row>
-                        <label id="PatronSummaryContact_date_of_birth_label" click_to_hide_dob="true" class="copyable text_left dob label click_link" value="&staff.patron_display.date_of_birth.label;"/>
-                        <description id="patron_date_of_birth" class="copyable dob value" hide_value="true" oils_persist="hide_value"/>
-                    </row>
-                    <row>
-                        <label id="PatronSummaryContact_library_card_label" class="copyable text_left card label"
-                            value="&staff.patron_display.library_card.label;"/>
-                        <description id="patron_card" class="copyable card value click_link" onclick="try { copy_to_clipboard(event); } catch(E) { alert(E); }"/>
-                    </row>
-                    <row>
-                        <label id="PatronSummaryContact_hold_alias_label" class="copyable text_left" value="&staff.patron_display.hold_alias.label;"/>
-                        <description id="patron_hold_alias" class="copyable hold_alias value" />
-                    </row>
-                    <row>
-                        <label id="PatronSummaryContact_usrname_label" class="copyable text_left usrname label"
-                            value="&staff.patron.summary_overlay.opac_login.value;" />
-                        <description id="patron_usrname" class="copyable usrname value"/>
-                    </row>
-                    <row>
-                        <label id="PatronSummaryContact_email_label" class="copyable text_left email label"
-                            value="&staff.patron_display.email.label;" />
-                        <description id="patron_email" class="copyable email value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
-                    </row>
-                </rows>
-            </grid>
-            <spacer/><!-- bug workaround.. for some reason.. maybe timing with the overlay inserting children.. the patron_name label shows up beneath the grid when rendered -->
-        </groupbox>
+    <vbox id="patron_info" flex="1" />
+    <vbox id="account_info" flex="1" />
+    <vbox flex="1">
+        <vbox id="PatronSummaryContact_address" orient="vertical"/>
+        <vbox id="PatronSummaryContact_phone" />
+        <spacer flex="1"/>
     </vbox>
     <vbox id="contact_info" flex="1">
-        <groupbox flex="1">
-            <caption>
-                <button id="contact_info_btn" label="Mailing Address" type="menu">
-                    <menupopup>
-                        <menuitem label="&staff.patron_display.mailing_address;" oncommand="document.getElementById('contact_info_btn').setAttribute('label',this.getAttribute('label')); document.getElementById('contact_info_deck').selectedIndex = 0;"/>
-                        <menuitem label="&staff.patron_display.physical_address;" oncommand="document.getElementById('contact_info_btn').setAttribute('label',this.getAttribute('label')); document.getElementById('contact_info_deck').selectedIndex = 1;"/>
-                        <menuitem label="Phone Numbers" oncommand="document.getElementById('contact_info_btn').setAttribute('label',this.getAttribute('label')); document.getElementById('contact_info_deck').selectedIndex = 2;"/>
-                        <menuitem label="Identification" oncommand="document.getElementById('contact_info_btn').setAttribute('label',this.getAttribute('label')); document.getElementById('contact_info_deck').selectedIndex = 3;"/>
-                    </menupopup>
-                </button>
-            </caption>
-            <deck id="contact_info_deck">
-                <vbox id="PatronSummaryContact_mailing_address" orient="vertical"/>
-                <vbox id="PatronSummaryContact_physical_address" orient="vertical"/>
-                <grid id="PatronSummaryContact_grid_phone" />
-                <grid id="PatronSummaryContact_grid" flex="1"/>
-            </deck>
-        </groupbox>
+        <tabbox flex="1">
+            <tabs>
+                <tab label="&staff.patron_display.tab.identification.label;" accesskey="&staff.patron_display.tab.identification.accesskey;"/>
+                <tab id="group_tab" label="&staff.patron_display.tab.group.label;" accesskey="&staff.patron_display.tab.group.accesskey;"/>
+                <tab label="&staff.patron_display.tab.stat_cats.label;" accesskey="&staff.patron_display.tab.stat_cats.accesskey;"/>
+            </tabs>
+            <tabpanels flex="1">
+                <tabpanel><grid id="PatronSummaryContact_grid" flex="1"/></tabpanel>
+                <tabpanel orient="vertical">
+                    <tree id="group_list" flex="1" enableColumnDrag="true" seltype="multiple" context="group_actions"/>
+                    <hbox>
+                        <hbox id="group_list_actions" />
+                        <spacer flex="1" />
+                        <button command="group_tab_retrieve_patron"
+                            label="&staff.patron.summary_overlay.group_tab.retrieve_patron.label;" 
+                            accesskey="&staff.patron.summary_overlay.group_tab.retrieve_patron.accesskey;" />
+                    </hbox>
+                </tabpanel>
+                <tabpanel>
+                    <vbox>
+                    </vbox>
+                </tabpanel>
+                <tabpanel hidden="true"><grid id="PatronSummaryStatus_grid" flex="1"/></tabpanel>
+            </tabpanels>
+        </tabbox>
     </vbox>
-    <vbox>
-        <groupbox flex="1">
-            <caption label="Circ Info"/>
-            <grid id="PatronSummaryStatus_grid" flex="1"/>
-        </groupbox>
-    </vbox>
-    <vbox>
-        <groupbox flex="1">
-            <caption label="Account Info"/>
-            <grid>
-                <columns>
-                    <column/>
-                </columns>
-                <rows>
-                    <row id="pdsgr1">
-                        <description id="patron_profile" class="copyable profile value"/>
-                    </row>
-                    <row id="pdsgr5">
-                        <description id="patron_library" class="copyable homelib value"/>
-                    </row>
-                    <row id="pdsgr5a">
-                        <description id="patron_net_access" class="copyable net_access value"/>
-                    </row>
-                    <row id="pdsgr5aa">
-                        <description id="patron_date_of_exp" class="copyable expire_date value"/>
-                    </row>
-                </rows>
-            </grid>
-        </groupbox>
-    </vbox>
 </hbox>
 
+<vbox id="account_info">
+    <groupbox flex="1">
+        <caption label="&staff.patron_display.account_info.caption;"/>
+        <grid>
+            <columns>
+                <column/>
+            </columns>
+            <rows>
+                <row id="pdsgr1">
+                    <description id="patron_profile" class="copyable profile value"/>
+                </row>
+                <row id="pdsgr5">
+                    <description id="patron_library" class="copyable homelib value"/>
+                </row>
+                <row id="pdsgr5a">
+                    <description id="patron_net_access" class="copyable net_access value"/>
+                </row>
+                <row id="pdsgr5aa">
+                    <description id="patron_date_of_exp" class="copyable expire_date value"/>
+                </row>
+            </rows>
+        </grid>
+    </groupbox>
+</vbox>
+
+<vbox id="patron_info" flex="1">
+    <groupbox flex="1">
+        <caption label="&staff.patron_display.patron_info.caption;"/>
+        <description id="patron_name" />
+        <grid>
+            <columns>
+                <column/>
+                <column/>
+            </columns>
+            <rows>
+                <row>
+                    <label id="PatronSummaryContact_date_of_birth_label" click_to_hide_dob="true" class="copyable text_left dob label click_link" value="&staff.patron_display.date_of_birth.label;"/>
+                    <description id="patron_date_of_birth" class="copyable dob value" hide_value="true" oils_persist="hide_value"/>
+                </row>
+                <row>
+                    <label id="PatronSummaryContact_library_card_label" class="copyable text_left card label"
+                        value="&staff.patron_display.library_card.label;"/>
+                    <description id="patron_card" class="copyable card value click_link" onclick="try { copy_to_clipboard(event); } catch(E) { alert(E); }"/>
+                </row>
+                <row>
+                    <label id="PatronSummaryContact_hold_alias_label" class="copyable text_left" value="&staff.patron_display.hold_alias.label;"/>
+                    <description id="patron_hold_alias" class="copyable hold_alias value" />
+                </row>
+                <row>
+                    <label id="PatronSummaryContact_usrname_label" class="copyable text_left usrname label"
+                        value="&staff.patron.summary_overlay.opac_login.value;" />
+                    <description id="patron_usrname" class="copyable usrname value"/>
+                </row>
+                <row>
+                    <label id="PatronSummaryContact_email_label" class="copyable text_left email label"
+                        value="&staff.patron_display.email.label;" />
+                    <description id="patron_email" class="copyable email value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
+                </row>
+            </rows>
+        </grid>
+        <spacer/><!-- bug workaround.. for some reason.. maybe timing with the overlay inserting children.. the patron_name label shows up beneath the grid when rendered -->
+    </groupbox>
+</vbox>
+
 <grid id="PatronSummaryStatus_grid">
     <columns id="pdsgc">
         <column id="pdsgc1" />
@@ -193,59 +213,73 @@
     </rows>
 </grid>
 
-<grid id="PatronSummaryContact_grid_phone">
-    <columns id="pdcgpc">
-        <column id="pdcgpc1" />
-        <column id="pdcgpc2" />
-    </columns>
-    <rows id="pdcgpr" flex="1">
-        <row id="pdcgpr1">
-            <label id="PatronSummaryContact_day_phone_label" class="copyable text_left phone label day_phone"
-                value="&staff.patron_display.day_phone.label;" />
-            <description id="patron_day_phone" class="copyable phone value day_phone"/> 
-        </row>
-        <row id="pdcgpr2">
-            <label id="PatronSummaryContact_evening_phone_label" class="copyable text_left phone label evening_phone"
-                value="&staff.patron_display.evening_phone.label;" />
-            <description id="patron_evening_phone" class="copyable phone value evening_phone"/>
-        </row>
-        <row id="pdcgpr3">
-            <label id="PatronSummaryContact_other_phone_label" class="copyable text_left phone label other_phone"
-                value="&staff.patron_display.other_phone.label;" />
-            <description id="patron_other_phone" class="copyable phone value other_phone"/> 
-        </row>
-        <row id="pdsgpr4"><label id="pdsgpr4l" value=" "/></row>
-        <row id="pdsgpr6"><label id="pdsgpr6l" value=" "/></row>
-
-    </rows>
-</grid>
-
-<vbox id="PatronSummaryContact_mailing_address">
-    <description id="patron_mailing_address_street1" tooltiptext="&staff.patron_display.mailing.street1.label;" class="copyable address street street1 mailing value"/>
-    <description id="patron_mailing_address_street2" tooltiptext="&staff.patron_display.mailing.street2.label;" class="copyable address street street2 mailing value"/>
-    <hbox id="pdcmah">
-        <description id="patron_mailing_address_city" tooltiptext="&staff.patron_display.mailing.city.label;" class="copyable address city mailing value"/>
-        <description id="patron_mailing_address_state" tooltiptext="&staff.patron_display.mailing.state.label;" class="copyable address state mailing value"/>
-        <description id="patron_mailing_address_post_code" tooltiptext="&staff.patron_display.mailing.post_code.label;" class="copyable address post_code mailing value"/>
-    </hbox>
-    <hbox>
-        <spacer flex="1" />
-        <label value="&staff.patron_display.mailing.copy;" onclick="copy_mailing_address();" class="copyable click_link"/>
-    </hbox>
+<vbox id="PatronSummaryContact_phone">
+    <groupbox>
+        <caption label="&staff.patron_display.phone_numbers.caption;"/>
+        <grid id="PatronSummaryContact_grid_phone">
+            <columns id="pdcgpc">
+                <column id="pdcgpc1" />
+                <column id="pdcgpc2" />
+            </columns>
+            <rows id="pdcgpr" flex="1">
+                <row id="pdcgpr1">
+                    <label id="PatronSummaryContact_day_phone_label" class="copyable text_left phone label day_phone"
+                        value="&staff.patron_display.day_phone.label;" />
+                    <description id="patron_day_phone" class="copyable phone value day_phone"/> 
+                </row>
+                <row id="pdcgpr2">
+                    <label id="PatronSummaryContact_evening_phone_label" class="copyable text_left phone label evening_phone"
+                        value="&staff.patron_display.evening_phone.label;" />
+                    <description id="patron_evening_phone" class="copyable phone value evening_phone"/>
+                </row>
+                <row id="pdcgpr3">
+                    <label id="PatronSummaryContact_other_phone_label" class="copyable text_left phone label other_phone"
+                        value="&staff.patron_display.other_phone.label;" />
+                    <description id="patron_other_phone" class="copyable phone value other_phone"/> 
+                </row>
+            </rows>
+        </grid>
+    </groupbox>
 </vbox>
 
-<vbox id="PatronSummaryContact_physical_address">
-    <description id="patron_physical_address_street1" tooltiptext="&staff.patron_display.physical.street1.label;" class="copyable address street street1 physical value" />
-    <description id="patron_physical_address_street2" tooltiptext="&staff.patron_display.physical.street2.label;"  class="copyable address street street2 physical value"/>
-    <hbox id="pdcpah">
-        <description id="patron_physical_address_city" tooltiptext="&staff.patron_display.physical.city.label;" class="copyable address city physical value"/>
-        <description id="patron_physical_address_state" tooltiptext="&staff.patron_display.physical.state.label;" class="copyable address state physical value"/>
-        <description id="patron_physical_address_post_code" tooltiptext="&staff.patron_display.physical.post_code.label;" class="copyable address post_code physical value"/>
-    </hbox>
-    <hbox>
-        <spacer flex="1" />
-        <label value="&staff.patron_display.physical.copy;" onclick="copy_billing_address();" class="copyable click_link"/>
-    </hbox>
+<vbox id="PatronSummaryContact_address">
+    <groupbox>
+        <caption label="&staff.patron_display.addresses.caption;"/>
+        <deck id="address_deck">
+            <vbox>
+                <description id="patron_mailing_address_street1" tooltiptext="&staff.patron_display.mailing.street1.label;" class="copyable address street street1 mailing value"/>
+                <description id="patron_mailing_address_street2" tooltiptext="&staff.patron_display.mailing.street2.label;" class="copyable address street street2 mailing value"/>
+                <hbox id="pdcmah">
+                    <description id="patron_mailing_address_city" tooltiptext="&staff.patron_display.mailing.city.label;" class="copyable address city mailing value"/>
+                    <description id="patron_mailing_address_state" tooltiptext="&staff.patron_display.mailing.state.label;" class="copyable address state mailing value"/>
+                    <description id="patron_mailing_address_post_code" tooltiptext="&staff.patron_display.mailing.post_code.label;" class="copyable address post_code mailing value"/>
+                </hbox>
+            </vbox>
+            <vbox>
+                <description id="patron_physical_address_street1" tooltiptext="&staff.patron_display.physical.street1.label;" class="copyable address street street1 physical value" />
+                <description id="patron_physical_address_street2" tooltiptext="&staff.patron_display.physical.street2.label;"  class="copyable address street street2 physical value"/>
+                <hbox id="pdcpah">
+                    <description id="patron_physical_address_city" tooltiptext="&staff.patron_display.physical.city.label;" class="copyable address city physical value"/>
+                    <description id="patron_physical_address_state" tooltiptext="&staff.patron_display.physical.state.label;" class="copyable address state physical value"/>
+                    <description id="patron_physical_address_post_code" tooltiptext="&staff.patron_display.physical.post_code.label;" class="copyable address post_code physical value"/>
+                </hbox>
+            </vbox>
+        </deck>
+        <hbox>
+            <radiogroup id="radio_address" orient="horizontal" oils_persist="value">
+                <radio id="radio_address_mailing" selected="true" value="mailing"
+                    oncommand="oils_persist(this.parentNode); $('address_deck').selectedIndex = 0;"
+                    label="&staff.patron_display.radio.mailing_address.label;" 
+                    accesskey="&staff.patron_display.radio.mailing_address.accesskey;" />
+                <radio id="radio_address_physical" value="physical"
+                    oncommand="oils_persist(this.parentNode); $('address_deck').selectedIndex = 1;"
+                    label="&staff.patron_display.radio.physical_address.label;"
+                    accesskey="&staff.patron_display.radio.physical_address.accesskey;" /> 
+            </radiogroup>
+            <spacer flex="1" />
+            <label value="&staff.patron_display.address.copy;" onclick="copy_displayed_address();" class="copyable click_link"/>
+        </hbox>
+    </groupbox>
 </vbox>
 
 </overlay>



More information about the open-ils-commits mailing list