tab labels
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Dec 2005 03:47:05 +0000 (03:47 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Dec 2005 03:47:05 +0000 (03:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2509 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/opac.xul
Open-ILS/xul/staff_client/server/circ/checkin.xul
Open-ILS/xul/staff_client/server/circ/hold_capture.xul
Open-ILS/xul/staff_client/server/main/menu.js
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/display.xul

index 80927dd..19745ab 100644 (file)
                                        } 
                                );
 
+                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                                       try { window.xulG.set_tab_name('Catalog'); } catch(E) { alert(E); }
+                               }
+
                        } 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';
index 8ea1466..392b766 100644 (file)
                                        } 
                                );
        
+                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                                       try { window.xulG.set_tab_name('Item Check In'); } catch(E) { alert(E); }
+                               }
+
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
                                        "system administrator or software developer the following:\n" 
index 0beb608..b790dce 100644 (file)
                                        } 
                                );
        
+                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                                       try { window.xulG.set_tab_name('Hold Capture'); } catch(E) { alert(E); }
+                               }
+
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
                                        "system administrator or software developer the following:\n" 
index d0561b0..bba144e 100644 (file)
@@ -237,6 +237,7 @@ main.menu.prototype = {
                frame.setAttribute('src',url);
                panel.appendChild(frame);
                content_params.new_tab = function(a,b,c) { obj.new_tab(a,b,c); }
+               content_params.set_tab_name = function(name) { tab.setAttribute('label',(idx + 1) + ' ' + name); }
                try {
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        frame.contentWindow.IAMXUL = true;
index 65bd34d..e26b27b 100644 (file)
                                );
                                tb.focus();
        
+                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                                       try { window.xulG.set_tab_name('Patron Scan'); } catch(E) { alert(E); }
+                               }
+
                        } 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';
index 11eb5d2..0e93eef 100644 (file)
@@ -181,6 +181,10 @@ patron.display.prototype = {
                );
 
                if (obj.barcode || obj.id) {
+                       if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                               try { window.xulG.set_tab_name('Retrieving Patron...'); } catch(E) { alert(E); }
+                       }
+
                        obj.controller.view.PatronNavBar.selectedIndex = 1;
                        obj.controller.view.cmd_patron_refresh.setAttribute('disabled','true');
                        obj.controller.view.cmd_patron_checkout.setAttribute('disabled','true');
@@ -198,7 +202,9 @@ patron.display.prototype = {
                                {},
                                {
                                        'on_finished' : function(patron) {
+
                                                obj.patron = patron; obj.controller.render();
+
                                                obj.controller.view.cmd_patron_refresh.setAttribute('disabled','false');
                                                obj.controller.view.cmd_patron_checkout.setAttribute('disabled','false');
                                                obj.controller.view.cmd_patron_items.setAttribute('disabled','false');
@@ -206,6 +212,12 @@ patron.display.prototype = {
                                                obj.controller.view.cmd_patron_bills.setAttribute('disabled','false');
                                                obj.controller.view.cmd_patron_edit.setAttribute('disabled','false');
                                                obj.controller.view.cmd_patron_info.setAttribute('disabled','false');
+
+                                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                                                       try { window.xulG.set_tab_name(patron.family_name() + ' : ' + patron.card().barcode() ); } 
+                                                       catch(E) { alert(E); }
+                                               }
+
                                                if (!obj._checkout_spawned) {
                                                        spawn_checkout_interface();
                                                        obj._checkout_spawned = true;
@@ -215,6 +227,10 @@ patron.display.prototype = {
                        );
                        obj.summary_window = frame.contentWindow;
                } else {
+                       if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+                               try { window.xulG.set_tab_name('Patron Search'); } catch(E) { alert(E); }
+                       }
+
                        obj.controller.view.PatronNavBar.selectedIndex = 0;
                        obj.controller.view.cmd_patron_retrieve.setAttribute('disabled','true');
                        var form_frame = obj.left_deck.set_iframe(
index c617c4a..825f0c4 100644 (file)
@@ -46,7 +46,7 @@
                                        'barcode' : g.cgi.param('barcode') ,
                                        'id' : g.cgi.param('id') ,
                                } );
-       
+
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
                                        "system administrator or software developer the following:\n"