1 /* Top level page object. All pages descend from this class */
5 Page.prototype.init = function() {
6 debug("Falling back to Page.init()");
10 Page.prototype.instance = function() {
12 "instance() must be overridden by all Page subclasses");
16 /* XXX move me to the status bar */
18 Page.prototype.updateSelectedLocation = function(org) {
20 if( typeof org == 'object' ) node = org;
21 else node = getOrgById(org);
22 globalSelectedLocation = node;
27 /* tells the user where he is searching */
28 Page.prototype.setLocDisplay = function(name) {
30 this.searchingCell = getById("now_searching_cell");
31 this.searchRange = getById("search_range_select");
33 if( this.searchingCell == null ) return;
37 if( globalSelectedLocation )
38 orgunit = globalSelectedLocation;
39 else { orgunit = globalLocation; }
41 var arr = orgNodeTrail(orgunit);
43 this.searchingCell.innerHTML = "";
44 var names = new Array()
46 names.push(arr[i].name());
48 this.searchingCell.innerHTML =
49 "<span class='breadcrumb_label'>" +
50 names.join("</span> / <span class='breadcrumb_label'>") +
53 if(globalSearchBarFormChunk)
54 globalSearchBarFormChunk.resetPage();
58 Page.prototype.updateCurrentLocation = function(org) {
59 if( typeof org == 'object' ) node = org;
60 else node = getOrgById(orgid);
61 globalLocation = node;