holds are coming along
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Nov 2005 23:14:09 +0000 (23:14 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Nov 2005 23:14:09 +0000 (23:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2025 dcc99617-32d9-48b4-a31d-7c20da2025e4

12 files changed:
Open-ILS/src/extras/fieldmapper.pl
Open-ILS/web/opac/common/js/config.js
Open-ILS/web/opac/common/js/utils.js
Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/mresult.js
Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/js/rdetail.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/js/sidebar.js
Open-ILS/web/opac/skin/default/xml/altcanvas.xml
Open-ILS/web/opac/skin/default/xml/result_common.xml
Open-ILS/web/opac/skin/default/xml/result_table.xml

index 2ad8680..066e4bf 100755 (executable)
@@ -11,10 +11,10 @@ if(!$web) { $web = ""; }
 
 # List of classes needed by the opac
 my @web_hints = qw/asv asva asvr asvq 
-               circ acp acpl acn ccs ahn ahr aua ac 
+               circ acp acpl acn ccs ahn aua ac 
                actscecm crcd crmf crrf mus mbts aoc aus/;
 
-my @web_core = qw/ aou au perm_ex ex aout mvr ccs /;
+my @web_core = qw/ aou au perm_ex ex aout mvr ccs ahr /;
 
 
 print "var _c = {};\n";
index b6272c1..237054c 100644 (file)
@@ -194,6 +194,7 @@ var FETCH_HOLDS                                     = "open-ils.circ:open-ils.circ.holds.retrieve";
 var FETCH_FINES_SUMMARY                        = "open-ils.actor:open-ils.actor.user.fines.summary";
 var FETCH_TRANSACTIONS                 = "open-ils.actor:open-ils.actor.user.transactions.have_charge.fleshed";
 var FETCH_CROSSREF                             = "open-ils.search:open-ils.search.authority.crossref";
+var CREATE_HOLD                                        = "open-ils.circ:open-ils.circ.holds.create";
 /* ---------------------------------------------------------------------------- */
 
 
@@ -223,6 +224,10 @@ function attachEvt(scope, name, action) {
        G.evt[scope][name].push(action);
 }
 
+function detachEvt(scope, name) {
+       G.evt[scope][name] = null;
+}
+
 createEvt("common", "init");                                           /* f() : what happens on page init */
 createEvt("common", "pageRendered");                   /* f() : what happens when the page is done (up to the skin to call this even)*/
 createEvt("common", "unload");                                 /* f() : what happens on window unload (clean memory, etc.)*/
index 1dbbd60..174b27d 100644 (file)
@@ -219,6 +219,8 @@ function isNull(n) {
 
 /* find nodes with an attribute of 'name' that equals nodeName */
 
+function $n( root, nodeName ) { return findNodeByName(root,nodeName); }
+
 function findNodeByName(root, nodeName) {
        if( !root || !nodeName) return null;
 
index b935701..c0f11d9 100644 (file)
@@ -154,3 +154,5 @@ border-left: 1px solid #E0E0E0; border-top: 1px solid #E0E0E0; border-bottom: 1p
 .myopac_form_pic { width: 20px; height: 20px; }
 
 .tips { padding: 2px; text-align: center; border: solid #E0E0E0 3px; -moz-border-radius: 3px; width: 99%; }
+
+.holds_cell { border: 1px solid #E0E0E0; padding: 5px; width: 50%;}
index 8d18919..73becea 100644 (file)
@@ -46,7 +46,7 @@ function mresultHandleCount(r) {
 function mresultCollectIds(method) {
 
        if(getOffset() == 0) {
-               idsCookie.put(COOKIE_IDS,"");
+               idsCookie.put(COOKIE_IDS,"[]");
                idsCookie.write();
 
        } else {
index beefa71..27bf445 100644 (file)
@@ -20,17 +20,17 @@ function myOPACInit() {
 
 function myOPACChangePage( page ) {
        
-       var s = getId("myopac_summary_td");
-       var c = getId("myopac_checked_td");
-       var f = getId("myopac_fines_td");
-       var h = getId("myopac_holds_td");
-       var p = getId("myopac_prefs_td");
-
-       var ss = getId("myopac_summary_div");
-       var cc = getId("myopac_checked_div");
-       var ff = getId("myopac_fines_div");
-       var hh = getId("myopac_holds_div");
-       var pp = getId("myopac_prefs_div");
+       var s = $("myopac_summary_td");
+       var c = $("myopac_checked_td");
+       var f = $("myopac_fines_td");
+       var h = $("myopac_holds_td");
+       var p = $("myopac_prefs_td");
+
+       var ss = $("myopac_summary_div");
+       var cc = $("myopac_checked_div");
+       var ff = $("myopac_fines_div");
+       var hh = $("myopac_holds_div");
+       var pp = $("myopac_prefs_div");
 
        var cls = "myopac_link";
        var acls = "myopac_link_active";
@@ -78,8 +78,10 @@ function myOPACChangePage( page ) {
                        break;
        }
 
+       /*
        alert('Classes:\n' + s.className + '\n' + c.className + 
                '\n' + h.className + '\n' + f.className + '\n' + p.className);
+               */
 }
 
 function myOPACShowChecked() {
@@ -94,12 +96,12 @@ function myOPACDrawCheckedOut(r) {
 
 
        var checked                     = r.getResultObject();
-       var tbody                       = getId("myopac_checked_tbody");
-       var loading                     = getId("myopac_checked_loading");
-       var none                                = getId("myopac_checked_none");
+       var tbody                       = $("myopac_checked_tbody");
+       var loading                     = $("myopac_checked_loading");
+       var none                                = $("myopac_checked_none");
 
        if(checkedRowTemplate) return;
-       checkedRowTemplate = tbody.removeChild(getId("myopac_checked_row"));
+       checkedRowTemplate = tbody.removeChild($("myopac_checked_row"));
 
        clearNodes( tbody, [ loading, none ] );
 
@@ -144,15 +146,15 @@ function myOPACShowHolds() {
 var holdsTemplateRow;
 function myOPACDrawHolds(r) {
 
-       var tbody = getId("myopac_holds_tbody");
+       var tbody = $("myopac_holds_tbody");
        if(holdsTemplateRow) return;
-       holdsTemplateRow = tbody.removeChild(getId("myopac_holds_row"));
+       holdsTemplateRow = tbody.removeChild($("myopac_holds_row"));
 
-       hideMe(getId('myopac_holds_loading'));
+       hideMe($('myopac_holds_loading'));
 
        var holds = r.getResultObject();
 
-       if(!holds || holds.length < 1) unHideMe(getId('myopac_holds_none'));
+       if(!holds || holds.length < 1) unHideMe($('myopac_holds_none'));
        for( var i = 0; i != holds.length; i++ ) {
 
                var h = holds[i];
@@ -164,9 +166,12 @@ function myOPACDrawHolds(r) {
                form.id = "myopac_holds_form_" + h.target();
                if(formats) form.appendChild(text(formats));
 
-               findNodeByName(row, "myopac_holds_location").appendChild(text(findOrgUnit(h.pickup_lib()).name()));
-               findNodeByName(row, "myopac_holds_email_link").appendChild(text(h.email_notify()));
-               findNodeByName(row, "myopac_holds_phone_link").appendChild(text(h.phone_notify()));
+               findNodeByName(row, "myopac_holds_location").
+                       appendChild(text(findOrgUnit(h.pickup_lib()).name()));
+               findNodeByName(row, "myopac_holds_email_link").
+                       appendChild(text(h.email_notify()));
+               findNodeByName(row, "myopac_holds_phone_link").
+                       appendChild(text(h.phone_notify()));
                tbody.appendChild(row);
                unHideMe(row);
 
@@ -186,14 +191,14 @@ function myOPACDrawHoldTitle(hold) {
 function myOPACFleshHoldTitle(r) {
 
        var record = r.getResultObject();
-       var row = getId("myopac_holds_row_" + record.doc_id());
+       var row = $("myopac_holds_row_" + record.doc_id());
        var title_link = findNodeByName(row, "myopac_holds_title_link");
        var author_link = findNodeByName(row, "myopac_holds_author_link");
 
        buildTitleDetailLink(record, title_link);
        buildSearchLink(STYPE_AUTHOR, record.author(), author_link);
 
-       var form = getId("myopac_holds_form_" + record.doc_id());
+       var form = $("myopac_holds_form_" + record.doc_id());
 
        if(form) {
                var img = elem("img");
@@ -212,8 +217,8 @@ function myOPACShowFines() {
 }
 
 function _myOPACShowFines(r) {
-       hideMe(getId('myopac_fines_summary_loading'));
-       unHideMe(getId('myopac_fines_summary_row'));
+       hideMe($('myopac_fines_summary_loading'));
+       unHideMe($('myopac_fines_summary_row'));
 
        var summary = r.getResultObject();
        var total       = "0.00"; /* localization? */
@@ -230,9 +235,9 @@ function _myOPACShowFines(r) {
                req.send();
        }
 
-       getId('myopac_fines_summary_total').appendChild(text(total));
-       getId('myopac_fines_summary_paid').appendChild(text(paid));
-       getId('myopac_fines_summary_balance').appendChild(text(balance));
+       $('myopac_fines_summary_total').appendChild(text(total));
+       $('myopac_fines_summary_paid').appendChild(text(paid));
+       $('myopac_fines_summary_balance').appendChild(text(balance));
 }
 
 function _finesFormatNumber(num) {
@@ -250,13 +255,13 @@ var transTemplate;
 function myOPACShowTransactions(r) {
 
        if(transTemplate) return;
-       var tbody = getId('myopac_fines_tbody');
-       unHideMe(getId('myopac_trans_table'));
-       transTemplate = tbody.removeChild(getId('myopac_trans_row'));
+       var tbody = $('myopac_fines_tbody');
+       unHideMe($('myopac_trans_table'));
+       transTemplate = tbody.removeChild($('myopac_trans_row'));
 
        var transactions = r.getResultObject();
 
-       alert(js2JSON(transactions));
+       //alert(js2JSON(transactions));
 
        for( var idx in transactions ) {
 
@@ -264,12 +269,18 @@ function myOPACShowTransactions(r) {
                var record = transactions[idx].record;
                var row = transTemplate.cloneNode(transTemplate);
 
-               findNodeByName(row,'myopac_trans_start').appendChild(text(_trimSeconds(trans.xact_start())));
-               findNodeByName(row,'myopac_trans_last_bill').appendChild(text(_trimSeconds(trans.last_billing_ts())));
-               findNodeByName(row,'myopac_trans_last_payment').appendChild(text(_trimSeconds(trans.last_payment_ts())));
-               findNodeByName(row,'myopac_trans_init_amount').appendChild(text(_finesFormatNumber(trans.total_owed())));
-               findNodeByName(row,'myopac_trans_total_paid').appendChild(text(_finesFormatNumber(trans.total_paid())));
-               findNodeByName(row,'myopac_trans_balance').appendChild(text(_finesFormatNumber(trans.balance_owed())));
+               findNodeByName(row,'myopac_trans_start').
+                       appendChild(text(_trimSeconds(trans.xact_start())));
+               findNodeByName(row,'myopac_trans_last_bill').
+                       appendChild(text(_trimSeconds(trans.last_billing_ts())));
+               findNodeByName(row,'myopac_trans_last_payment').
+                       appendChild(text(_trimSeconds(trans.last_payment_ts())));
+               findNodeByName(row,'myopac_trans_init_amount').
+                       appendChild(text(_finesFormatNumber(trans.total_owed())));
+               findNodeByName(row,'myopac_trans_total_paid').
+                       appendChild(text(_finesFormatNumber(trans.total_paid())));
+               findNodeByName(row,'myopac_trans_balance').
+                       appendChild(text(_finesFormatNumber(trans.balance_owed())));
 
                var extra = "";
                var type = trans.xact_type();
@@ -298,22 +309,22 @@ function _myOPACSummaryShowUer(r) {
        var user = r.getResultObject();
        fleshedUser = user;
 
-       getId('myopac_summary_first').appendChild(text(user.first_given_name()));
-       getId('myopac_summary_middle').appendChild(text(user.second_given_name()));
-       getId('myopac_summary_dayphone').appendChild(text(user.day_phone()));
-       getId('myopac_summary_eveningphone').appendChild(text(user.evening_phone()));
-       getId('myopac_summary_otherphone').appendChild(text(user.other_phone()));
-       getId('myopac_summary_last').appendChild(text(user.family_name()));
-       getId('myopac_summary_username').appendChild(text(user.usrname()));
-       getId('myopac_summary_email').appendChild(text(user.email()));
-       getId('myopac_summary_barcode').appendChild(text(user.card().barcode()));
-       getId('myopac_summary_ident1').appendChild(text(user.ident_value()));
-       getId('myopac_summary_ident2').appendChild(text(user.ident_value2()));
-       getId('myopac_summary_homelib').appendChild(text(findOrgUnit(user.home_ou()).name()));
-       getId('myopac_summary_create_date').appendChild(text(user.create_date()));
-
-       var tbody = getId('myopac_addr_tbody');
-       var template = tbody.removeChild(getId('myopac_addr_row'));
+       $('myopac_summary_first').appendChild(text(user.first_given_name()));
+       $('myopac_summary_middle').appendChild(text(user.second_given_name()));
+       $('myopac_summary_dayphone').appendChild(text(user.day_phone()));
+       $('myopac_summary_eveningphone').appendChild(text(user.evening_phone()));
+       $('myopac_summary_otherphone').appendChild(text(user.other_phone()));
+       $('myopac_summary_last').appendChild(text(user.family_name()));
+       $('myopac_summary_username').appendChild(text(user.usrname()));
+       $('myopac_summary_email').appendChild(text(user.email()));
+       $('myopac_summary_barcode').appendChild(text(user.card().barcode()));
+       $('myopac_summary_ident1').appendChild(text(user.ident_value()));
+       $('myopac_summary_ident2').appendChild(text(user.ident_value2()));
+       $('myopac_summary_homelib').appendChild(text(findOrgUnit(user.home_ou()).name()));
+       $('myopac_summary_create_date').appendChild(text(user.create_date()));
+
+       var tbody = $('myopac_addr_tbody');
+       var template = tbody.removeChild($('myopac_addr_row'));
        for( var a in user.addresses() ) {
                var row = template.cloneNode(true);
                myOPACDrawAddr(row, user.addresses()[a]);
index 962a4cb..ef98308 100644 (file)
@@ -150,7 +150,7 @@ function _rdetailBuildInfoRows(r) {
 
                var arr = summary[i];
                var thisOrg = findOrgUnit(arr[0]);
-               var rowNode = getId("cp_info_" + thisOrg.id());
+               var rowNode = $("cp_info_" + thisOrg.id());
 
                if(rowNode.getAttribute("used")) {
 
@@ -185,7 +185,7 @@ function _rdetailBuildInfoRows(r) {
        path if it's local */
 function rdetailSetPath(org, local) {
        if( findOrgDepth(org) == 0 ) return;
-       var row = getId("cp_info_" + org.id());
+       var row = $("cp_info_" + org.id());
        row.setAttribute("hasinfo", "1");
        if(local) {
                unHideMe(row);
index 697a02f..63dfc31 100644 (file)
@@ -83,27 +83,20 @@ function resultDisplayRecord(rec, pos, is_mr) {
                var rank = parseFloat(ranks[pos + getOffset()]);
                rank = ( rank / getTopRank() ) * 100;
                rank = parseInt(rank) + "%";
-               var relspan = findNodeByName(r, "relevancy_span");
+               var relspan = $n(r, "relevancy_span");
                relspan.appendChild(text(rank));
                unHideMe(relspan.parentNode);
        } catch(e){ }
 
-       var pic = findNodeByName(r, config.names.result.item_jacket);
+       var pic = $n(r, config.names.result.item_jacket);
        pic.setAttribute("src", buildISBNSrc(cleanISBN(rec.isbn())));
 
-       var title_link = findNodeByName(r, config.names.result.item_title);
-       var author_link = findNodeByName(r, config.names.result.item_author);
+       var title_link = $n(r, config.names.result.item_title);
+       var author_link = $n(r, config.names.result.item_author);
 
        if( is_mr )  {
                var onlyrec = onlyrecord[ getOffset() + pos ];
                if(onlyrec) {
-                       /*
-                       var id = rec.doc_id();
-                       rec.doc_id(onlyrec);
-                       buildTitleDetailLink(rec, title_link); 
-                       rec.doc_id(id);
-                       */
-
                        var args = {};
                        args.page = RDETAIL;
                        args[PARAM_OFFSET] = 0;
@@ -129,6 +122,10 @@ function resultDisplayRecord(rec, pos, is_mr) {
                args[PARAM_OFFSET] = 0;
                args[PARAM_RID] = rec.doc_id();
                pic.parentNode.setAttribute("href", buildOPACLink(args));
+
+               unHideMe($n(r,'place_hold_span'));
+               $n(r,'place_hold_link').setAttribute(
+                       'href','javascript:resultDrawHoldsWindow("'+rec.doc_id()+'");');
        }
 
        buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
@@ -136,18 +133,18 @@ function resultDisplayRecord(rec, pos, is_mr) {
        if(! is_mr ) {
        
                if(!isNull(rec.edition()))      {
-                       unHideMe( findNodeByName(r, "result_table_extra_span"));
-                       findNodeByName(r, "result_table_edition_span").appendChild( text( rec.edition()) );
+                       unHideMe( $n(r, "result_table_extra_span"));
+                       $n(r, "result_table_edition_span").appendChild( text( rec.edition()) );
                }
                if(!isNull(rec.pubdate())) {
-                       unHideMe( findNodeByName(r, "result_table_extra_span"));
-                       unHideMe(findNodeByName(r, "result_table_pub_span"));
-                       findNodeByName(r, "result_table_pub_span").appendChild( text( rec.pubdate() ));
+                       unHideMe( $n(r, "result_table_extra_span"));
+                       unHideMe($n(r, "result_table_pub_span"));
+                       $n(r, "result_table_pub_span").appendChild( text( rec.pubdate() ));
                }
                if(!isNull(rec.publisher()) ) {
-                       unHideMe( findNodeByName(r, "result_table_extra_span"));
-                       unHideMe(findNodeByName(r, "result_table_pub_span"));
-                       findNodeByName(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() ));
+                       unHideMe( $n(r, "result_table_extra_span"));
+                       unHideMe($n(r, "result_table_pub_span"));
+                       $n(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() ));
                }
        }
 
@@ -166,6 +163,131 @@ function resultDisplayRecord(rec, pos, is_mr) {
        }
 }
 
+function _resultFindRec(id) {
+       for( var i = 0; i != recordsCache.length; i++ ) {
+               var rec = recordsCache[i];
+               if( rec && rec.doc_id() == id )
+                       return rec;
+       }
+       return null;
+}
+
+var currentHoldRecord;
+var holdsOrgSelectorBuilt = false;
+function resultDrawHoldsWindow(recid) {
+
+       if(recid == null) {
+               recid = currentHoldRecord;
+               if(recid == null) return;
+       }
+       currentHoldRecord = recid;
+
+       if(!(G.user && G.user.session)) {
+
+               attachEvt('common','loggedIn', resultDrawHoldsWindow)
+               initLogin();
+               return;
+       }
+       swapCanvas($('holds_box'));
+
+       var rec = _resultFindRec(recid);
+
+       if(!holdsOrgSelectorBuilt) {
+               resultBuildHoldsSelector(null, 0);
+               holdsOrgSelectorBuilt = true;
+       }
+
+       removeChildren($('holds_title'));
+       removeChildren($('holds_author'));
+       removeChildren($('holds_format'));
+       removeChildren($('holds_email'));
+       removeChildren($('holds_email'));
+
+       $('holds_title').appendChild(text(rec.title()));
+       $('holds_author').appendChild(text(rec.author()));
+
+       for( var i in rec.types_of_resource() ) {
+               var res = rec.types_of_resource()[i];
+               var img = elem("img");
+               setResourcePic(img, res);
+               $('holds_format').appendChild(text(' '+res+' '));
+               $('holds_format').appendChild(img);
+               $('holds_format').appendChild(text(' '));
+       }
+
+       $('holds_phone').appendChild(text(G.user.day_phone()));
+       $('holds_email').appendChild(text(G.user.email()));
+       $('holds_cancel').onclick = showCanvas;
+       $('holds_submit').onclick = resultPlaceHold; 
+}
+
+
+function resultBuildHoldsSelector(node, depth) {
+
+       if(!node) {
+               node = globalOrgTree;
+               depth = 0;
+       }
+
+       var selector = $('holds_org_selector');
+       var index = selector.options.length;
+
+       if(IE) {
+               var pre = elem("pre");
+               for(var x=2; x <= findOrgType(node.ou_type()).depth(); x++) {
+                       pre.appendChild(text("    "));
+               }
+               pre.appendChild(text(node.name()));
+               var select = new Option("", node.id());
+               selector.options[index] = select;
+               select.appendChild(pre);
+       
+       } else {
+               var pad = (findOrgType(node.ou_type()).depth() - 1) * 12;
+               var select = new Option(node.name(), node.id());
+               select.setAttribute("style", "padding-left: " + pad);
+               selector.options[index] = select;
+       }       
+
+       if( node.id() == getLocation() ) {
+               selector.selectedIndex = index;
+               selector.options[index].selected = true;        
+       }
+
+       for( var i in node.children() ) {
+               var child = node.children()[i];
+               if(child) {
+                       resultBuildHoldsSelector(child, depth+1);
+               }
+       }
+}
+
+function resultPlaceHold() {
+       //alert("placing hold for " + currentHoldRecord );
+
+       var hold = new ahr();
+       hold.pickup_lib( 1 ); /* */
+       hold.requestor(G.user.id());
+       hold.usr(G.user.id());
+       hold.hold_type('T');
+       hold.email_notify(G.user.email());
+       hold.phone_notify(G.user.day_phone());
+       hold.target(currentHoldRecord);
+       
+       var req = new Request( CREATE_HOLD, G.user.session, hold );
+       req.send(true);
+       var res = req.result();
+
+       /* XMLize me */
+       if( res == '1' ) {
+               alert('ok');
+       } else {
+               alert('hold failed');
+       }
+}
+
+
+
 function resultBuildFormatIcons( row, rec ) {
 
        var ress = rec.types_of_resource();
@@ -173,7 +295,7 @@ function resultBuildFormatIcons( row, rec ) {
        for( var i in ress ) {
 
                var res = ress[i];
-               var link = findNodeByName(row, res + "_link");
+               var link = $n(row, res + "_link");
                link.title = res;
                var img = link.getElementsByTagName("img")[0];
                removeCSSClass( img, config.css.dim );
@@ -219,8 +341,8 @@ var resultCCHeaderApplied = false;
 function resultAddCopyCounts(rec, pagePosition) {
 
        var r = table.rows[pagePosition + 1];
-       var countsrow = findNodeByName(r, config.names.result.counts_row );
-       var ccell = findNodeByName(countsrow, config.names.result.count_cell);
+       var countsrow = $n(r, config.names.result.counts_row );
+       var ccell = $n(countsrow, config.names.result.count_cell);
 
        var nodes = orgNodeTrail(findOrgUnit(getLocation()));
        var node = nodes[0];
@@ -235,8 +357,8 @@ function resultAddCopyCounts(rec, pagePosition) {
        var cchead = null;
        var ccheadcell = null;
        if(!resultCCHeaderApplied) {
-               ccrow = getId('result_thead_row');
-               ccheadcell =  ccrow.removeChild(findNodeByName(ccrow, "result_thead_ccell"));
+               ccrow = $('result_thead_row');
+               ccheadcell =  ccrow.removeChild($n(ccrow, "result_thead_ccell"));
                var t = ccheadcell.cloneNode(true);
                lastheadcell = t;
                t.appendChild(text(type.opac_label()));
@@ -274,7 +396,7 @@ function resultAddCopyCounts(rec, pagePosition) {
                }
        }
 
-       unHideMe(getId("search_info_table"));
+       unHideMe($("search_info_table"));
 }
 
 /* collect copy counts for a record using method 'methodName' */
@@ -296,7 +418,7 @@ function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
        if(copy_counts == null || rec == null) return;
        var i = 0;
        while(copy_counts[i] != null) {
-               var cell = getId("copy_count_cell_" + i +"_" + pagePosition);
+               var cell = $("copy_count_cell_" + i +"_" + pagePosition);
                /*
                var span = cell.getElementsByTagName("div")[0];
                */
@@ -337,8 +459,8 @@ function resultDrawSubjects() {
        resultDrawSidebarTrees( 
                STYPE_SUBJECT, 
                "subjectSidebarTree", ss, 
-               getId("subject_tree_sidebar"), 
-               getId("subject_sidebar_tree_div") );
+               $("subject_tree_sidebar"), 
+               $("subject_sidebar_tree_div") );
 }
 
 function resultDrawAuthors() {
@@ -348,8 +470,8 @@ function resultDrawAuthors() {
        resultDrawSidebarTrees( 
                STYPE_AUTHOR, 
                "authorSidebarTree", auths.sort(), 
-               getId("author_tree_sidebar"), 
-               getId("author_sidebar_tree_div") );
+               $("author_tree_sidebar"), 
+               $("author_sidebar_tree_div") );
 }
 
 function resultDrawSeries() {
@@ -358,8 +480,8 @@ function resultDrawSeries() {
        resultDrawSidebarTrees( 
                STYPE_SERIES, 
                "seriesSidebarTree", sers.sort(), 
-               getId("series_tree_sidebar"), 
-               getId("series_sidebar_tree_div") );
+               $("series_tree_sidebar"), 
+               $("series_sidebar_tree_div") );
 }
 
 function resultDrawSidebarTrees( stype, treeName, items, wrapperNode, destNode ) {
@@ -428,13 +550,13 @@ function resultAppendCrossRef(r) {
 
        for( var i = 0; (total++ < 5 && i < froms.length); i++ ) {
                var string = normalize(truncate(froms[i], 45));
-               if(getId(stype + '_' + froms[i])) continue;
+               if($(stype + '_' + froms[i])) continue;
                tree.addNode(stype + '_' + froms[i], 
                        stype + '_' + item, string, resultQuickLink(froms[i],stype));
        }
        for( var i = 0; (total++ < 10 && i < alsos.length); i++ ) {
                var string = normalize(truncate(alsos[i], 45));
-               if(getId(stype + '_' + alsos[i])) continue;
+               if($(stype + '_' + alsos[i])) continue;
                tree.addNode(stype + '_' + alsos[i], 
                        stype + '_' + item, string, resultQuickLink(alsos[i],stype));
        }
index 3011a95..a1be00a 100644 (file)
@@ -10,19 +10,19 @@ function initSideBar() {
        var page = findCurrentPage();
 
        if( page == MRESULT ) 
-               unHideMe(getId("sidebar_results_wrapper"));
+               unHideMe($("sidebar_results_wrapper"));
 
        if( page == RRESULT ) {
-               unHideMe(getId("sidebar_results_wrapper"));
+               unHideMe($("sidebar_results_wrapper"));
                unHideMe(G.ui.sidebar[MRESULT]);
-               getId("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT }));
+               $("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT }));
        }
 
        if( page == RDETAIL ) {
-               unHideMe(getId("sidebar_results_wrapper"));
-               getId("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT }));
+               unHideMe($("sidebar_results_wrapper"));
+               $("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT }));
                unHideMe(G.ui.sidebar[MRESULT]);
-               getId("sidebar_title_results").setAttribute("href", buildOPACLink({ page : RRESULT }));
+               $("sidebar_title_results").setAttribute("href", buildOPACLink({ page : RRESULT }));
                unHideMe(G.ui.sidebar[RRESULT]);
        }
 
index 908dbb3..85e2784 100644 (file)
@@ -16,6 +16,9 @@
        <script language='javascript'>
                config.ids.altcanvas.login              = config.ids.login.box;
                config.ids.altcanvas.org_tree    = config.ids.common.org_container;
+               config.ids.altcanvas.holds                      = 'holds_box';
        </script>
 
+       <xi:include href='holds.xml'/>
+
 </div>
index 4b80fed..b4cd625 100644 (file)
@@ -29,9 +29,6 @@
                config.names.result.count_cell  = "copy_count_cell";
        </script>
 
-       <!--
-       <div id='loading_div' class='color_1'> Loading Results... </div>
-       -->
        <xi:include href="result_table.xml"/>
 </div>
 
index 84b0573..22bad9f 100644 (file)
@@ -55,7 +55,9 @@
 
                                                                <td  colspan='5' 
                                                                        style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
-                                                                               <span id='search_info_table' class='hide_me' style='font-size: 8pt;'> <b>Available copies / Total copies </b></span>
+                                                                               <span id='search_info_table' class='hide_me' style='font-size: 8pt;'>
+                                                                                       <b>Available copies / Total copies </b>
+                                                                               </span>
                                                                </td>
                                                        </tr>
 
@@ -65,7 +67,6 @@
                                                                        width='12%' align='center' name='result_thead_ccell'> </td>
                                                        </tr>
 
-
                                                </tbody>
                                        </table>
                                </td>
@@ -87,7 +88,9 @@
 
                                                        <tr style='height: 1em' name='counts_row'>
 
-                                                               <td  rowspan='3' class='result_table_pic_header'><a><img name='item_jacket' class='result_table_pic'/></a></td>
+                                                               <td  rowspan='3' class='result_table_pic_header'>
+                                                                       <a><img name='item_jacket' class='result_table_pic'/></a>
+                                                               </td>
 
                                                                <td class='result_table_title_cell' name='result_table_title_cell'>
                                                                        <a title="View titles for this record" name='item_title' class='search_link'> 
                                                                                <img src='../../../images/tor/three dimensional object.jpg' class='dim tor_pic'> </img>
                                                                        </a>
 
-                                                                       <span class='hide_me' style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                                                       <span class='hide_me' 
+                                                                               style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
                                                                                <span>&common.relevancy; </span><span name='relevancy_span'> </span>
                                                                        </span>
 
+                                                                       <span class='hide_me' name='place_hold_span'>
+                                                                               <a href='javascript:void(0);' name='place_hold_link'>Place Hold</a>
+                                                                       </span>
+
                                                                </td>
                                                        </tr>