Put simple closures on the app_shell window
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 30 Jun 2005 04:54:18 +0000 (04:54 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 30 Jun 2005 04:54:18 +0000 (04:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@998 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/main/app_shell.js
Evergreen/staff_client/chrome/content/evergreen/main/app_shell.xul

index 5d97886..773c24a 100644 (file)
@@ -1,8 +1,15 @@
 sdump('D_TRACE','Loading app_shell.js\n');
 
-function app_shell_init(params) {
+function app_shell_init(p) {
        dump("TESTING: app_shell.js: " + mw.G['main_test_variable'] + '\n');
-       replace_tab(params.d,'main_tabbox','Tab','chrome://evergreen/content/main/about.xul');
+
+       p.w.close_tab = function (t1,t2) { return close_tab(p.d,t1,t2); };
+       p.w.delete_tab_contents = function (panel) { return delete_tab_contents(panel); };
+       p.w.find_free_tab = function (tabs) { return find_free_tab(tabs); };
+       p.w.new_tab = function () { return new_tab(p.d,p.tabbox); };
+       p.w.replace_tab = function (label,chrome,params) { return replace_tab(p.d,p.tabbox,label,chrome,params); };
+       
+       p.w.replace_tab('Tab','chrome://evergreen/content/main/about.xul');
 }
 
 function close_tab( d, t1, t2 ) {
index 72f8deb..2cd7e2c 100644 (file)
@@ -7,7 +7,7 @@
 <window id="app_shell_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.w = window; params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
+       onload="params.tabbox = 'main_tabbox'; params.w = window; params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">