reset tab names for default tabs
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Feb 2006 04:18:28 +0000 (04:18 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Feb 2006 04:18:28 +0000 (04:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3179 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/menu.js

index 528c6b0..93a5132 100644 (file)
@@ -335,12 +335,12 @@ main.menu.prototype = {
        },
 
        'new_tab' : function(url,params,content_params) {
-               if (!params) params = {};
-               if (!content_params) content_params = {};
                var tc = this.find_free_tab();
                if (tc == -1) { return null; } // 9 tabs max
                var tab = this.controller.view.tabs.childNodes[ tc ];
                tab.hidden = false;
+               if (!content_params) content_params = {};
+               if (!params) params = { 'tab_name' : 'Tab ' + (tc+1) };
                try {
                        if (params.focus) this.controller.view.tabs.selectedIndex = tc;
                        params.index = tc;