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 */
17 Page.prototype.updateSelectedLocation = function(org) {
19 if( typeof org == 'object' ) node = org;
20 else node = getOrgById(org);
21 globalSelectedLocation = node;
26 /* tells the user where he is searching */
27 Page.prototype.setLocDisplay = function(name) {
29 debug("Setting loc display on the status bar");
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'>") +
54 if(globalSearchBarFormChunk)
55 globalSearchBarFormChunk.resetPage();
60 Page.prototype.updateCurrentLocation = function(org) {
61 if( typeof org == 'object' ) node = org;
62 else node = getOrgById(orgid);
63 globalLocation = node;