tree.selectedIndex = idx;
var opt = tree.options[idx];
- if(opt) {
- debug("Setting idx " + idx + " to selected");
- opt.selected = true;
- }
+ if(opt) opt.selected = true;
+
}
var table = elem("table", { width: "100%" } );
this.viewMarc.appendChild(marcb);
}
+RecordDetailPage.prototype.setPlaceHold = function(record) {
+ var holds = elem( "a",
+ {
+ href:"javascript:void(0)",
+ style: "text-decoration:underline"
+ },
+ {}, "Place Hold" );
+
+ var func = new HoldsWindow(record).buildHoldsWindowCallback("M");
+ holds.onclick = func;
+
+ var space = elem("span", {style:"padding:5px"},null, " ");
+ this.viewMarc.appendChild(space);
+ this.viewMarc.appendChild(holds);
+}
+
RecordDetailPage.prototype.fetchRecord = function(id) {
if(!id) {
obj.buildCustomOrgTree(obj.record);
obj.drawRecord(obj.record);
obj.setViewMarc(obj.record);
+ obj.setPlaceHold(obj.record);
}
);
debug("Got ORG unit " + orgUnit);
orgUnit = findOrgUnit(orgUnit);
+ if(orgUnit == null) return;
debug("OrgUnit depth is: " + findOrgType(orgUnit.ou_type()).depth());
removeChildren(this.treeDiv);
removeChildren(cell5);
cell5.appendChild(createAppTextNode(
find_list(globalCopyStatus,
- function(i) { return (i.id() == copy.status()); } ).name() ));
+ function(i) {return (i.id() == copy.status());} ).name() ));
} else {
var html = req.getResultObject();
var id = record.doc_id();
- var win = window.open(null,"MARC_" + id,
+ //var win = window.open(null,"MARC_" + id,
+ var win = window.open("about:blank","MARC_" + id,
"location=0,menubar=0,status=0,resizeable,resize," +
"outerHeight=500,outerWidth=400,height=500," +
"width=400,scrollbars=1,screenX=100," +
- "screenY=100,top=100,left=100,alwaysraised" )
+ "screenY=100,top=100,left=100,alwaysraised,chrome" )
+
win.document.write(html);
win.document.close();
win.document.title = "View MARC";