adding some of the holds stuff..
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Jun 2005 21:24:02 +0000 (21:24 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Jun 2005 21:24:02 +0000 (21:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@958 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/javascript/opac/Page.js
Open-ILS/src/javascript/opac/RecordDetailPage.js
Open-ILS/src/javascript/opac/RecordResultPage.js

index 476b880..41b45b6 100644 (file)
@@ -288,3 +288,9 @@ Page.prototype.destroy = function() {
 }
 
 
+
+
+
+
+
+
index d8428aa..90c33f5 100644 (file)
@@ -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 {
 
index 2411a8a..1e7a035 100644 (file)
@@ -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";