From: erickson Date: Tue, 28 Jun 2005 21:24:02 +0000 (+0000) Subject: adding some of the holds stuff.. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e3c77c6cab4ff70d4df3d9893fa6dc3b0ac27aa4;p=Evergreen.git adding some of the holds stuff.. git-svn-id: svn://svn.open-ils.org/ILS/trunk@958 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/javascript/opac/Page.js b/Open-ILS/src/javascript/opac/Page.js index 476b880ae0..41b45b66d2 100644 --- a/Open-ILS/src/javascript/opac/Page.js +++ b/Open-ILS/src/javascript/opac/Page.js @@ -288,3 +288,9 @@ Page.prototype.destroy = function() { } + + + + + + diff --git a/Open-ILS/src/javascript/opac/RecordDetailPage.js b/Open-ILS/src/javascript/opac/RecordDetailPage.js index d8428aa3a5..90c33f575d 100644 --- a/Open-ILS/src/javascript/opac/RecordDetailPage.js +++ b/Open-ILS/src/javascript/opac/RecordDetailPage.js @@ -75,10 +75,8 @@ RecordDetailPage.prototype.draw = function() { 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%" } ); @@ -231,6 +229,22 @@ RecordDetailPage.prototype.setViewMarc = function(record) { 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) { @@ -251,6 +265,7 @@ RecordDetailPage.prototype.fetchRecord = function(id) { obj.buildCustomOrgTree(obj.record); obj.drawRecord(obj.record); obj.setViewMarc(obj.record); + obj.setPlaceHold(obj.record); } ); @@ -380,6 +395,7 @@ RecordDetailPage.prototype.drawCopyTrees = function(orgUnit, 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); @@ -558,7 +574,7 @@ RecordDetailPage.prototype.displayCopyTree = function(tree, title) { 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 { diff --git a/Open-ILS/src/javascript/opac/RecordResultPage.js b/Open-ILS/src/javascript/opac/RecordResultPage.js index 2411a8a1bf..1e7a035f8e 100644 --- a/Open-ILS/src/javascript/opac/RecordResultPage.js +++ b/Open-ILS/src/javascript/opac/RecordResultPage.js @@ -119,11 +119,13 @@ function buildViewMARCWindow(record) { 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";