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;
+}
+
}
+function _test() {
+ debug("At: " + (new RegExp(".+").exec(
+ arguments.callee.toString()))[0].replace("{", "") );
+}
+
function globalInit() {
+
+ _test();
debug(" --- XUL IS " + isXUL() );
-LocationTree.prototype.toggle = function(button_div, offsetx, offsety) {
+LocationTree.prototype.toggle = function(button_div, offsetx, offsety, relative) {
this.setObjects();
debug("Tree container " + this.treeContainerBox );
//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*/
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());
+}
+
+
+
+
var obj = this;
a.onclick = function(evt) {
- obj.copyLocationTree.toggle(null, 100, 100);
+ obj.copyLocationTree.toggle(null, 0, 0);
};
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;
WRAPPER html/js;
'
- if(!logicNode.UserSession.instance().connected) {
+ if(!logicNode.UserSession.instance().verifySession()) {
location.href="/opac/?target=login";
}
';
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');