web, keep movin on
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Jun 2005 20:35:12 +0000 (20:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Jun 2005 20:35:12 +0000 (20:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@917 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/css/opac/opac_main.css
Open-ILS/src/javascript/opac/GlobalInit.js
Open-ILS/src/javascript/opac/LocationTree.js
Open-ILS/src/javascript/opac/Page.js
Open-ILS/src/javascript/opac/RecordDetailPage.js
Open-ILS/src/javascript/util/webutils.js
Open-ILS/src/templates/opac/pages/my_opac.ttk
Open-ILS/src/templates/opac/pages/my_opac_secure.ttk

index 411fcca..5562187 100644 (file)
@@ -132,3 +132,22 @@ table { border-collapse: collapse; }
        text-decoration: underline;
 }
 
+
+.main_nav_table {
+}
+
+.main_nav_row {
+}
+
+.main_nav_cell {
+       background: #CCF;
+}
+
+.main_nav_cell_active {
+       background: #CFF;
+}
+
+.main_nav_cell a:hover {
+       color: red;
+}
+
index 6ae36b6..dd4c24a 100644 (file)
@@ -35,9 +35,16 @@ function addLocation(type, title) {
 
 }
 
+function _test() {
+       debug("At: " + (new RegExp(".+").exec(
+                       arguments.callee.toString()))[0].replace("{", "") );
+}
+
 
 function globalInit() {
 
+
+       _test();
        debug(" --- XUL IS " + isXUL() );
 
 
index 7bfc7ab..fd6b0da 100644 (file)
@@ -72,7 +72,7 @@ LocationTree.prototype.hide = function() {
 
 
 
-LocationTree.prototype.toggle = function(button_div, offsetx, offsety) {
+LocationTree.prototype.toggle = function(button_div, offsetx, offsety, relative) {
 
        this.setObjects();
        debug("Tree container " + this.treeContainerBox );
@@ -91,13 +91,19 @@ LocationTree.prototype.toggle = function(button_div, offsetx, offsety) {
 
        //alert(this.treeBox.firstChild.nodeType);
 
-       if( button_div && offsetx == null && offsety == null ) {
+       if( button_div && 
+                       ((offsetx == null && offsety == null) || relative) ) {
+
                var x = findPosX(button_div);
                var y = findPosY(button_div);
                var height = getObjectHeight(button_div);
                var xpos = x - getObjectWidth(this.treeBox) + getObjectWidth(button_div);
-               offsety = y + height;
-               offsetx = xpos; 
+
+               if(offsety == null) offsety = 0;
+               if(offsetx == null) offsetx = 0;
+
+               offsety = y + height + offsety;
+               offsetx = xpos + offsetx;       
        }
 
        if(IE) { /*HACK XXX*/
index 6153f86..8857308 100644 (file)
@@ -171,3 +171,31 @@ Page.prototype.buildDivider = function() {
        return div;
 }
 
+Page.prototype.buildNavBox = function() {
+       Page.navBox = new Box();
+       Page.navBox.init("Navigate", false, false);
+       var table = elem("table", {className:"main_nav_table"});
+
+       var arr = new Array();
+
+       arr.push(elem("a", {href:'?target=advanced_search'}, "Advanced Search"));
+       arr.push(elem("a", {href:'?target=my_opac'}, "My OPAC"));
+       arr.push(elem("a", {href:'?target=about'}, "About PINES"));
+
+       for( var i in arr ) {
+               var row = table.insertRow(table.rows.length);
+               add_css_class(row, "main_nav_row");
+               var cell = row.insertCell(row.cells.length);
+               add_css_class(cell, "main_nav_cell");
+       }
+
+       /* append to the page */
+       Page.navBox.addItem(table);
+       var location = getById("main_page_nav_box");
+       if(location)
+               location.appendChild(Page.navBox.getNode());
+}
+
+
+
+
index a2d6005..ba84365 100644 (file)
@@ -80,7 +80,7 @@ RecordDetailPage.prototype.draw = function() {
 
        var obj = this;
        a.onclick =  function(evt) {
-               obj.copyLocationTree.toggle(null, 100, 100);
+               obj.copyLocationTree.toggle(null, 0, 0);
        };
 
 
index ba33981..0e9a8d0 100644 (file)
@@ -37,7 +37,7 @@ function getById(id) {
                        obj = globalAppFrame.document.getElementById(id);
                }
        } catch(E) {
-               alert("We need a globalAppFrame to function:\n" + E);
+               debug(" + + + getById() for " + id + " failed and we have no app frame...: " + E);
        }
 
        return obj;
index cef395b..f544b12 100644 (file)
@@ -9,7 +9,7 @@
 
                        WRAPPER html/js;
                                '
-                               if(!logicNode.UserSession.instance().connected) {
+                               if(!logicNode.UserSession.instance().verifySession()) {
                                        location.href="/opac/?target=login";
                                } 
                                ';
index eca2a27..06e3c9d 100644 (file)
                                globalPage.init(); 
                                ';
 
+                       lines(2);
+                       WRAPPER html/box id='my_opac_nav_bar';
+                               WRAPPER html/center;
+                               WRAPPER html/table id='my_opac_nav_table';      
+                                       WRAPPER html/row;
+                                               cell(class='my_opac_link_cell', width="25%", id='my_opac_checked', 
+                                                               content=anchor(id='my_opac_checked_link', 
+                                                                       text="Checked Out", href="javascript:void(0);"));
+
+                                               cell(class='my_opac_link_cell', width="25%", id='my_opac_holds', 
+                                                               content=anchor(id='my_opac_holds_link', 
+                                                                       text="Holds", href="javascript:void(0);"));
+
+                                               cell(class='my_opac_link_cell', width="25%", id='my_opac_profile', 
+                                                               content=anchor(id='my_opac_profile_link', 
+                                                                       text="My Profile", href="javascript:void(0);"));
+
+                                               cell(class='my_opac_link_cell', width="25%", id='my_opac_fines', 
+                                                               content=anchor(id='my_opac_fines_link', 
+                                                                       text="Fines", href="javascript:void(0);"));
+                                       END;
+                               END;
+                               END;
+                       END;
+                       lines(2);
+
+                       WRAPPER html/box id='my_opac_info_pane';
+                               WRAPPER html/center;
+                                       WRAPPER html/table id='my_opac_info_table' width="80%";
+                                       END;
+                               END;
+                       END;
+
                        WRAPPER html/box id='my_opac_main_box';
                                box(id='my_opac_edit_personal');
                                box(id='my_opac_checked_out');