if(paramObj.__location != null) {
globalSelectedLocation = findOrgUnit(paramObj.__location);
- debug("Setting selected location to " + globalSelectedLocation.name() );
+ if(globalSelectedLocation == null)
+ debug("Invalid location in url : " + paramObj.__location);
+ else
+ debug("Setting selected location to " + globalSelectedLocation.name() );
}
RecordDetailPage.prototype.draw = function() {
this.mainBox = getById("record_detail_copy_info");
- var linksDiv = elem("div");
- var leftLink = elem("div", { style: "width: 50%;text-align: left" });
- var rightLink = elem("div", { style: "width: 50%;text-align: right"});
- linksDiv.appendChild(leftLink);
- linksDiv.appendChild(rightLink);
- this.mainBox.appendChild(linksDiv);
-
- this.mainBox.appendChild(elem("br"));
+ var table = elem("table", { width: "100%" } );
+ table.width = "100%";
+
+ var linksDiv = table.insertRow(0);
+ var leftLink = linksDiv.insertCell(0);
+ var rightLink = linksDiv.insertCell(1);
+
+ leftLink.width = "50%";
+ rightLink.width = "50%";
+ leftLink.align = "left";
+ rightLink.align = "right";
+
this.parentLink = elem("a",
{ href : "javascript:void(0)",
id : "parent_link",
obj.copyLocationTree.toggle(null, 100, 100);
};
+
leftLink.appendChild(a);
rightLink.appendChild(this.parentLink);
+ this.mainBox.appendChild(table);
/* --------------------------------------------- */
}
var reg_div = createAppElement("div");
- reg_div.appendChild(href);
+ //reg_div.appendChild(href);
this.mainBox.insertBefore(reg_div, this.treeDiv);
}
/* these are user level exceptions from the server code */
if(instanceOf(obj, ex)) {
debug("Received user level exception: " + obj.err_msg());
+ /* the opac will go ahead and spit out the error msg */
+ if(!isXUL()) alert(obj.err_msg());
+ throw obj;
+ }
+
+ if(instanceOf(obj, perm_ex)) {
+ debug("Received permission error: " + obj.err_msg());
+ /* the opac will go ahead and spit out the error msg */
+ if(!isXUL()) alert(obj.err_msg());
throw obj;
}
var auth_request = new RemoteRequest( 'open-ils.auth',
'open-ils.auth.authenticate.complete', username,
- hex_md5(seed + hex_md5(password)));
+ hex_md5(seed + hex_md5(password)), "opac");
auth_request.send(true);
var auth_result = auth_request.getResultObject();
DUPLICATE_INVALID_USER_BARCODE => 4,
DUPLICATE_USER_USERNAME => 5,
USER_WRONG_PASSWORD => 6,
+ PERMISSION_DENIED => 7,
);
use overload ( '""' => sub { $_[0]->ex()->err_msg(); } );