var url = location.protocol + "//" + location.host + "/" + XML_HTTP_GATEWAY;
if(isXUL()) {
- if(this.secure)
+ if(this.secure || url.match(/^https:/) )
url = "https://" + XML_HTTP_SERVER + "/" + XML_HTTP_GATEWAY;
else
url = "http://" + XML_HTTP_SERVER + "/" + XML_HTTP_GATEWAY;
}
var data = null;
-
- if( this.type == 'GET' ) {
- url += "?" + this.param_string;
- }
-
+ if( this.type == 'GET' ) url += "?" + this.param_string;
try {
- dump( 'Remote Request URL: ' + url + '\n');
- } catch(E){}
-
- if(blocking) {
- this.xmlhttp.open(this.type, url, false);
- } else {
- this.xmlhttp.open(this.type, url, true);
+ if(blocking) this.xmlhttp.open(this.type, url, false);
+ else this.xmlhttp.open(this.type, url, true);
+
+ } catch(E) {
+ alert("Fatal error opening XMLHTTPRequest for URL:\n" + url + '\n');
+ return;
}
createEvt("common", "loggedIn"); /* f() : user has just logged in */
createEvt('result', 'zeroHits');
createEvt('result', 'lowHits');
+createEvt('rdetail', 'recordRetrieved'); /* we are about to draw the rdetail page */
function init() {
runEvt('common','init');
runEvt("common", "run");
- checkUserSkin();
+ //checkUserSkin();
G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name()));
}
function grabUser(ses, force) {
if(!ses) ses = cookie.get(COOKIE_SES);
+ try{if(!ses && isXUL()) ses = xulG['auth_ses'][0];}catch(e){}
if(!ses) return false;
+ //alert(ses);
+
if(!force)
if(G.user && G.user.session == ses)
return G.user;
function rdetailDraw() {
+
copyRowParent = G.ui.rdetail.cp_info_row.parentNode;
copyRow = copyRowParent.removeChild(G.ui.rdetail.cp_info_row);
statusRow = G.ui.rdetail.cp_status.parentNode;
if(getLocation() == globalOrgTree.id())
hideMe(G.ui.rdetail.cp_info_all);
-
-
var req = new Request(FETCH_RMODS, getRid());
req.callback(_rdetailDraw);
req.send();
function _rdetailDraw(r) {
record = r.getResultObject();
+ runEvt('rdetail', 'recordRetrieved', record.doc_id());
+
G.ui.rdetail.title.appendChild(text(record.title()));
buildSearchLink(STYPE_AUTHOR, record.author(), G.ui.rdetail.author);
G.ui.rdetail.isbn.appendChild(text(cleanISBN(record.isbn())));