make the splitter hideable
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 11 Jul 2005 08:09:42 +0000 (08:09 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 11 Jul 2005 08:09:42 +0000 (08:09 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1110 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 5872d26..871162f 100644 (file)
@@ -2,14 +2,26 @@ sdump('D_TRACE','Loading clam_shell.js\n');
 
 function clam_shell_init(p) {
        sdump('D_CLAM',"TESTING: clam_shell.js: " + mw.G['main_test_variable'] + '\n');
+       p.w.clamshell = get_widget(p.w.document,p.clamshell);
        if (p) {
                if (p.horizontal) {
-                       get_widget(p.w.document,p.clamshell).orient = 'horizontal';
+                       sdump('D_CLAM','Setting horizontal\n');
+                       p.w.clamshell.orient = 'horizontal';
                } else if (p.vertical) {
-                       get_widget(p.w.document,p.clamshell).orient = 'vertical';
+                       sdump('D_CLAM','Setting vertical\n');
+                       p.w.clamshell.orient = 'vertical';
                }
+               p.w.splitter = get_widget( p.w.document, p.splitter );
+               if (p.hide_splitter) {
+                       sdump('D_CLAM','Hiding splitter\n');
+                       p.w.splitter.hidden = true;
+               } else {
+                       sdump('D_CLAM','Showing splitter\n');
+                       p.w.splitter.hidden = false;
+               }
+                       
        }
-       var nl = get_widget(p.w.document,p.clamshell).getElementsByTagName('deck');
+       var nl = p.w.clamshell.getElementsByTagName('deck');
        var first_deck = nl[0];
        var second_deck = nl[1];
 
index 0aef532..b930bf1 100644 (file)
@@ -7,7 +7,11 @@
 <page id="clam_shell_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.clamshell = 'ClamShell_main'; params.w = window; params.app = 'ClamShell'; mw.OpenILS_init(params);"
+       onload="params.clamshell = 'ClamShell_main'; 
+               params.splitter = 'ClamShell_splitter';
+               params.w = window; 
+               params.app = 'ClamShell'; 
+               mw.OpenILS_init(params);"
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">