--- /dev/null
+body a { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover { color: #7d0049; text-decoration: underline;}
+
+
+/* the idea is to have 4 complimentary colors that
+ * are used throughout the opac. Edit those colors
+ * in this file
+ */
+
+.color_1 { background: #acc4de; color: #000000; }
+.color_2 { background: #acc4de; color: #000000; }
+.color_3 { background: #d1e1a2; color: #000000; }
+.color_4 { background: #d1e1a2; color: #000000; }
+
+.border_1 { border: 1px solid #6699cc; }
+.border_2 { border: 1px solid #6699cc; }
+.border_3 { border: 1px solid #ddeeff; }
+.border_4 { border: 1px solid #ddeeff; }
+
+.border_1_2 { border: 2px solid #6699cc; }
+.border_2_2 { border: 2px solid #6699cc; }
+.border_3_2 { border: 2px solid #ddeeff; }
+.border_4_2 { border: 2px solid #ddeeff; }
+
+.border_1_3 { border: 3px solid #6699cc; }
+.border_2_3 { border: 3px solid #6699cc; }
+.border_3_3 { border: 3px solid #ddeeff; }
+.border_4_3 { border: 3px solid #ddeeff; }
+
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #6699cc; }
+.facetClassLabelContainer { background: #acc4de; border: 1px solid #acc4de; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #d1e1a2; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #acc4de; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #acc4de; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #e5f1fd; color: #000000;}
+a:focus { background: #e5f1fd; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+ border-left: 3px solid #7fa2ca;
+ border-bottom: 3px solid #7fa2ca;
+ border-top: 3px solid #7fa2ca;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #7fa2ca; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #acc4de; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #6699cc; }
+.rdetail_item { border: 1px solid #6699cc; }
+.rdetail_extras_selected { background: #d1e1a2;}
+
+
+.data_grid thead tr { background: #acc4de; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #6699cc; }
+.data_grid_nb thead tr { background: #6699cc; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #99ccff; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #99ccff;}
+
+.myopac_link_active { background: #ddeeff; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; }
+#login_box { border-top: 1px solid #7fa2ca; border-bottom: 1px solid #7fa2ca; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; color: #0e63ba;}
+.result_table_subtable { border-top: 1px solid #Eeffff; }
+
+.copy_count_cell { border-right: 1px solid #E0E0E0; }
+.copy_count_div { border-left: 2px solid #99ccff; border-right: 2px solid #99ccff; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #99ccff;}
+
+/* For slimpac */
+.maintable { border-collapse: collapse; border: 3px solid #6699cc; -moz-border-radius: 6px; padding: 6px; margin-top: 65px; }
+.greenrow { border: 1px solid #D0D0D0; background: #ddeeff; }
+.bluerow { border: 1px solid #D0D0D0; background: #6699cc; }
+.rowpad { height: 20px; }
+
+.footer_link { margin-left: 10px; margin-right: 10px; }
+
+.indent0 { padding-left: 0px; }
+.indent1 { padding-left: 10px; }
+.indent2 { padding-left: 20px; }
+
+
--- /dev/null
+/* make images in search results larger */
+.result_table_pic_cell { width: 103px; }
+.result_table_pic { height: 100px; width: 80px; }
+.result_table_pic_header { width: 103px; }
+
+
+/* Make titles in search results larger */
+.result_table_title_cell { padding-top: 10px; }
+a[name="item_title"] { font-size: 1.5em; }
+.result_table_format_cell { padding-top: 10px; }
+
+/* Make titles in record details larger */
+#rdetail_details_tbody tr:first-child td.rdetail_item { font-size: 1.5em; padding-top: 5px; }
+
+/* Make sidebar links larger */
+.side_bar_item { font-size: 1.25em; }
+
+/* Shrink the search box a bit -- mostly to prevent the Go button from ending up
+ beneath the search box in Chrome */
+#search_box { width: 190px; }
+
+/* Make a less colorful front / home page */
+#frontsearch_table tbody tr { background-color: white; border: none; }
+#frontsearch_table tbody tr td { background-color: white; border: none; }
+
+/* Inspired by GRPL class "hold_button" */
+.css_button {
+ background-color: lightgray;
+ border: 2px outset;
+ height: 15px;
+ padding: 6px 8px 2px;
+ margin-bottom: 4px;
+ text-decoration: none;
+ display: inline-block;
+}
--- /dev/null
+function getHoldCount(id){
+ var holdCount = null;
+ var result = null;
+
+ if (window.XMLHttpRequest) {
+ // Code for all new browsers
+ holdCount = new XMLHttpRequest();
+ } else if ( window.ActiveXObject ) {
+ // Code for IE 5 and 6
+ holdCount = new ActiveXObject( "Microsoft.XMLHTTP" );
+ }
+
+ holdCount.open( "GET", "/cgi-bin/utils/public/hold_count_tadl.cgi?id=" + id, false )
+ holdCount.onreadystatechange = function() {
+ if (holdCount.readyState == 4) {
+ result = holdCount.responseText;
+ }
+ }
+ holdCount.send(null);
+
+ if (holdCount.responseText)
+ return holdCount.responseText;
+
+}
--- /dev/null
+
+attachEvt("common", "run", myOPACInit );
+//attachEvt("common", "loggedIn", myOPACInit );
+attachEvt('common','locationUpdated', myopacReload );
+
+dojo.requireLocalization("openils.opac", "opac");
+
+var opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
+var fleshedUser = null;
+var fleshedContainers = {};
+var holdCache = {};
+var holdStatusCache = {};
+var showHoldQueuePosition = false;
+var allowPendingAddr = false;
+var myopacEnableRefWorks = false;
+var myopacRefWorksHost = 'http://www.refworks.com';
+
+function clearNodes( node, keepArray ) {
+ if(!node) return;
+ for( var n in keepArray ) node.removeChild(keepArray[n]);
+ removeChildren(node);
+ for( var n in keepArray ) node.appendChild(keepArray[n]);
+}
+
+function myOPACInit() {
+
+ fieldmapper.IDL.load(['mous']);
+
+ var orgHiding = checkOrgHiding();
+ if (orgHiding) {
+ hideMe($('prefs_def_location_row'));
+ hideMe($('prefs_def_range_row'));
+ }
+
+ if(!(G.user && G.user.session)) {
+ initLogin();
+
+ } else {
+
+ allowPendingAddr = fetchOrgSettingDefault(G.user.home_ou(), 'opac.allow_pending_address');
+ if(allowPendingAddr)
+ unHideMe($('myopac_pending_addr_td'));
+ myOPACChangePage( "summary" );
+ }
+
+ $('myopac_holds_thaw_date_input').onkeyup =
+ function(){holdsVerifyThawDateUI('myopac_holds_thaw_date_input'); }
+ $('myopac_holds_thaw_date_input').onchange =
+ function(){holdsVerifyThawDateUI('myopac_holds_thaw_date_input'); }
+
+}
+
+function myopacReload() {
+ //swapCanvas($('myopac_reloading'));
+ var a = {};
+ a[PARAM_LOCATION] = getNewSearchLocation();
+ a[PARAM_DEPTH] = getNewSearchDepth();
+ hideMe($('canvas_main'));
+ goTo(buildOPACLink(a, true));
+}
+
+
+function myOPACChangePage( page ) {
+ showCanvas();
+
+ 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 b = $('myopac_bookbag_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 bb = $('myopac_bookbag_div');
+
+ var cls = "myopac_link";
+ var acls = "myopac_link_active";
+
+ hideMe(ss);
+ hideMe(cc); hideMe(ff);
+ hideMe(hh); hideMe(pp);
+ hideMe(bb);
+
+ removeCSSClass(s, acls );
+ removeCSSClass(c, acls );
+ removeCSSClass(f, acls );
+ removeCSSClass(h, acls );
+ removeCSSClass(p, acls );
+ removeCSSClass(b, acls );
+
+ switch( page ) {
+
+ case "summary":
+ unHideMe(ss);
+ addCSSClass(s, acls );
+ myOPACShowSummary();
+ break;
+
+ case "checked":
+ unHideMe(cc);
+ addCSSClass(c, acls );
+ myOPACShowChecked();
+ break;
+
+ case "holds":
+ unHideMe(hh);
+ addCSSClass(h, acls );
+ myOPACShowHolds();
+ break;
+
+ case "fines":
+ unHideMe(ff);
+ addCSSClass(f, acls );
+ myOPACShowFines();
+ break;
+
+ case "prefs":
+ unHideMe(pp);
+ addCSSClass(p, acls );
+ myOPACShowPrefs();
+ break;
+
+ case 'bookbag':
+ unHideMe(bb);
+ addCSSClass(b, acls);
+ myOPACShowBookbags();
+ break;
+ }
+}
+
+function myOPACShowChecked() {
+ if(checkedDrawn) return;
+ var req = new Request(FETCH_CHECKED_OUT_SUM, G.user.session, G.user.id());
+ req.callback(myOPACDrawCheckedOutSlim);
+ req.send();
+
+ var nreq = new Request(FETCH_NON_CAT_CIRCS, G.user.session);
+ nreq.callback(myOPACDrawNonCatCircs);
+ nreq.send();
+}
+
+
+var checkedRowTemplate;
+var circsCache = new Array();
+var checkedDrawn = false;
+
+function moClearCheckedTable() {
+ var tbody = $("myopac_checked_tbody");
+ var loading = $("myopac_checked_loading");
+ var none = $("myopac_checked_none");
+ clearNodes( tbody, [ loading, none ] );
+}
+
+var __can_renew_one = false;
+
+function myOPACDrawCheckedOutSlim(r) {
+
+ var checked = r.getResultObject();
+ var tbody = $("myopac_checked_tbody");
+ var loading = $("myopac_checked_loading");
+ var none = $("myopac_checked_none");
+
+ __can_renew_one = false;
+
+ if(checkedDrawn) return;
+ checkedDrawn = true;
+ if(!checkedRowTemplate)
+ checkedRowTemplate = tbody.removeChild($("myopac_checked_row"));
+
+ moClearCheckedTable();
+
+ hideMe(loading); /* remove all children and start over */
+ if(!(checked && (checked.out || checked.overdue))) {
+ unHideMe(none);
+ return;
+ }
+
+ var totalAsync = checked.overdue.length + checked.out.length;
+ var fetchedCircs = [];
+ var collectCircs = function(r) {
+ var circ = r.getResultObject();
+ circ._od = r.od;
+ fetchedCircs.push(circ);
+ if(fetchedCircs.length < totalAsync) return;
+
+ // sort by due date, oldest to newest
+ fetchedCircs = fetchedCircs.sort(
+ function(a, b) {
+ if(a.due_date() > b.due_date()) return 1;
+ return -1;
+ }
+ )
+
+ dojo.forEach(fetchedCircs,
+ function(circ) {
+ myOPACDrawCheckedItem(circ, tbody);
+ }
+ );
+ }
+
+ for( var i = 0; i < checked.overdue.length; i++ ) {
+ var req = new Request(FETCH_CIRC_BY_ID, G.user.session, checked.overdue[i]);
+ //req.request.tbody = tbody;
+ req.request.od = true;
+ req.callback(collectCircs);
+ req.send();
+ }
+
+
+ for( var i = 0; i < checked.out.length; i++ ) {
+ var req = new Request(FETCH_CIRC_BY_ID, G.user.session, checked.out[i]);
+ //req.request.tbody = tbody;
+ req.callback(collectCircs);
+ req.send();
+ }
+
+ appendClear($('mo_items_out_count'),
+ text(new String( parseInt(checked.overdue.length) + parseInt(checked.out.length) )) );
+
+ if( checked.overdue.length > 0 ) {
+ addCSSClass($('mo_items_overdue_count'), 'overdue');
+ appendClear($('mo_items_overdue_count'),
+ text(new String( parseInt(checked.overdue.length) )) );
+ }
+
+}
+
+
+//function myOPACDrawCheckedItem(r) {
+function myOPACDrawCheckedItem(circ, tbody) {
+
+ //var circ = r.getResultObject();
+ //var tbody = r.tbody;
+ var row = checkedRowTemplate.cloneNode(true);
+ row.id = 'myopac_checked_row_ ' + circ.id();
+ row.setAttribute('circid', circ.id());
+
+ var due = _trimTime(circ.due_date());
+
+ var dlink = $n( row, "myopac_checked_due" );
+ var rlink = $n( row, "myopac_checked_renewals" );
+ //var rnlink = $n( row, "myopac_checked_renew_link" );
+
+ //if( r.od ) due = elem('b', {style:'color:red;font-size:110%'},due);
+ if( circ._od ) {
+ due = elem('b', null, due);
+ addCSSClass(due, 'overdue');
+ } else {
+ due = text(due);
+ }
+
+ dlink.appendChild(due);
+ rlink.appendChild(text(circ.renewal_remaining()));
+ unHideMe(row);
+ //rnlink.setAttribute('href', 'javascript:myOPACRenewCirc("'+circ.id()+'");');
+ circsCache.push(circ);
+
+ if( circ.renewal_remaining() < 1 ) {
+ $n(row, 'selectme').disabled = true;
+ if(!__can_renew_one)
+ $('mo_renew_button').disabled = true;
+ } else {
+ __can_renew_one = true;
+ $('mo_renew_button').disabled = false;
+ $n(row, 'selectme').disabled = false;
+ }
+
+ tbody.appendChild(row);
+
+ var req = new Request(FETCH_MODS_FROM_COPY, circ.target_copy() );
+ req.request.alertEvent = false;
+ req.request.circ = circ.id();
+ req.request.copy = circ.target_copy();
+ req.callback(myOPACDrawCheckedTitle);
+ req.send();
+}
+
+var __circ_titles = {};
+
+function myOPACDrawCheckedTitle(r) {
+ var record = r.getResultObject();
+ var circid = r.circ;
+
+ /* Draw pre-cataloged items */
+ if(!record || checkILSEvent(record) || !(record.title() || record.author())) {
+ var req = new Request( FETCH_COPY, r.copy );
+ req.request.circ = circid;
+ req.callback(myOPACDrawPreCatalogedItem);
+ req.send();
+ return;
+ }
+
+ var row = $('myopac_checked_row_ ' + circid);
+ var tlink = $n( row, "myopac_checked_title_link" );
+ var alink = $n( row, "myopac_checked_author_link" );
+
+ buildTitleDetailLink(record, tlink);
+ buildSearchLink(STYPE_AUTHOR, record.author(), alink);
+ __circ_titles[circid] = record.title();
+}
+
+function myOPACDrawPreCatalogedItem(r) {
+ var copy = r.getResultObject();
+ var circid = r.circ;
+
+ var row = $('myopac_checked_row_ ' + circid);
+ var tlink = $n( row, "myopac_checked_title_link" );
+ var alink = $n( row, "myopac_checked_author_link" );
+
+ tlink.parentNode.appendChild(text(copy.dummy_title()));
+ alink.parentNode.appendChild(text(copy.dummy_author()));
+ __circ_titles[circid] = copy.dummy_title();
+}
+
+
+/*
+function myOPACRenewCirc(circid) {
+
+ var circ;
+ for( var i = 0; i != circsCache.length; i++ )
+ if(circsCache[i].id() == circid)
+ circ = circsCache[i];
+
+ if(!confirm($('myopac_renew_confirm').innerHTML)) return;
+
+ var req = new Request(RENEW_CIRC, G.user.session,
+ { patron : G.user.id(), copyid : circ.target_copy(), opac_renewal : 1 } );
+ req.request.alertEvent = false;
+ req.send(true);
+ var res = req.result();
+
+ if(checkILSEvent(res) || checkILSEvent(res[0])) {
+ alertId('myopac_renew_fail');
+ return;
+ }
+
+ alert($('myopac_renew_success').innerHTML);
+ checkedDrawn = false;
+ myOPACShowChecked();
+}
+*/
+
+
+
+function myOPACShowHolds() {
+ var req = new Request(FETCH_HOLDS, G.user.session, G.user.id());
+ req.callback(myOPACDrawHolds);
+ req.send();
+ $('myopac_holds_actions_none').selected = true;
+}
+
+var holdsTemplateRowOrig;
+var holdsTemplateRow;
+var myopacForceHoldsRedraw = false;
+function myOPACDrawHolds(r) {
+
+ var tbody = $("myopac_holds_tbody");
+ if(holdsTemplateRow && !myopacForceHoldsRedraw) return;
+ myopacForceHoldsRedraw = false;
+
+ if(holdsTemplateRowOrig) {
+ holdsTemplateRow = holdsTemplateRowOrig;
+ removeChildren(tbody);
+ } else {
+ holdsTemplateRow = tbody.removeChild($("myopac_holds_row"));
+ holdsTemplateRowOrig = holdsTemplateRow;
+ }
+
+ hideMe($('myopac_holds_loading'));
+
+ var holds = r.getResultObject();
+
+ if(!holds || holds.length < 1) unHideMe($('myopac_holds_none'));
+ for( var i = 0; i != holds.length; i++ ) {
+
+ var h = holds[i];
+ holdCache[h.id()] = h;
+
+ var row = holdsTemplateRow.cloneNode(true);
+ row.id = "myopac_holds_row_" + h.id();
+
+ var form = $n(row, "myopac_holds_formats");
+ form.id = "myopac_holds_form_" + h.id();
+
+ var orglink = $n(row, "myopac_holds_location");
+ orglink.appendChild(text(findOrgUnit(h.pickup_lib()).name()));
+
+ tbody.appendChild(row);
+
+ $n(row,'myopac_holds_edit_link').setAttribute(
+ 'href','javascript:myOPACEditHold("'+ h.id()+'");');
+
+ if(isTrue(h.frozen())) {
+ hideMe($n(row, 'myopac_hold_unfrozen_true'))
+ unHideMe($n(row, 'myopac_hold_unfrozen_false'))
+ if(h.thaw_date()) {
+ var d = dojo.date.stamp.fromISOString(h.thaw_date());
+ $n(row, 'myopac_holds_frozen_until').appendChild(text(dojo.date.locale.format(d, {selector: 'date', fullYear: true})));
+ }
+ } else {
+ unHideMe($n(row, 'myopac_hold_unfrozen_true'))
+ hideMe($n(row, 'myopac_hold_unfrozen_false'))
+ }
+
+ $n(row, 'myopac_holds_selected_chkbx').checked = false;
+
+ var exp_date;
+ if(h.expire_time()) {
+ exp_date = dojo.date.stamp.fromISOString(h.expire_time().replace(/(T\d\d:\d\d:\d\d)([+-]\d\d)(\d)/, "$1$2:$3"));
+ $n(row, 'myopac_hold_expire_time').appendChild(
+ text(dojo.date.locale.format(exp_date, {selector:'date'})));
+ }
+
+ unHideMe(row);
+
+ var interval = fetchOrgSettingDefault(G.user.home_ou(), 'circ.hold_expire_alert_interval');
+ if(interval && exp_date) {
+ secs = interval_to_seconds(interval) * 1000;
+ var diff = exp_date.getTime() - new Date().getTime();
+ if(diff < secs)
+ addCSSClass($n(row, 'myopac_hold_expire_time'), 'hold_expire_warning');
+ }
+
+ myOPACDrawHoldTitle(h);
+ myOPACDrawHoldStatus(h);
+ }
+}
+
+function myOPACEditHold(holdid) {
+ var hold = holdCache[holdid];
+
+ holdsDrawEditor(
+ {
+ editHold : hold,
+ onComplete : function(){
+ holdsTemplateRow = null;
+ myOPACShowHolds();
+ }
+ }
+ );
+}
+
+
+function myOPACDrawHoldStatus(hold) {
+ var req = new Request(FETCH_HOLD_STATUS, G.user.session, hold.id() );
+ req.callback(myOShowHoldStatus);
+ req.request.hold = hold;
+ req.send();
+}
+
+var myopacShowHoldEstimate = false;
+function myOShowHoldStatus(r) {
+
+ var hold = r.hold;
+ var qstats = r.getResultObject();
+ holdStatusCache[hold.id()] = qstats;
+
+ var row = $("myopac_holds_row_" + r.hold.id());
+
+ if(qstats.estimated_wait || myopacShowHoldEstimate) {
+ myopacShowHoldEstimate = true;
+ if(qstats.estimated_wait) {
+ // wait is currently returned in seconds, but displayed in days
+ var wait = Math.ceil(qstats.estimated_wait / 86400);
+ $n(row, 'myopac_holds_estimated_wait').appendChild(text(wait));
+ }
+ unHideMe($('myopac_holds_estimated_wait_column'));
+ unHideMe($n(row, 'myopac_holds_estimated_wait'));
+ }
+
+ if( qstats.status == 4 ) {
+ unHideMe($n(row, 'hold_status_available'));
+ hideMe($n(row, 'myopac_holds_cancel_link'));
+ }
+
+ if (showHoldQueuePosition) {
+ var node = $n(row, 'hold_qstats');
+ if (qstats.potential_copies == 1) {
+ node.appendChild(text(dojo.string.substitute(opac_strings.HOLD_STATUS_SINGULAR, [qstats.queue_position, qstats.total_holds, qstats.potential_copies])));
+ } else {
+ node.appendChild(text(dojo.string.substitute(opac_strings.HOLD_STATUS_PLURAL, [qstats.queue_position, qstats.total_holds, qstats.potential_copies])));
+ }
+ unHideMe(node);
+
+ } else {
+ if( qstats.status < 3 )
+ unHideMe($n(row, 'hold_status_waiting'));
+
+ if( qstats.status == 3 )
+ unHideMe($n(row, 'hold_status_transit'));
+ }
+}
+
+
+function myOPACDrawHoldTitle(hold) {
+ var method;
+
+ if( hold.hold_type() == 'T' || hold.hold_type() == 'M') {
+ if(hold.hold_type() == "M") method = FETCH_MRMODS;
+ if(hold.hold_type() == "T") method = FETCH_RMODS;
+ var req = new Request(method, hold.target());
+ req.callback(myOPACFleshHoldTitle);
+ req.request.hold = hold;
+ req.request.alertEvent = false;
+ req.send();
+
+ } else {
+ holdFetchObjects(hold,
+ function(a) { _myOPACFleshHoldTitle(hold, a);});
+ }
+}
+
+function myOPACFleshHoldTitle(r) {
+ var rec = r.getResultObject();
+ _myOPACFleshHoldTitle(r.hold, {recordObject: rec});
+}
+
+function _myOPACFleshHoldTitle(hold, holdObjects) {
+
+ var record = holdObjects.recordObject;
+ var volume = holdObjects.volumeObject;
+ var copy = holdObjects.copyObject;
+
+ var row = $("myopac_holds_row_" + hold.id());
+ var title_link = $n(row, "myopac_holds_title_link");
+ var author_link = $n(row, "myopac_holds_author_link");
+
+ if(!record || checkILSEvent(record) ) {
+ addCSSClass(row, 'invalid_hold');
+ $n(row, 'myopac_holds_edit_link').setAttribute('href', 'javascript:void(0);');
+ $n(row, 'myopac_holds_edit_link').onclick = function(){alertId('invalid_hold');};
+ return;
+ }
+
+ buildTitleDetailLink(record, title_link);
+ buildSearchLink(STYPE_AUTHOR, record.author(), author_link);
+
+ if(hold.hold_type() == 'P') {
+ unHideMe($n(row, 'vol_copy'));
+ $n(row, 'part').appendChild(text(holdObjects.partObject.label));
+ }
+
+ if( volume ) {
+ $n(row, 'volume').appendChild(text(volume.label()));
+ unHideMe($n(row, 'vol_copy'));
+ if(copy) $n(row, 'copy').appendChild(text(copy.barcode()));
+ }
+
+ var form = $("myopac_holds_form_" + hold.id());
+
+ if(form) {
+ var mods_formats = record.types_of_resource();
+
+ if( hold.hold_type() == 'M' ) {
+ var data = holdsParseMRFormats(hold.holdable_formats());
+ mods_formats = data.mods_formats;
+ }
+
+ for( var i = 0; i < mods_formats.length; i++ ) {
+ var img = elem("img");
+ setResourcePic(img, mods_formats[i]);
+ form.appendChild(img);
+ }
+ }
+}
+
+var finesShown = false;
+function myOPACShowFines() {
+ if(finesShown) return; finesShown = true;
+ var req = new Request(FETCH_FINES_SUMMARY, G.user.session, G.user.id() );
+ req.callback(_myOPACShowFines);
+ req.send();
+ $('myopac_fines_pay_ses').value = G.user.session;
+}
+
+function _myOPACShowFines(r) {
+ hideMe($('myopac_fines_summary_loading'));
+ unHideMe($('myopac_fines_summary_row'));
+
+ var summary = r.getResultObject();
+ var total = "0.00"; /* localization? */
+ var paid = "0.00";
+ var balance = "0.00";
+ if( instanceOf(summary,mous) ) {
+
+ total = _finesFormatNumber(summary.total_owed());
+ paid = _finesFormatNumber(summary.total_paid());
+ balance = _finesFormatNumber(summary.balance_owed());
+
+ var req = new Request(FETCH_TRANSACTIONS, G.user.session, G.user.id() );
+ req.callback(myOPACShowTransactions);
+ req.send();
+ }
+
+ $('myopac_fines_summary_total').appendChild(text(total));
+ $('myopac_fines_summary_paid').appendChild(text(paid));
+ $('myopac_fines_summary_balance').appendChild(text(balance));
+}
+
+function _finesFormatNumber(num) {
+ if(isNull(num)) num = 0;
+ num = num + "";
+ if(num.length < 2 || !num.match(/\./)) num += ".00";
+ if(num.match(/\./) && num.charAt(num.length-2) == '.') num += "0";
+ return num;
+}
+
+//function _trimTime(time) { if(!time) return ""; return time.replace(/\ .*/,""); }
+function _trimTime(time) {
+ if(!time) return "";
+ time = time.replace(/(T\d\d:\d\d:\d\d)([+-]\d\d)(\d)/, "$1$2:$3");
+ var d = dojo.date.stamp.fromISOString(time);
+ if(!d) return ""; /* date parse failed */
+ return dojo.date.locale.format(d, {"formatLength": "medium"});
+}
+
+function _trimSeconds(time) {
+ if(!time) return "";
+ var d = dojo.date.stamp.fromISOString(time.replace(/(T\d\d:\d\d:\d\d)([+-]\d\d)(\d)/, "$1$2:$3"));
+ if(!d) return ""; /* date parse failed */
+ return dojo.date.locale.format(d, { "timePattern" : "h:ma", "formatLength" : "medium" });
+}
+
+function myOPACShowTransactions(r) {
+
+ if(myopacGenericTransTemplate || myopacCircTransTemplate) return;
+
+ var transactions = r.getResultObject();
+
+ for( var idx in transactions ) {
+
+ var trans = transactions[idx].transaction;
+ var record = transactions[idx].record;
+ var circ = transactions[idx].circ;
+
+ if(trans.xact_type() == 'circulation')
+ myOPACShowCircTransaction(trans, record, circ);
+
+ else if(trans.xact_type() == 'grocery' )
+ myopacShowGenericTransaction( trans );
+
+/* XXX need to copy circulation output function here
+ else if(trans.xact_type() == 'reservation' )
+ myopacShowReservationTransaction( trans );
+*/
+
+ }
+}
+
+var myopacGenericTransTemplate;
+function myopacShowGenericTransaction( trans ) {
+ var tbody = $('myopac_trans_tbody');
+
+ if(!myopacGenericTransTemplate) {
+ myopacGenericTransTemplate =
+ tbody.removeChild($('myopac_trans_row'));
+ removeChildren(tbody);
+ }
+
+ var row = myopacGenericTransTemplate.cloneNode(true);
+
+ $n(row,'myopac_trans_start').appendChild(
+ text(_trimSeconds(trans.xact_start())));
+
+ $n(row,'myopac_trans_last_payment').appendChild(
+ text(_trimSeconds(trans.last_payment_ts())));
+
+ $n(row,'myopac_trans_init_amount').appendChild(
+ text(_finesFormatNumber(trans.total_owed())));
+
+ $n(row,'myopac_trans_total_paid').appendChild(
+ text(_finesFormatNumber(trans.total_paid())));
+
+ $n(row,'myopac_trans_balance').appendChild(
+ text(_finesFormatNumber(trans.balance_owed())));
+
+ var req = new Request(FETCH_MONEY_BILLING, G.user.session, trans.id());
+ req.send(true);
+ var bills = req.result();
+ if(bills && bills[0])
+ $n(row,'myopac_trans_bill_type').appendChild(
+ text(bills[0].billing_type()));
+
+ tbody.appendChild(row);
+ unHideMe($('myopac_trans_div'));
+}
+
+
+
+/* draws a circulation transaction summary */
+var myopacCircTransTemplate;
+function myOPACShowCircTransaction(trans, record, circ) {
+ var tbody = $('myopac_circ_trans_tbody');
+
+ if(!myopacCircTransTemplate) {
+ myopacCircTransTemplate = tbody.removeChild($('myopac_circ_trans_row'));
+ removeChildren(tbody);
+ }
+
+ var row = myopacCircTransTemplate.cloneNode(true);
+
+ if(record) {
+ buildTitleDetailLink(record, $n(row,'myopac_circ_trans_title'));
+
+ $n(row,'myopac_circ_trans_author').appendChild(text(
+ normalize(truncate(record.author(), 65))));
+
+ } else {
+
+ var req = new Request( FETCH_COPY, circ.target_copy() );
+ req.alertEvents = false;
+ req.send(true);
+ var copy = req.result();
+ if( copy ) {
+ $n(row,'myopac_circ_trans_title').appendChild(text(copy.dummy_title()));
+ $n(row,'myopac_circ_trans_author').appendChild(text(copy.dummy_author()));
+ }
+ }
+
+
+ $n(row,'myopac_circ_trans_start').
+ appendChild(text(_trimTime(trans.xact_start())));
+ var due = _trimTime(circ.due_date());
+ var checkin = _trimTime(circ.stop_fines_time());
+
+ $n(row,'myopac_circ_trans_due').appendChild(text(due))
+ if(checkin)
+ appendClear($n(row,'myopac_circ_trans_finished'), text(checkin));
+ if(circ.stop_fines() == 'LOST')
+ appendClear($n(row,'myopac_circ_trans_finished'), text(circ.stop_fines()));
+ if(circ.stop_fines() == 'CLAIMSRETURNED')
+ appendClear($n(row,'myopac_circ_trans_finished'), text(""));
+
+
+ $n(row,'myopac_circ_trans_balance').
+ appendChild(text(_finesFormatNumber(trans.balance_owed())));
+
+ tbody.appendChild(row);
+ unHideMe($('myopac_circ_trans_div'));
+}
+
+
+function myOPACSavePrefs() {
+ G.user.prefs[PREF_HITS_PER] = getSelectorVal($('prefs_hits_per'));
+ G.user.prefs[PREF_DEF_FONT] = getSelectorVal($('prefs_def_font'));
+ G.user.prefs[PREF_HOLD_NOTIFY] = getSelectorVal($('prefs_hold_notify'));
+ G.user.prefs[PREF_DEF_DEPTH] = getSelectorVal($('prefs_def_range'));
+
+ if( $('myopac_pref_home_lib').checked == true )
+ G.user.prefs[PREF_DEF_LOCATION] = null;
+ else
+ G.user.prefs[PREF_DEF_LOCATION] = getSelectorVal($('prefs_def_location'));
+
+ if(commitUserPrefs())
+ alert($('prefs_update_success').innerHTML);
+ else alert($('prefs_update_failure').innerHTML);
+}
+
+
+function myOPACShowDefFont() {
+ var font;
+ if(G.user.prefs[PREF_DEF_FONT])
+ font = G.user.prefs[PREF_DEF_FONT];
+ else font = "regular";
+ setSelector($('prefs_def_font'), font);
+}
+
+function myOPACShowHoldNotify() {
+ var pref = G.user.prefs[PREF_HOLD_NOTIFY];
+
+ if(pref) {
+ if(pref.match(/email/i) && pref.match(/phone/i)) {
+ setSelector($('prefs_hold_notify'), 'phone:email');
+ } else if( pref.match(/email/i) ) {
+ setSelector($('prefs_hold_notify'), 'email');
+ } else if( pref.match(/phone/i) ) {
+ setSelector($('prefs_hold_notify'), 'phone');
+ }
+
+ } else {
+ setSelector($('prefs_hold_notify'), 'phone:email');
+ }
+}
+
+function myOPACShowPrefs() {
+ grabUserPrefs();
+ myOPACShowHitsPer();
+ myOPACShowDefFont();
+ myOPACShowHoldNotify();
+ myOPACShowDefLocation();
+ hideMe($('myopac_prefs_loading'));
+}
+
+var defSearchLocationDrawn = false;
+var defDepthIndex = 0;
+function myOPACShowDefLocation() {
+
+ var selector = $('prefs_def_location');
+ var rsel = $('prefs_def_range');
+
+ if(!defSearchLocationDrawn) {
+
+ defSearchLocationDrawn = true;
+
+ var org = G.user.prefs[PREF_DEF_LOCATION];
+
+ if(!org) {
+ $('myopac_pref_home_lib').checked = true;
+ $('prefs_def_location').disabled = true;
+ org = G.user.home_ou();
+ }
+
+ buildOrgSel(selector, globalOrgTree, 0);
+
+ globalOrgTypes = globalOrgTypes.sort(
+ function(a, b) {
+ if( a.depth() < b.depth() ) return -1;
+ return 1;
+ }
+ );
+
+ iterate(globalOrgTypes,
+ function(t) {
+ if( t.depth() <= findOrgDepth(org) ) {
+ setSelectorVal(rsel, defDepthIndex++, t.opac_label(), t.depth());
+ if( t.depth() == findOrgDepth(org) )
+ setSelector(rsel, t.depth());
+ }
+ }
+ );
+ }
+
+ setSelector(selector, org);
+}
+
+function myOPACShowHitsPer() {
+ var hits = 10;
+ if(G.user.prefs[PREF_HITS_PER])
+ hits = G.user.prefs[PREF_HITS_PER];
+ var hitsSel = $('prefs_hits_per');
+ setSelector(hitsSel, hits);
+}
+
+var userShown = false;
+function myOPACShowSummary() {
+ if(userShown) return; userShown = true;
+ var req = new Request(FETCH_FLESHED_USER,G.user.session, G.user.id());
+ req.callback(_myOPACSummaryShowUer);
+ req.send();
+}
+
+var addrRowTemplate;
+var notesTemplate;
+function _myOPACSummaryShowUer(r) {
+
+ var user = r.getResultObject();
+ fleshedUser = user;
+ if(!user) return;
+
+ var expireDate = dojo.date.stamp.fromISOString(user.expire_date());
+ if( expireDate < new Date() ) {
+ appendClear($('myopac.expired.date'), dojo.date.locale.format(expireDate, { "formatLength" : "medium", "selector" : "date" }));
+ unHideMe($('myopac.expired.alert'));
+ }
+
+ var iv1 = user.ident_value()+'';
+ if (iv1.length > 4 && iv1.match(/\d{4}/)) iv1 = iv1.substring(0,4) + '***********';
+
+
+ appendClear($('myopac_summary_prefix'),text(user.prefix()));
+ appendClear($('myopac_summary_first'),text(user.first_given_name()));
+ appendClear($('myopac_summary_middle'),text(user.second_given_name()));
+ appendClear($('myopac_summary_dayphone'),text(user.day_phone()));
+ appendClear($('myopac_summary_eveningphone'),text(user.evening_phone()));
+ appendClear($('myopac_summary_otherphone'),text(user.other_phone()));
+ appendClear($('myopac_summary_last'),text(user.family_name()));
+ appendClear($('myopac_summary_suffix'),text(user.suffix()));
+ appendClear($('myopac_summary_username'),text(user.usrname()));
+ appendClear($('myopac_summary_email'),text(user.email()));
+ appendClear($('myopac_summary_barcode'),text(user.card().barcode()));
+ appendClear($('myopac_summary_ident1'),text(iv1));
+ appendClear($('myopac_summary_homelib'),text(findOrgUnit(user.home_ou()).name()));
+ appendClear($('myopac_summary_create_date'),text(_trimTime(user.create_date())));
+
+ var req = new Request(
+ FETCH_USER_NOTES, G.user.session, {pub:1, patronid:G.user.id()});
+ req.callback(myopacDrawNotes);
+ req.send();
+
+
+ var tbody = $('myopac_addr_tbody');
+ var template;
+
+ if(addrRowTemplate) {
+ template = addrRowTemplate;
+ } else {
+ template = tbody.removeChild($('myopac_addr_row'));
+ addrRowTemplate = template;
+ }
+ removeChildren(tbody);
+
+ var addrs = user.addresses();
+ for( var a in addrs ) {
+ var addr = addrs[a];
+ if(!allowPendingAddr && isTrue(addr.pending()))
+ continue;
+ if(addr.replaces() != null) continue;
+ var row = template.cloneNode(true);
+ myOPACDrawAddr(row, addr, addrs);
+ tbody.appendChild(row);
+ }
+}
+
+
+function myopacDrawNotes(r) {
+ var notes = r.getResultObject();
+ var tbody = $('myopac.notes.tbody');
+ if(!notesTemplate)
+ notesTemplate = tbody.removeChild($('myopac.notes.tr'));
+ removeChildren(tbody);
+
+ iterate(notes,
+ function(note) {
+ unHideMe($('myopac.notes.div'));
+ var row = notesTemplate.cloneNode(true);
+ $n(row, 'title').appendChild(text(note.title()));
+ $n(row, 'value').appendChild(text(note.value()));
+ tbody.appendChild(row);
+ }
+ );
+}
+
+
+
+function myOPACDrawAddr(row, addr, addrs) {
+ appendClear($n(row, 'myopac_addr_type'),text(addr.address_type()));
+ appendClear($n(row, 'myopac_addr_street'),text(addr.street1()));
+ appendClear($n(row, 'myopac_addr_street2'),text(addr.street2()));
+ appendClear($n(row, 'myopac_addr_city'),text(addr.city()));
+ appendClear($n(row, 'myopac_addr_county'),text(addr.county()));
+ appendClear($n(row, 'myopac_addr_state'),text(addr.state()));
+ appendClear($n(row, 'myopac_addr_country'),text(addr.country()));
+ appendClear($n(row, 'myopac_addr_zip'),text(addr.post_code()));
+
+ if(!isTrue(addr.valid()))
+ unHideMe($n(row, 'myopac_invalid_addr_row'));
+
+ if(!allowPendingAddr) return;
+
+ $n(row, 'myopac_addr_edit_link').onclick = function(){myopacEditAddress(addr)};
+ unHideMe($n(row, 'myopac_addr_edit_td'));
+
+ /* if we have a replacement address, plop it into the table next to this addr */
+ var repl = grep(addrs,
+ function(a) {
+ return a.replaces() == addr.id();
+ }
+ );
+
+ $n(row, 'myopac_pending_addr_td').id = 'myopac_pending_addr_td_' + addr.id();
+
+ if(repl) {
+ hideMe($n(row, 'myopac_addr_edit_td')); // hide the edit link
+ repl = repl[0];
+ myopacSetAddrInputs(row, repl);
+ }
+}
+
+function myopacEditAddress(addr) {
+ var td = $('myopac_pending_addr_td_' + addr.id());
+ var row = td.parentNode;
+ myopacSetAddrInputs(row, addr);
+}
+
+function myopacSetAddrInputs(row, addr, prefix) {
+ unHideMe($n(row, 'myopac_pending_addr_td'));
+ $n(row, 'myopac_pending_addr_type').value = addr.address_type();
+ $n(row, 'myopac_pending_addr_street').value = addr.street1();
+ $n(row, 'myopac_pending_addr_street2').value = addr.street2();
+ $n(row, 'myopac_pending_addr_city').value = addr.city();
+ $n(row, 'myopac_pending_addr_county').value = addr.county();
+ $n(row, 'myopac_pending_addr_state').value = addr.state();
+ $n(row, 'myopac_pending_addr_country').value = addr.country();
+ $n(row, 'myopac_pending_addr_zip').value = addr.post_code();
+ $n(row, 'myopac_pending_addr_edit_link').onclick = function(){myopacSaveAddress(row, addr)};
+ $n(row, 'myopac_pending_addr_del_link').onclick = function(){myopacSaveAddress(row, addr, true)};
+}
+
+// if no pending addr exists, this is called with the original address
+function myopacSaveAddress(row, addr, deleteMe) {
+
+ if(addr.replaces() == null) {
+ // we are editing a non-pending address. create a pending address to manage that
+ var repl = new aua();
+ repl.usr(addr.usr());
+ repl.address_type(addr.address_type());
+ repl.within_city_limits(addr.within_city_limits());
+ repl.replaces(addr.id());
+ repl.pending('t');
+ repl.isnew(true);
+ repl.id(null);
+ addr = repl;
+ }
+
+ if(deleteMe) {
+ if(addr.id() == null) {
+ hideMe($n(row, 'myopac_pending_addr_td'));
+ return;
+ }
+ addr.isdeleted(true);
+ } else {
+ addr.address_type($n(row, 'myopac_pending_addr_type').value);
+ addr.street1($n(row, 'myopac_pending_addr_street').value);
+ addr.street2($n(row, 'myopac_pending_addr_street2').value);
+ addr.city($n(row, 'myopac_pending_addr_city').value);
+ addr.county($n(row, 'myopac_pending_addr_county').value);
+ addr.state($n(row, 'myopac_pending_addr_state').value);
+ addr.country($n(row, 'myopac_pending_addr_country').value);
+ addr.post_code($n(row, 'myopac_pending_addr_zip').value);
+ }
+
+ var req = new Request(
+ 'open-ils.actor:open-ils.actor.user.address.pending.cud',
+ G.user.session, addr);
+
+ req.callback(
+ function(r) {
+ var resp = r.getResultObject();
+
+ if(addr.isnew()) {
+ // new, add to list of addrs
+ addr.id(resp);
+ fleshedUser.addresses().push(addr);
+
+ } else {
+ // deleted, remove from list of addrs
+ if(addr.isdeleted()) {
+ hideMe($n(row, 'myopac_pending_addr_td'));
+ var addrs = [];
+ for(var i in fleshedUser.addresses()) {
+ var a = fleshedUser.addresses()[i];
+ if(a.id() != addr.id())
+ addrs.push(a);
+ }
+ fleshedUser.addresses(addrs);
+ }
+ }
+ alertId('myopac_addr_changes_saved');
+ }
+ );
+ req.send();
+};
+
+
+function myOPACUpdateUsername() {
+ var username = $('myopac_new_username').value;
+ var curpassword = $('myopac_username_current_password').value;
+ if(username == null || username == "") {
+ alert($('myopac_username_error').innerHTML);
+ return;
+ }
+
+ if( username.match(/.*\s.*/) ) {
+ alert($('myopac_invalid_username').innerHTML);
+ return;
+ }
+
+ r = fetchOrgSettingDefault(getLocation(), 'opac.barcode_regex');
+ if(r) REGEX_BARCODE = new RegExp(r);
+
+ if(username.match(REGEX_BARCODE)) {
+ alert($('myopac_invalid_username').innerHTML);
+ return;
+ }
+
+ /* first see if the requested username is taken */
+ var req = new Request(CHECK_USERNAME, G.user.session, username);
+ req.send(true);
+ var res = req.result();
+ /* If the username does not already exist, res will be null;
+ * we can move on to updating the username.
+ *
+ * If the username does exist, then res will be the user ID.
+ * G.user.id() gives us the currently authenticated user ID.
+ * If res == G.user.id(), we try to update the username anyways.
+ */
+ if( res !== null && res != G.user.id() ) {
+ alertId('myopac_username_dup');
+ return;
+ }
+
+ var req = new Request(UPDATE_USERNAME, G.user.session, username, curpassword );
+ req.send(true);
+ if(req.result()) {
+
+ var evt;
+ var res = req.result();
+ if(evt = checkILSEvent(res)) {
+ alertILSEvent(res);
+ return;
+ }
+
+ G.user.usrname(username);
+ hideMe($('myopac_update_username_row'));
+ userShown = false;
+ alertId('myopac_username_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_username_failure').innerHTML);
+}
+
+function myOPACUpdateEmail() {
+ var email = $('myopac_new_email').value;
+ var curpassword = $('myopac_email_current_password').value;
+ if(email == null || email == "") {
+ alert($('myopac_email_error').innerHTML);
+ return;
+ }
+
+ var req = new Request(UPDATE_EMAIL, G.user.session, email, curpassword );
+ req.send(true);
+ if(req.result()) {
+ G.user.email(email);
+ hideMe($('myopac_update_email_row'));
+ userShown = false;
+ alertId('myopac_email_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_email_failure').innerHTML);
+}
+
+
+function myOPACUpdatePassword() {
+ var curpassword = $('myopac_current_password').value;
+ var password = $('myopac_new_password').value;
+ var password2 = $('myopac_new_password2').value;
+
+ if( curpassword == null || curpassword == "" ||
+ password == null || password == "" ||
+ password2 == null || password2 == "" || password != password2 ) {
+ alert($('myopac_password_error').innerHTML);
+ return;
+ }
+
+ if(!strongPassword(password, true)) return;
+
+ var req = new Request(UPDATE_PASSWORD, G.user.session, password, curpassword );
+ req.send(true);
+ if(req.result()) {
+ hideMe($('myopac_update_password_row'));
+ userShown = false;
+ alertId('myopac_password_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_password_failure').innerHTML);
+}
+
+
+
+
+var containerTemplate;
+function myOPACShowBookbags(force) {
+
+ var tbody =$('myopac_bookbag_tbody') ;
+
+ if(!containerTemplate)
+ containerTemplate = tbody.removeChild($('myopac_bookbag_tr'));
+ else if(!force) return;
+
+ removeChildren(tbody);
+
+ var containers = containerFetchAll();
+
+ var found = false;
+ for( var i in containers ) {
+ found = true;
+ var cont = containers[i];
+ var row = containerTemplate.cloneNode(true);
+ row.id = 'myopac_bookbag_row_' + cont.id();
+ var link = $n(row, 'myopac_expand_bookbag');
+ var dlink = $n(row, 'myopac_container_delete');
+ link.appendChild( text(cont.name()) );
+ link.setAttribute('href',
+ 'javascript:myOPACExpandBookbag("' + cont.id() + '","' + cont.name() + '");');
+ myOPACFetchBBItems( cont.id(), row );
+ dlink.setAttribute('href', 'javascript:myOPACDeleteBookbag("'+cont.id()+'");');
+
+ if( isTrue(cont.pub()) ) {
+ unHideMe($n(row, 'myopac_bb_published_yes'));
+ var link = $n(row, 'myopac_bb_published_view');
+ link.setAttribute('href', buildExtrasLink( 'feed/bookbag/html-full/'+cont.id(), false));
+ link.setAttribute('target', '_blank' );
+ unHideMe(link);
+
+ link = $n(row, 'myopac_bb_published_atom');
+ link.setAttribute('href', buildExtrasLink( 'feed/bookbag/rss2-full/'+cont.id(), false));
+ link.setAttribute('target', '_blank' );
+ unHideMe(link);
+
+ link = $n(row, 'myopac_bb_make_unpublished');
+ link.setAttribute('href', 'javascript:myOPACMakeBBPublished("'+cont.id()+'", true);');
+ unHideMe(link);
+
+ var RW = $n(row, 'myopac_bb_exp_refworks');
+ if (RW && myopacEnableRefWorks) {
+ var here = (findOrgUnit(getLocation())).name();
+ var org_name = here.replace(" ", "+");
+ var cgi = new CGI();
+
+ RW.setAttribute('href',
+ myopacRefWorksHost + '/express/expressimport.asp?vendor='
+ + org_name
+ + '&filter=MARC+Format&database=All+MARC+Formats&encoding=65001&url=http%3A%2F%2F'
+ + cgi.server_name + '/opac/extras/feed/bookbag/marctxt-full/'
+ + cont.id()
+ );
+ RW.setAttribute('target', 'RefWorksMain');
+ unHideMe($n(row, 'myopac_bb_exp_refworks'));
+ }
+ } else {
+ unHideMe($n(row, 'myopac_bb_published_no'));
+ var link = $n(row, 'myopac_bb_make_published');
+ link.setAttribute('href', 'javascript:myOPACMakeBBPublished("'+cont.id()+'");');
+ unHideMe(link);
+ }
+
+ tbody.appendChild(row);
+ }
+
+ if(!found) unHideMe($('myopac_bookbags_none'));
+ else unHideMe($('myopac_bookbag_table'));
+}
+
+function myOPACMakeBBPublished(bbid, hideme) {
+
+ var bb = fleshedContainers[bbid];
+
+ if(hideme) {
+ if(!confirm($('myopac_make_unpublished_confirm').innerHTML)) return;
+ bb.pub('f');
+ } else {
+ if(!confirm($('myopac_make_published_confirm').innerHTML)) return;
+ bb.pub('t');
+ }
+
+ var result = containerUpdate(bb);
+
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+
+ alert($('myopac_bb_update_success').innerHTML);
+ myOPACShowBookbags(true);
+}
+
+
+
+function myOPACDeleteBookbag(id) {
+ if( confirm( $('myopac_delete_bookbag_warn').innerHTML ) ) {
+ var result = containerDelete(id);
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+ alert($('myopac_bb_update_success').innerHTML);
+ hideMe($('myopac_bookbag_items_table'));
+ hideMe($('myopac_bookbag_items_name'));
+ hideMe($('myopac_bookbag_no_items'));
+ myOPACShowBookbags(true);
+ }
+}
+
+function myOPACFetchBBItems( id, row, block ) {
+ if(!block) {
+ containerFlesh( id, _myOPACSetBBItems, { row: row } );
+ } else {
+ var cont = containerFlesh(id);
+ myOPACSetBBItems( cont, row );
+ }
+}
+
+function _myOPACSetBBItems(r) { myOPACSetBBItems( r.getResultObject(), r.args.row ); }
+
+function myOPACSetBBItems( container, row ) {
+ fleshedContainers[container.id()] = container;
+ var node = $n(row, 'myopac_bookbag_item_count');
+ removeChildren(node);
+ node.appendChild( text(container.items().length) );
+}
+
+var BBItemsRow;
+function myOPACExpandBookbag( id, name ) {
+
+ var tbody = $('myopac_bookbag_items_tbody');
+ if(!BBItemsRow) BBItemsRow = tbody.removeChild($('myopac_bookbag_items_row'));
+ removeChildren(tbody);
+ removeChildren($('myopac_bookbag_items_name'));
+
+ $('myopac_bookbag_items_name').appendChild(text(name));
+
+ if( fleshedContainers[id] ) {
+ var len = fleshedContainers[id].items().length;
+
+ if( len == 0 ) {
+ unHideMe($('myopac_bookbag_no_items'));
+ hideMe($('myopac_bookbag_items_table'));
+ return;
+ }
+
+ hideMe($('myopac_bookbag_no_items'));
+ unHideMe($('myopac_bookbag_items_table'));
+
+ for( var i = 0; i != len; i++ ) {
+ var row = BBItemsRow.cloneNode(true);
+ found = true;
+
+ var item = fleshedContainers[id].items()[i];
+ var tlink = $n(row,'myopac_bookbag_items_title');
+ var alink = $n(row,'myopac_bookbag_items_author');
+
+ var req = new Request( FETCH_RMODS, item.target_biblio_record_entry() );
+ req.request.tlink = tlink;
+ req.request.alink = alink;
+ req.callback(myOPACShowBBItem);
+ req.send();
+
+ var clink = $n(row, 'myopac_bookbag_items_remove');
+ clink.setAttribute('href', 'javascript:myOPACRemoveBBItem("'+item.id()+'","'+id+'","'+name+'");');
+
+ tbody.appendChild(row);
+ }
+ }
+}
+
+function myOPACRemoveBBItem( id, containerid, container_name ) {
+ if(!confirm($('myopac_remove_bb_item_confirm').innerHTML)) return;
+ var stat = containerRemoveItem( id );
+ if(stat) alert($('myopac_bb_update_success').innerHTML);
+ myOPACFetchBBItems( containerid, $('myopac_bookbag_row_' + containerid), true);
+ myOPACExpandBookbag( containerid, container_name );
+}
+
+function myOPACShowBBItem(r) {
+ var record = r.getResultObject();
+ buildTitleDetailLink(record, r.tlink);
+ buildSearchLink(STYPE_AUTHOR, record.author(), r.alink);
+}
+
+function myOPACCreateBookbag() {
+ var name = $('myopac_bookbag_new_name').value;
+ if(!name) return;
+
+ var exists = false;
+ for( var c in fleshedContainers ) { exists = true; break; }
+
+ /* let them know what they are getting into... */
+ if(!exists) if(!confirm($('bb_create_warning').innerHTML)) return;
+
+ var result = containerCreate( name, $('bb_public_yes').checked );
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+ if(result) alert($('myopac_bb_update_success').innerHTML);
+ myOPACShowBookbags(true);
+}
+
+
+/* ---------------------------------------------------------------------- */
+/* Non cat circs */
+/* ---------------------------------------------------------------------- */
+
+var nonCatCircIds;
+var nonCatTypes;
+/* if we have some circs, grab the non-cat types */
+function myOPACDrawNonCatCircs(r) {
+ var ids = r.getResultObject();
+ if(ids.length == 0) return;
+ nonCatCircIds = ids;
+ unHideMe($('non_cat_circs_div'));
+ var req = new Request(FETCH_NON_CAT_TYPES, G.user.home_ou());
+ req.callback(myOPACDrawNonCatCircs2);
+ req.send();
+}
+
+
+/* now we have circs and the types.. draw each one */
+var nonCatTbody;
+var nonCatRow;
+function myOPACDrawNonCatCircs2(r) {
+ nonCatTypes = r.getResultObject();
+ nonCatTbody = $('non_cat_circs_tbody');
+ if(!nonCatRow) nonCatRow =
+ nonCatTbody.removeChild($('non_cat_circs_row'));
+ removeChildren(nonCatTbody);
+ for( var i in nonCatCircIds ) {
+ var req = new Request(FETCH_NON_CAT_CIRC, G.user.session, nonCatCircIds[i]);
+ req.callback(myOPACDrawNonCatCirc);
+ req.send();
+ }
+}
+
+
+/* draw a single circ */
+function myOPACDrawNonCatCirc(r) {
+ var circ = r.getResultObject();
+
+
+ var type = grep(nonCatTypes,
+ function(i){
+ return (i.id() == circ.item_type());
+ }
+ )[0];
+
+
+ var row = nonCatTbody.appendChild(nonCatRow.cloneNode(true));
+ appendClear($n(row, 'circ_lib'), text(findOrgUnit(circ.circ_lib()).name()));
+ appendClear($n(row, 'item_type'), text(type.name()));
+
+ appendClear(
+ $n(row, 'circ_time'),
+ text(dojo.date.locale.format(
+ dojo.date.stamp.fromISOString(circ.duedate()),
+ {format : 'short'}
+ ))
+ );
+}
+
+
+
+
+function myopacSelectAllChecked() {
+ __myopacSelectChecked(true);
+}
+
+function myopacSelectNoneChecked() {
+ __myopacSelectChecked(false);
+}
+
+function __myopacSelectChecked(value) {
+ var rows = myopacGetCheckedOutRows();
+ for( var i = 0; i < rows.length; i++ ) {
+ var row = rows[i];
+ var box = $n(row, 'selectme');
+ if( box && ! box.disabled )
+ box.checked = value;
+ }
+}
+
+function myopacGetCheckedOutRows() {
+ var rows = [];
+ var tbody = $('myopac_checked_tbody');
+ var children = tbody.childNodes;
+ for( var i = 0; i < children.length; i++ ) {
+ var child = children[i];
+ if( child.nodeName.match(/^tr$/i) )
+ if( $n(child, 'selectme') )
+ rows.push(child);
+ }
+ return rows;
+}
+
+var __renew_circs = [];
+
+/* true if 1 renewal succeeded */
+var __success_count = 0;
+
+/* renews all selected circulations */
+function myOPACRenewSelected() {
+ var rows = myopacGetCheckedOutRows();
+ if(!confirm($('myopac_renew_confirm').innerHTML)) return;
+ __success_count = 0;
+
+ for( var i = 0; i < rows.length; i++ ) {
+
+ var row = rows[i];
+ if( ! $n(row, 'selectme').checked ) continue;
+ var circ_id = row.getAttribute('circid');
+
+ var circ;
+ for( var j = 0; j != circsCache.length; j++ )
+ if(circsCache[j].id() == circ_id)
+ circ = circsCache[j];
+
+ __renew_circs.push(circ);
+ }
+
+ if( __renew_circs.length == 0 ) return;
+
+ unHideMe($('my_renewing'));
+ moClearCheckedTable();
+
+ for( var i = 0; i < __renew_circs.length; i++ ) {
+ var circ = __renew_circs[i];
+ moRenewCirc( circ.target_copy(), G.user.id(), circ );
+ }
+}
+
+
+/* renews a single circulation */
+function moRenewCirc(copy_id, user_id, circ) {
+
+ _debug('renewing circ ' + circ.id() + ' with copy ' + copy_id);
+ var req = new Request(RENEW_CIRC, G.user.session,
+ { patron : user_id,
+ copyid : copy_id,
+ opac_renewal : 1
+ }
+ );
+
+ req.request.alertEvent = false;
+ req.callback(myHandleRenewResponse);
+ req.request.circ = circ;
+ req.send();
+}
+
+
+
+/* handles the circ renew results */
+function myHandleRenewResponse(r) {
+ var res = r.getResultObject();
+ var circ = r.circ;
+
+ /* remove this circ from the list of circs to renew */
+ __renew_circs = grep(__renew_circs, function(i) { return (i.id() != circ.id()); });
+
+ _debug("handling renew result for " + circ.id());
+
+ if(checkILSEvent(res) || checkILSEvent(res[0]))
+ alertIdText('myopac_renew_fail', __circ_titles[circ.id()]);
+ else __success_count++;
+
+ if(__renew_circs) return; /* more to come */
+
+ __renew_circs = [];
+
+ if( __success_count > 0 )
+ alertIdText('myopac_renew_success', __success_count);
+
+ hideMe($('my_renewing'));
+ checkedDrawn = false;
+ myOPACShowChecked();
+}
+
+/** ---- batch hold processing ------------ */
+
+
+/* myopac_holds_checkbx */
+function myopacSelectAllHolds() {
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb) cb.checked = true;
+ }
+}
+
+function myopacSelectNoneHolds() {
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb) cb.checked = false;
+ }
+}
+
+function myopacSelectedHoldsRows() {
+ var r = [];
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb && cb.checked)
+ r.push(rows[i]);
+ }
+ return r;
+}
+
+var myopacProcessedHolds = 0;
+var myopacHoldsToProcess = 0;
+function myopacDoHoldAction() {
+
+ var selectedRows = myopacSelectedHoldsRows();
+ action = getSelectorVal($('myopac_holds_actions'));
+ $('myopac_holds_actions_none').selected = true;
+ if(selectedRows.length == 0) return;
+
+ myopacProcessedHolds = 0;
+
+ if(!confirmId('myopac.holds.'+action+'.confirm')) return;
+ myopacSelectNoneHolds(); /* clear the selection */
+
+
+ /* first, let's collect the holds that actually need processing and
+ collect the full process count while we're at it */
+ var holds = [];
+ for(var i = 0; i < selectedRows.length; i++) {
+ hold = holdCache[myopacHoldIDFromRow(selectedRows[i])];
+ var qstats = holdStatusCache[hold.id()];
+ switch(action) {
+ case 'cancel':
+ holds.push(hold);
+ break;
+ case 'thaw_date':
+ case 'thaw':
+ if(isTrue(hold.frozen()))
+ holds.push(hold);
+ break;
+ case 'freeze':
+ if(!isTrue(hold.frozen()) && qstats.status < 3)
+ holds.push(hold);
+ break;
+ }
+ }
+ myopacHoldsToProcess = holds;
+ if(myopacHoldsToProcess.length == 0) return;
+
+ if(action == 'thaw_date' || action == 'freeze')
+ myopacDrawHoldThawDateForm();
+ else
+ myopacProcessHolds(action);
+}
+
+
+function myopacProcessHolds(action, thawDate) {
+
+ myopacShowHoldProcessing();
+ /* now we process them */
+ for(var i = 0; i < myopacHoldsToProcess.length; i++) {
+
+ hold = myopacHoldsToProcess[i];
+
+ var req;
+ switch(action) {
+
+ case 'cancel':
+ req = new Request(CANCEL_HOLD, G.user.session, hold.id(), /* Patron via OPAC */ 6);
+ break;
+
+ case 'thaw':
+ hold.frozen('f');
+ hold.thaw_date(null);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
+ break;
+
+ case 'thaw_date':
+ case 'freeze':
+ hold.frozen('t');
+ hold.thaw_date(thawDate);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
+ break;
+ //thawDate = prompt($('myopac.holds.freeze.select_thaw').innerHTML);
+
+ }
+
+ req.callback(myopacBatchHoldCallback);
+ req.send();
+ req = null;
+ }
+}
+
+function myopacDrawHoldThawDateForm() {
+ hideMe($('myopac_holds_main_table'));
+ unHideMe($('myopac_holds_thaw_date_form'));
+ $('myopac_holds_thaw_date_input').focus();
+}
+
+function myopacApplyThawDate() {
+ var dateString = dijit.byId('myopac_holds_thaw_date_input').getValue();
+ if(dateString) {
+ dateString = dojo.date.stamp.toISOString(dateString);
+ if(dateString) {
+ dateString = holdsVerifyThawDate(dateString);
+ if(!dateString) return;
+ } else {
+ dateString = null;
+ }
+ }
+ myopacProcessHolds('freeze', dateString);
+}
+
+function myopacHoldIDFromRow(row) {
+ return row.id.replace(/.*_(\d+)$/, '$1');
+}
+
+function myopacShowHoldProcessing() {
+ unHideMe($('myopac_holds_processing'));
+ hideMe($('myopac_holds_main_table'));
+}
+
+function myopacHideHoldProcessing() {
+ hideMe($('myopac_holds_processing'));
+ unHideMe($('myopac_holds_main_table'));
+ hideMe($('myopac_holds_thaw_date_form'));
+}
+
+function myopacBatchHoldCallback(r) {
+ if(r) /* force load any exceptions */
+ r.getResultObject();
+ if(++myopacProcessedHolds >= myopacHoldsToProcess.length) {
+ myopacHideHoldProcessing();
+ holdCache = {};
+ holdStatusCache = {};
+ myopacForceHoldsRedraw = true;
+ myOPACShowHolds();
+ }
+}
+
--- /dev/null
+
+/* */
+
+detachAllEvt('common', 'run');
+attachEvt("common", "run", rdetailDraw);
+attachEvt("rdetail", "recordDrawn", rdetailBuildStatusColumns);
+attachEvt("rdetail", "recordDrawn", rdetailBuildInfoRows);
+attachEvt("rdetail", "recordDrawn", rdetailGetPageIds);
+
+/* Per-skin configuration settings */
+var rdetailLocalOnly = true;
+var rdetailShowLocal = true;
+var rdetailShowCopyLocation = true;
+var rdetailGoogleBookPreview = false;
+var rdetailDisplaySerialHoldings = true;
+var rdetailEnableRefWorks = false;
+var rdetailRefWorksHost = 'http://www.refworks.com';
+
+/* vars vars vars */
+var record = null;
+var cp_statuses = null;
+var recordsCache = [];
+
+var copyRowParent = null;
+var copyRow = null;
+var statusRow = null;
+var numStatuses = null;
+var defaultCN;
+var callnumberCache = {};
+var globalCNCache = {};
+var localTOC;
+var cachedRecords;
+var _statusPositions = {};
+var opac_strings;
+
+var nextContainerIndex;
+
+var nextRecord;
+var prevRecord;
+
+var rdetailPrev = null;
+var rdetailNext = null;
+var rdetailStart = null;
+var rdetailEnd = null;
+
+var mfhdDetails = [];
+var orgHiding = false;
+
+if(location.href.match(/&place_hold=1/)) {
+ // prevent load flicker between canvases
+ hideMe(dojo.byId('canvas_main'));
+}
+
+dojo.require("dijit.Dialog");
+dojo.require("dijit.form.TextBox");
+
+/* serials are currently the only use of Dojo strings in the OPAC */
+if (rdetailDisplaySerialHoldings) {
+ dojo.require("dijit.Menu");
+ dojo.require("dijit.form.Button");
+ dojo.requireLocalization("openils.opac", "opac");
+ opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
+}
+
+function rdetailReload() {
+ var args = {};
+ args[PARAM_LOCATION] = getNewSearchLocation();
+ args[PARAM_DEPTH] = depthSelGetDepth();
+ goTo(buildOPACLink(args));
+}
+
+/* looks to see if we have a next and/or previous record in the
+ record cache, if so, set up the nav links */
+function rdetailSetPaging(ids) {
+
+ cachedRecords = {};
+ cachedRecords.ids = ids;
+
+ for( var i = 0; i < cachedRecords.ids.length; i++ ) {
+ var rec = cachedRecords.ids[i];
+ if( rec == getRid() ) {
+ if( i > 0 ) prevRecord = cachedRecords.ids[i-1];
+ if( i < cachedRecords.ids.length - 1 )
+ nextRecord = cachedRecords.ids[i+1];
+ break;
+ }
+ }
+
+ $('np_offset').appendChild(text(i + 1));
+ $('np_count').appendChild(text(getHitCount()));
+
+ if(prevRecord) {
+ unHideMe($('np_table'));
+ unHideMe($('np_prev'));
+ unHideMe($('np_start'));
+ rdetailPrev = function() { _rdetailNav(prevRecord); };
+ rdetailStart = function() { _rdetailNav(cachedRecords.ids[0]); };
+ }
+
+ if(nextRecord) {
+ unHideMe($('np_table'));
+ unHideMe($('np_next'));
+ unHideMe($('np_end'));
+ rdetailNext = function() { _rdetailNav(nextRecord); };
+ rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
+ }
+
+ runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
+}
+
+
+function _rdetailNav(id, offset) {
+ var args = {};
+ args[PARAM_RID] = id;
+ goTo(buildOPACLink(args));
+}
+
+function rdetailHandlePlaceHold() {
+ function reload() {
+ location.href = location.href.replace(/&place_hold=1/, '');
+ }
+ attachEvt("common", "holdUpdated", reload);
+ attachEvt("common", "holdUpdateCanceled", reload);
+ attachEvt("common", "loginCanceled", reload);
+ holdsDrawEditor({record:getRid(), type: 'T'});
+}
+
+function rdetailDraw() {
+
+ if(new CGI().param('place_hold')) {
+ rdetailHandlePlaceHold();
+ return;
+ }
+
+ detachAllEvt('common','depthChanged');
+ detachAllEvt('common','locationUpdated');
+ attachEvt('common','depthChanged', rdetailReload);
+ attachEvt('common','locationUpdated', rdetailReload);
+ attachEvt('common','holdUpdated', rdetailReload);
+ attachEvt('common','holdUpdateCanceled', rdetailReload);
+
+ copyRowParent = G.ui.rdetail.cp_info_row.parentNode;
+ copyRow = copyRowParent.removeChild(G.ui.rdetail.cp_info_row);
+ statusRow = G.ui.rdetail.cp_status.parentNode;
+ statusRow.id = '__rdsrow';
+
+ G.ui.rdetail.cp_info_local.onclick = rdetailShowLocalCopies;
+ G.ui.rdetail.cp_info_all.onclick = rdetailShowAllCopies;
+
+ if(getLocation() == globalOrgTree.id())
+ hideMe(G.ui.rdetail.cp_info_all);
+
+ if(getRid()) {
+
+ var req = new Request(FETCH_RMODS, getRid());
+ req.callback(_rdetailDraw);
+ req.send();
+
+ } else { // No record ID was specified
+
+ // If we have an ISBN in the URL, let's try to find that record
+ // This allows direct linking by ISBN.
+ // Note, this uses the first record it finds
+ if(getRtype() == RTYPE_ISBN) {
+ var req = new Request(FETCH_ADV_ISBN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ if(blob && blob.count > 0)
+ RID = blob.ids[0];
+ var req2 = new Request(FETCH_RMODS, getRid());
+ req2.callback(_rdetailDraw);
+ req2.send();
+ }
+ );
+ req.send();
+ }
+ }
+
+
+ if (rdetailDisplaySerialHoldings && (
+ isXUL() || !fetchOrgSettingDefault(
+ getLocation(), "opac.fully_compressed_serial_holdings")
+ )
+ ) {
+ var req = new Request(FETCH_MFHD_SUMMARY, getRid());
+ req.callback(_holdingsDraw);
+ req.send();
+ if (isXUL()) {
+ var here = findOrgUnit(getLocation());
+ dojo.place("<div id='mfhd_ad_menu'></div>", "rdetail_details_table", "after");
+ var mfhd_add = new dijit.Menu({style:"float: right;"});
+ new dijit.MenuItem({onClick:function(){
+ var req = new Request(CREATE_MFHD_RECORD, G.user.session, 1, here.id(), getRid());
+ var res = req.send();
+ alert(dojo.string.substitute(opac_strings.CREATED_MFHD_RECORD, [here.name()]));
+ }, label:opac_strings.CREATE_MFHD}).placeAt(mfhd_add);
+ mfhd_add.placeAt(mfhd_ad_menu);
+ }
+ }
+
+ detachAllEvt("result", "idsReceived");
+ G.evt.result.hitCountReceived = [];
+ G.evt.result.recordReceived = [];
+ G.evt.result.copyCountsReceived = [];
+ G.evt.result.allRecordsReceived = [];
+
+ if(isXUL())
+ unHideMe($('rdetail_show_orders'));
+}
+
+function rdetailGetPageIds() {
+ attachEvt("result", "idsReceived", rdetailSetPaging );
+ resultFetchAllRecords = true;
+ rresultCollectIds(true);
+}
+
+
+function buildunAPISpan (span, type, id) {
+ var cgi = new CGI();
+ var d = new Date();
+
+ addCSSClass(span,'unapi-id');
+
+ span.setAttribute(
+ 'title', 'tag:' + cgi.server_name + ',' +
+ d.getFullYear() + ':' + type + '/' + id
+ );
+}
+
+function rdetailViewMarc(r,id) {
+ hideMe($('rdetail_extras_loading'));
+ $('rdetail_view_marc_box').innerHTML = r.getResultObject();
+
+ var div = elem('div', { "class" : 'hide_me' });
+ var span = div.appendChild( elem('abbr') );
+
+ buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+ $('rdetail_view_marc_box').insertBefore(span, $('rdetail_view_marc_box').firstChild);
+}
+
+function rdetailForeignItems(r,id) {
+ hideMe($('rdetail_extras_loading'));
+ var tbody = $('rdetail_foreign_items_tbody');
+
+ var robj = r.getResultObject(); /* mvr list with foreign_copy_maps fleshed */
+
+ for (var i = 0; i < robj.length; i++) {
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = robj[i].doc_id();
+ var row = elem('tr'); tbody.appendChild(row);
+ var td1 = elem('td'); row.appendChild(td1);
+ var title = elem(
+ 'a',
+ {
+ 'href' : buildOPACLink(args),
+ 'class' : 'classic_link'
+ },
+ robj[i].title()
+ );
+ td1.appendChild(title);
+ var td2 = elem('td',{},robj[i].author()); row.appendChild(td2);
+ var td3 = elem('td'); row.appendChild(td3);
+ var details = elem(
+ 'a',
+ {
+ 'href' : 'javascript:void(0)',
+ 'class' : 'classic_link'
+ },
+ 'Copy Details'
+ );
+ details.onclick = function(idx,context_row){
+ return function() {
+ cpdBuild(
+ tbody,
+ context_row,
+ robj[idx],
+ null,
+ 1,
+ 0,
+ 1,
+ dojo.map(
+ robj[idx].foreign_copy_maps(),
+ function(x){ return x.target_copy(); }
+ ),
+ dojo.map(
+ robj[idx].foreign_copy_maps(),
+ function(x){ return x.peer_type().name(); }
+ )
+ );
+ };
+ }(i,row);
+ td3.appendChild(details);
+ }
+}
+
+
+
+function rdetailShowLocalCopies() {
+ rdetailShowLocal = true;
+ rdetailBuildInfoRows();
+ hideMe(G.ui.rdetail.cp_info_local);
+ unHideMe(G.ui.rdetail.cp_info_all);
+ hideMe(G.ui.rdetail.cp_info_none);
+}
+
+function rdetailShowAllCopies() {
+
+ rdetailShowLocal = false;
+ rdetailBuildInfoRows();
+ hideMe(G.ui.rdetail.cp_info_all);
+ unHideMe(G.ui.rdetail.cp_info_local);
+ hideMe(G.ui.rdetail.cp_info_none);
+}
+
+function OpenMarcEditWindow(pcrud, rec) {
+ /*
+ To run in Firefox directly, must set signed.applets.codebase_principal_support
+ to true in about:config
+ */
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ dojo.require('openils.PermaCrud');
+
+ win.xulG = {
+ "record": {"marc": rec.marc(), "rtype": "sre"},
+ "save": {
+ "label": opac_strings.SAVE_MFHD_LABEL,
+ "func": function(xmlString) {
+ rec.marc(xmlString);
+ rec.edit_date('now');
+ rec.ischanged(true);
+ pcrud.update(rec);
+ }
+ },
+ 'lock_tab' : typeof xulG != 'undefined' ? (typeof xulG['lock_tab'] != 'undefined' ? xulG.lock_tab : undefined) : undefined,
+ 'unlock_tab' : typeof xulG != 'undefined' ? (typeof xulG['unlock_tab'] != 'undefined' ? xulG.unlock_tab : undefined) : undefined
+ };
+}
+
+function loadMarcEditor(recId) {
+ var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
+ var rec = pcrud.retrieve("sre", recId);
+ if (rec) {
+ OpenMarcEditWindow(pcrud, rec);
+ }
+}
+
+/*
+ * This function could be written much more intelligently
+ * Limited brain power means that I'm brute-forcing it for now
+ */
+function _holdingsDraw(h) {
+ holdings = h.getResultObject();
+
+ if (holdings) {
+ // Only draw holdings within our OU scope
+ var here = findOrgUnit(getLocation());
+ var entryNum = 0;
+ var depth = getDepth();
+ dojo.forEach(holdings, function (item) {
+ if (orgIsMine(here, findOrgUnit(item.owning_lib()), depth)) {
+ _holdingsDrawMFHD(item, entryNum);
+ entryNum++;
+ }
+ });
+ }
+
+ // Populate (or unpopulate) XUL menus
+ if (isXUL()) {
+ runEvt('rdetail','MFHDDrawn');
+ }
+}
+
+function _holdingsDrawMFHD(holdings, entryNum) {
+ var hb = holdings.basic_holdings();
+ var hba = holdings.basic_holdings_add();
+ var hs = holdings.supplement_holdings();
+ var hsa = holdings.supplement_holdings_add();
+ var hi = holdings.index_holdings();
+ var hia = holdings.index_holdings_add();
+ var ho = holdings.online();
+ var hm = holdings.missing();
+ var hinc = holdings.incomplete();
+ var hloc = holdings.location() || 'MFHD';
+
+ if ( hb.length == 0 && hba.length == 0 && hs.length == 0 &&
+ hsa.length == 0 && hi.length == 0 && hia.length == 0 &&
+ ho.length == 0 && hm.length == 0 && hinc.length == 0
+ ) {
+
+ if (isXUL()) {
+ /*
+ * If we have a record, but nothing to show for it, then the
+ * record is likely empty or corrupt. This gives cataloguers a
+ * chance to add holdings or correct the record
+ */
+ hb = ['PLACEHOLDER'];
+ } else {
+ return null;
+ }
+ }
+
+ // Show entryNum + 1 in staff client for better menu correlation
+ // Maybe this should be holdings.sre_id() instead? (which could get long after time)
+ var entryNumString = '';
+ if (isXUL()) {
+ var entryNumInc = entryNum + 1;
+ entryNumString = ' [Entry #'+entryNumInc+'] ';
+ }
+
+ var refNode;
+ if (entryNum > 0) {
+ refNode = 'rdetail_holdings_table_' + (entryNum - 1);
+ } else {
+ refNode = 'rdetail_details_table';
+ }
+
+ dojo.place("<table style='width: 100%;' id='rdetail_holdings_table_"+entryNum+"'><caption id='mfhdHoldingsCaption" + entryNum + "' class='rdetail_header color_1'>" +
+ dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) + entryNumString +
+ "</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
+ "'></tbody></table>", refNode, "after"
+ );
+ if (hb.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.BASIC_HOLDINGS, hb); }
+ if (hba.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.BASIC_HOLDINGS_ADD, hba); }
+ if (hs.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.SUPPLEMENT_HOLDINGS, hs); }
+ if (hsa.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.SUPPLEMENT_HOLDINGS_ADD, hsa); }
+ if (hi.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INDEX_HOLDINGS, hi); }
+ if (hia.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INDEX_HOLDINGS_ADD, hia); }
+ if (ho.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.ONLINE_VOLUMES, ho); }
+ if (hm.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.MISSING_VOLUMES, hm); }
+ if (hinc.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INCOMPLETE_VOLUMES, hinc); }
+
+ if (isXUL() && holdings.sre_id() != -1) { // -1 indicates in-DB only holdings, so no button or menu entries for MFHD
+ mfhdDetails.push({ 'id' : holdings.sre_id(), 'label' : hloc, 'entryNum' : entryNum, 'owning_lib' : holdings.owning_lib() });
+ dojo.require('openils.Event');
+ dojo.require('openils.PermaCrud');
+ var mfhd_edit = new dijit.Menu({});
+ new dijit.MenuItem({onClick: function(){loadMarcEditor(holdings.sre_id())}, label:opac_strings.EDIT_MFHD_RECORD}).placeAt(mfhd_edit, "first");
+ new dijit.MenuItem({onClick:function(){
+ // Avoid accidental deletion of MFHD records
+ if (!confirm(opac_strings.DELETE_MFHD_CONFIRM)) {
+ return;
+ }
+ var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
+ var mfhd_rec = pcrud.retrieve("sre", holdings.sre_id());
+ if (mfhd_rec) {
+ pcrud.eliminate(mfhd_rec);
+ alert(dojo.string.substitute(opac_strings.DELETED_MFHD_RECORD, [holdings.sre_id()]));
+ }
+ }, label:opac_strings.DELETE_MFHD}).placeAt(mfhd_edit, "last");
+ // new dijit.MenuItem({onClick:function(){alert("Edit properties " + holdings.sre_id());}, label:opac_strings.EDIT_PROPERTIES}).placeAt(mfhd_edit, "last");
+ var mfhd_mb = new dijit.form.DropDownButton({dropDown: mfhd_edit, label:opac_strings.EDIT_MFHD_MENU, style:"float:right"});
+ mfhd_mb.placeAt("mfhdHoldingsCaption" + entryNum, "last");
+ mfhd_edit.startup();
+ }
+}
+
+function _holdingsDrawMFHDEntry(entryNum, entryName, entry) {
+ var flatEntry = entry.toString().replace(/,/g, ', ');
+ dojo.place("<tr><td> </td><td nowrap='nowrap' class='rdetail_desc'>" + entryName + "</td><td class='rdetail_item'>" + flatEntry + "</td></tr>", "rdetail_holdings_tbody_" + entryNum, "last");
+}
+
+function _rdetailDraw(r) {
+ record = r.getResultObject();
+
+ runEvt('rdetail', 'recordRetrieved', record.doc_id());
+
+ G.ui.rdetail.title.appendChild(text(record.title()));
+ buildSearchLink(STYPE_AUTHOR, record.author(), G.ui.rdetail.author);
+ G.ui.rdetail.isbn.appendChild(text(cleanISBN(record.isbn())));
+ G.ui.rdetail.edition.appendChild(text(record.edition()));
+ G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
+ G.ui.rdetail.publisher.appendChild(text(record.publisher()));
+ $('rdetail_physical_desc').appendChild(text(record.physical_description()));
+
+ if (record.series()) {
+ unHideMe($("series_row"));
+ $('rdetail_series').appendChild(text(record.series()));
+ }
+
+ r = record.types_of_resource();
+ if(r) {
+ G.ui.rdetail.tor.appendChild(text(r[0]));
+ setResourcePic( G.ui.rdetail.tor_pic, r[0]);
+ }
+ G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
+
+ try{
+ if(record.isbn()) {
+ if(ENABLE_ADDED_CONTENT_ATTRIB_LINKS) {
+ unHideMe($('rdetail.jacket_attrib_div'));
+ var href = $('rdetail.jacket_attrib_link').getAttribute('href') +cleanISBN(record.isbn());
+ $('rdetail.jacket_attrib_link').setAttribute('href', href);
+ }
+ rdetailCheckForGBPreview();
+
+ } else {
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));
+ }
+ } catch(E) {}
+
+
+ // see if the record has any external links
+ var links = record.online_loc();
+ // When we see an ezproxy link, hide things that only make sense for physical holdings
+ // FIXME: We should also check for zero copies, or check all links for ezproxy looking urls
+ if (links.length > 0) {
+ if (links[0].substring(0,20) == "http://via.tadl.org/") {
+ hideMe($('rdetail_place_hold'));
+ hideMe($('rdetail_copy_info_link'));
+ hideMe($('rdetail_viewcn_link'));
+ hideMe($('rdetail_copy_info_div'));
+ }
+ }
+ for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
+ var href = links[i];
+ // avoid matching "HTTP: The Complete Reference"
+ if( href.match(/https?:\/|ftps?:\/|mailto:/i) ) {
+ unHideMe($('rdetail_online_row'));
+ // MODS can contain a display label (used for the text of the link)
+ // as well as a note about the URL; many legacy systems conflate the
+ // two and generate MARC records that expect the note to be used as
+ // the text of the link, with no display label; here's the canonical
+ // format:
+ //
+ // 856 40 $uhttp://localhost$yDisplay label$zPublic note
+ //
+ // Note that the MARC21slim2MODS XSL concatenates $3 and $y together
+ // (as $y was defined later in MARC21's life as the display label)
+ var displayLabel = '' + links[i+1];
+ var note = '' + links[i+2];
+ if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ displayLabel = href;
+ } else {
+ displayLabel = note;
+ }
+ }
+ // Latch-ditch attempt to prevent URLs as display labels
+ if (displayLabel.substring(0,7) == 'http://') {
+ displayLabel = 'Connect to this resource online';
+ }
+ $('rdetail_online').appendChild(elem('a', {href:href,'class':'css_button'}, displayLabel));
+ if (note && note != displayLabel) {
+ $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
+ }
+ $('rdetail_online').appendChild(elem('br'));
+ }
+ }
+
+ // Fill in our unAPI ID, if anyone cares
+ var abbrs = document.getElementsByTagName('abbr');
+ var span;
+ for (var i = 0; i < abbrs.length; i++) {
+ if (abbrs[i].getAttribute('name') == 'unapi') {
+ span = abbrs[i];
+ break;
+ }
+ }
+ buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+ $('rdetail_place_hold').onclick = function() {
+ var src = location.href;
+
+ if(forceLoginSSL && src.match(/^http:/)) {
+
+ src = src.replace(/^http:/, 'https:');
+
+ if(!src.match(/&place_hold=1/)) {
+ src += '&place_hold=1';
+ }
+
+ location.href = src;
+
+ } else {
+ holdsDrawEditor({record:record.doc_id(), type:'T'});
+ }
+ }
+
+
+ var RW = $('rdetail_exp_refworks');
+ if (RW && rdetailEnableRefWorks) {
+
+ var here = (findOrgUnit(getLocation())).name();
+ var org_name = here.replace(" ", "+");
+ var cgi = new CGI();
+
+ RW.setAttribute(
+ 'href',
+ rdetailRefWorksHost + '/express/expressimport.asp?vendor='
+ + org_name
+ + '&filter=MARC+Format&database=All+MARC+Formats&encoding=65001&url=http%3A%2F%2F'
+ + cgi.server_name + '/opac/extras/supercat/marctxt/record/'
+ + record.doc_id()
+ );
+
+ RW.setAttribute('target', 'RefWorksMain');
+
+ unHideMe($('rdetail_exp_refworks_span'));
+ }
+
+ $('rdetail_img_link').setAttribute('href', buildISBNSrc(cleanISBN(record.isbn()), 'large'));
+ G.ui.rdetail.image.setAttribute("src", buildISBNSrc(cleanISBN(record.isbn()), 'medium'));
+ runEvt("rdetail", "recordDrawn");
+ recordsCache.push(record);
+
+ rdetailSetExtrasSelector();
+
+ var breq = new Request(FETCH_BRE, [getRid()]);
+ breq.callback( rdetailCheckDeleted );
+ breq.send();
+
+ //resultBuildCaches( [ record ] );
+ //resultDrawSubjects();
+ //resultDrawSeries();
+
+ // grab added content
+
+ // Proxied through Evergreen AddedContent module
+ acCollectData(cleanISBN(record.isbn()), rdetailhandleAC);
+
+ var currentISBN = cleanISBN(record.isbn());
+
+ // Not proxied, cross-site javascript
+
+ // ChiliFresh
+ if (chilifresh && chilifresh != '(none)' && currentISBN) {
+ $('chilifreshReviewLink').setAttribute('id','isbn_'+currentISBN);
+ $('chilifreshReviewResult').setAttribute('id','chili_review_'+currentISBN);
+ unHideMe($('rdetail_reviews_link'));
+ unHideMe($('rdetail_chilifresh_reviews'));
+ try {
+ chili_init();
+ } catch(E) {
+ console.log(E + '\n');
+ hideMe($('rdetail_reviews_link'));
+ hideMe($('rdetail_chilifresh_reviews'));
+ }
+ }
+
+ // Novelist
+ if (novelist && currentISBN) {
+ unHideMe($('rdetail_novelist_link'));
+ }
+
+ // Multi-Home / Foreign Items / Peer Bibs
+ var req = new Request( TEST_PEER_BIBS, record.doc_id() );
+ req.callback(function(r){
+ var test = r.getResultObject();
+ if (test == "1") {
+ unHideMe($('rdetail_foreign_items_link'));
+ }
+ });
+ req.send();
+
+ var curr_holds = getHoldCount(record.doc_id());
+ if (curr_holds) {
+ $('rdetail_hold_count').appendChild(text(curr_holds));
+ }
+}
+
+
+
+function rdetailCheckDeleted(r) {
+ var br = r.getResultObject()[0];
+ if( isTrue(br.deleted()) ) {
+ hideMe($('rdetail_place_hold'));
+ $('rdetail_more_actions_selector').disabled = true;
+ unHideMe($('rdetail_deleted_exp'));
+ }
+}
+
+function rdetailSetExtrasSelector() {
+ if(!grabUser()) return;
+ unHideMe($('rdetail_more_actions'));
+
+ var req = new Request(
+ FETCH_CONTAINERS, G.user.session, G.user.id(), 'biblio', 'bookbag' );
+ req.callback(rdetailAddBookbags);
+ req.send();
+}
+
+function rdetailAddBookbags(r) {
+
+ var containers = r.getResultObject();
+ var selector = $('rdetail_more_actions_selector');
+ var found = false;
+ var index = 3;
+ doSelectorActions(selector);
+
+ for( var i = 0; i < containers.length; i++ ) {
+ found = true;
+ var container = containers[i];
+ insertSelectorVal( selector, index++, container.name(),
+ "container_" + container.id(), rdetailAddToBookbag, 1 );
+ }
+
+ nextContainerIndex = index;
+}
+
+var _actions = {};
+/**
+ * Adds a new bookbag and exits.
+ *
+ * exitstatus should be 0 if the status is to be read.
+ */
+function finishBookbag(exitstatus) {
+ var name = bbName.attr('value');
+
+ newBBDialog.hide();
+ bbName.attr("value", ""); // Do this after hide so the text doesn't disappear.
+
+ if(exitstatus != 0) return; // If the user canceled, just drop off here.
+
+ var id;
+
+ if( id = containerCreate( name ) ) {
+ alert( $('rdetail_bb_success').innerHTML );
+ var selector = $('rdetail_more_actions_selector');
+ insertSelectorVal( selector, nextContainerIndex++, name,
+ "container_" + id, rdetailAddToBookbag, 1 );
+ setSelector( selector, 'start' );
+ }
+}
+
+/**
+ * Creates a new Bookbag for the user.
+ */
+function rdetailNewBookbag() {
+ newBBDialog.show(); // Show the bookbag dialog.
+ dojo.connect(dijit.byId('newBBDialog'), 'onKeyPress', function(evt) {
+ if (evt.keyCode == dojo.keys.ENTER) {
+ finishBookbag(0);
+ }
+ });
+}
+
+function rdetailAddToBookbag() {
+ var selector = $('rdetail_more_actions_selector');
+ var id = selector.options[selector.selectedIndex].value;
+ setSelector( selector, 'start' );
+
+ if( containerCreateItem( id.substring(10), record.doc_id() )) {
+ alert($('rdetail_bb_item_success').innerHTML);
+ }
+}
+
+
+var rdetailMarcFetched = false;
+var rdetailForeignItemsFetched = false;
+function rdetailShowExtra(type, args) {
+
+ hideMe($('rdetail_copy_info_div'));
+ hideMe($('rdetail_summary_div'));
+ hideMe($('rdetail_reviews_div'));
+ hideMe($('rdetail_toc_div'));
+ hideMe($('rdetail_anotes_div'));
+ hideMe($('rdetail_excerpt_div'));
+ hideMe($('rdetail_preview_div'));
+ hideMe($('rdetail_marc_div'));
+ hideMe($('cn_browse'));
+ hideMe($('rdetail_cn_browse_div'));
+ hideMe($('rdetail_novelist_div'));
+ hideMe($('rdetail_foreign_items_div'));
+ hideMe($('rdetail_notes_div'));
+
+ removeCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_summary_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_annotation_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_novelist_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_foreign_items_link'), 'rdetail_extras_selected');
+
+ switch(type) {
+
+ case "copyinfo":
+ unHideMe($('rdetail_copy_info_div'));
+ addCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+ break;
+
+ case "summary":
+ addCSSClass($('rdetail_summary_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_summary_div'));
+ break;
+
+ case "reviews":
+ addCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_reviews_div'));
+ break;
+
+ case "excerpt":
+ addCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_excerpt_div'));
+ break;
+
+ case "preview":
+ addCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_preview_div'));
+ rdetailDisplayGBPreview();
+ break;
+
+ case "anotes":
+ addCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_anotes_div'));
+ break;
+
+ case "toc":
+ addCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_toc_div'));
+ break;
+
+ case "marc":
+ addCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_marc_div'));
+ if(rdetailMarcFetched) return;
+ unHideMe($('rdetail_extras_loading'));
+ rdetailMarcFetched = true;
+ var req = new Request( FETCH_MARC_HTML, record.doc_id() );
+ req.callback(rdetailViewMarc);
+ req.send();
+ break;
+
+ case "novelist":
+ addCSSClass($('rdetail_novelist_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_novelist_div'));
+ break;
+
+ case "foreign_items":
+ addCSSClass($('rdetail_foreign_items_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_foreign_items_div'));
+ if(rdetailForeignItemsFetched) return;
+ unHideMe($('rdetail_extras_loading'));
+ rdetailForeignItemsFetched = true;
+ var req = new Request( FETCH_PEER_BIBS, record.doc_id() );
+ req.callback(rdetailForeignItems);
+ req.send();
+ break;
+
+ case 'cn':
+ addCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_cn_browse_div'));
+ rdetailShowCNBrowse(defaultCN[1], getLocation(), null, true);
+ break;
+
+ }
+}
+
+function rdetailVolumeDetails(args) {
+ var row = $(args.rowid);
+ var tbody = row.parentNode;
+ cpdBuild( tbody, row, record, [args.cn_prefix, args.cn, args.cn_suffix], args.org, args.depth, args.copy_location );
+ return;
+}
+
+function rdetailBuildCNList() {
+
+ var select = $('cn_browse_selector');
+ var index = 0;
+ var arr = [];
+ for( var cn_json in callnumberCache ) arr.push( cn_json );
+ arr.sort();
+
+ if( arr.length == 0 ) {
+ hideMe($('rdetail_cn_browse_select_div'));
+ return;
+ }
+
+ for( var i = 0; i < arr.length; i++ ) {
+ var cn_json = arr[i];
+ var cn = JSON2js(cn_json);
+ var whole_cn_text = (cn[0] ? cn[0] + ' ' : '') + cn[1] + (cn[2] ? ' ' + cn[2] : '');
+ var opt = new Option(whole_cn_text,cn_json);
+ select.options[index++] = opt;
+ }
+ select.onchange = rdetailGatherCN;
+}
+
+function rdetailGatherCN() {
+ var cn = getSelectorVal($('cn_browse_selector'));
+ rdetailShowCNBrowse( JSON2js(cn), getLocation(), getDepth(), true );
+ setSelector( $('cn_browse_selector'), cn );
+}
+
+
+function rdetailShowCNBrowse( cn, loc, depth, fromOnclick ) {
+
+ if(!cn) {
+ unHideMe($('cn_browse_none'));
+ hideMe($('rdetail_cn_browse_select_div'));
+ return;
+ }
+
+ unHideMe($('rdetail_cn_browse_select_div'));
+ rdetailBuildCNList();
+ setSelector( $('cn_browse_selector'), js2JSON(cn) );
+ hideMe($('rdetail_copy_info_div'));
+ hideMe($('rdetail_reviews_div'));
+ hideMe($('rdetail_summary_div'));
+ hideMe($('rdetail_toc_div'));
+ hideMe($('rdetail_marc_div'));
+ unHideMe($('rdetail_cn_browse_div'));
+ unHideMe($('cn_browse'));
+ if( !rdetailLocalOnly && ! fromOnclick ) depth = findOrgDepth(globalOrgTree);
+ cnBrowseGo(cn, loc, depth);
+}
+
+function rdetailhandleAC(data) {
+
+ if( data.summary.html ) {
+ $('rdetail_summary_div').innerHTML = data.summary.html;
+ unHideMe($('rdetail_summary_link'));
+ }
+
+ if( data.reviews.html ) {
+ $('rdetail_review_container').innerHTML = data.reviews.html;
+ unHideMe($('rdetail_reviews_link'));
+ }
+
+ if( data.toc.html ) {
+ $('rdetail_toc_div').innerHTML = data.toc.html;
+ unHideMe($('rdetail_toc_link'));
+ }
+
+ if( data.excerpt.html ) {
+ $('rdetail_excerpt_div').innerHTML = data.excerpt.html;
+ unHideMe($('rdetail_excerpt_link'));
+ }
+
+ if( data.anotes.html ) {
+ $('rdetail_anotes_div').innerHTML = data.anotes.html;
+ unHideMe($('rdetail_anotes_link'));
+ }
+}
+
+function rdetailShowReviews(r) {
+ hideMe($('rdetail_extras_loading'));
+ var res = r.getResultObject();
+ var par = $('rdetail_reviews_div');
+ var template = par.removeChild($('rdetail_review_template'));
+ if( res && res.length > 0 ) {
+ unHideMe($('rdetail_reviews_link'));
+ for( var i = 0; i < res.length; i++ ) {
+ var rev = res[i];
+ if( rev.text && rev.info ) {
+ var node = template.cloneNode(true);
+ $n(node, 'review_header').appendChild(text(rev.info));
+ $n(node, 'review_text').appendChild(text(rev.text));
+ par.appendChild(node);
+ }
+ }
+ }
+}
+
+
+function rdetailShowTOC(r) {
+ hideMe($('rdetail_extras_loading'));
+ var resp = r.getResultObject();
+ if(resp) {
+ unHideMe($('rdetail_toc_link'));
+ $('rdetail_toc_div').innerHTML = resp;
+ }
+}
+
+function rdetailBuildInfoRows() {
+ var req;
+ var method = FETCH_COPY_COUNTS_SUMMARY;
+ if (rdetailShowCopyLocation)
+ method = FETCH_COPY_LOCATION_COUNTS_SUMMARY;
+ if( rdetailShowLocal )
+ req = new Request(method, record.doc_id(), getLocation(), getDepth())
+ else
+ req = new Request(method, record.doc_id());
+ req.callback(_rdetailBuildInfoRows);
+ req.send();
+}
+
+function _rdetailRows(node) {
+
+ if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
+ var loc = findOrgUnit(getLocation());
+ if( node ) {
+ if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
+ } else {
+ var kids = globalOrgTree.children();
+ if (kids) {
+ for( var i = 0; i < kids.length; i++ ) {
+ var org = findOrgUnit(kids[i]);
+ if( orgIsMine(org, loc) ) {
+ node = org;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if(!node && findOrgType(globalOrgTree.ou_type()).can_have_vols())
+ node = globalOrgTree;
+
+
+ /* don't show hidden orgs */
+
+ if(node) {
+
+ if(!isXUL() && !isTrue(node.opac_visible())) return;
+
+ if (orgHiding) {
+ if (isTrue( findOrgType(node.ou_type()).can_have_vols() )) {
+ if ( ! orgIsMine( orgHiding.org, node, orgHiding.depth ) ) {
+ return;
+ }
+ }
+ }
+
+ var row = copyRow.cloneNode(true);
+ row.id = "cp_info_" + node.id();
+
+ var libtd = findNodeByName( row, config.names.rdetail.lib_cell );
+ var cntd = findNodeByName( row, config.names.rdetail.cn_cell );
+ var cpctd = findNodeByName( row, config.names.rdetail.cp_count_cell );
+ var actions = $n(row, 'rdetail_actions_cell');
+
+ var p = libtd.getElementsByTagName('a')[0];
+ libtd.insertBefore(text(node.name()), p);
+ libtd.setAttribute("style", "padding-left: " + ((findOrgDepth(node) - 1) * 9) + "px;");
+
+ if(!findOrgType(node.ou_type()).can_have_vols()) {
+
+ row.removeChild(cntd);
+ row.removeChild(cpctd);
+ row.removeChild(actions);
+ row.setAttribute('novols', '1');
+
+ libtd.setAttribute("colspan", numStatuses + 3 );
+ libtd.colSpan = numStatuses + 3;
+ addCSSClass(row, 'copy_info_region_row');
+ }
+
+ copyRowParent.appendChild(row);
+
+ } else { node = globalOrgTree; }
+
+ var kids = node.children();
+ if (kids) {
+ for( var c = 0; c < kids.length; c++ )
+ _rdetailRows(kids[c]);
+ }
+}
+
+function rdetailCNPrint(orgid, cn) {
+ var div = cpdBuildPrintWindow( record, orgid);
+ var template = div.removeChild($n(div, 'cnrow'));
+ var rowNode = $("cp_info_" + orgid);
+ cpdStylePopupWindow(div);
+ openWindow(div.innerHTML);
+}
+
+var localCNFound = false;
+var ctr = 0;
+function _rdetailBuildInfoRows(r) {
+
+ if (rdetailShowCopyLocation)
+ unHideMe( $n( $('rdetail_copy_info_table'), 'rdetail_copylocation_header' ) );
+
+ removeChildren(copyRowParent);
+
+ orgHiding = checkOrgHiding();
+
+ _rdetailRows();
+
+ var summary = r.getResultObject();
+ if(!summary) return;
+
+ var found = false;
+ for( var i = 0; i < summary.length; i++ ) {
+
+ var arr = summary[i];
+ globalCNCache[js2JSON([arr[1],arr[2],arr[3]])] = 1; // prefix, label, suffix. FIXME - Am I used anywhere?
+ var thisOrg = findOrgUnit(arr[0]);
+ var rowNode = $("cp_info_" + thisOrg.id());
+ if(!rowNode) continue;
+
+ if(rowNode.getAttribute("used")) {
+
+ if( rowNode.nextSibling ) {
+ sib = rowNode.nextSibling;
+ o ='cp_info_'+thisOrg.id()+'_';
+ /* push the new row on as the last row for this org unit */
+ while( sib && sib.id.match(o) ) {
+ sib = sib.nextSibling;
+ }
+ if(sib)
+ rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+ else
+ rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+ } else {
+ rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+ }
+
+ var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
+ n.appendChild(text(thisOrg.name()));
+ n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1) * 9) + "px;");
+ rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr);
+
+ } else {
+ rowNode.setAttribute("used", "1");
+ }
+
+ var cpc_temp = rowNode.removeChild(
+ findNodeByName(rowNode, config.names.rdetail.cp_count_cell));
+
+ var statuses = arr[4];
+ var cl = '';
+ if (rdetailShowCopyLocation) {
+ cl = arr[4];
+ statuses = arr[5];
+ }
+
+
+ rdetailApplyStatuses(rowNode, cpc_temp, statuses);
+
+ var isLocal = false;
+ if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) {
+ found = true;
+ isLocal = true;
+ if(!localCNFound) {
+ localCNFound = true;
+ defaultCN = [arr[1],arr[2],arr[3]]; // prefix, label, suffix
+ }
+ }
+
+ //if(isLocal) unHideMe(rowNode);
+ unHideMe(rowNode);
+
+ rdetailSetPath( thisOrg, isLocal );
+ rdetailBuildBrowseInfo( rowNode, [arr[1],arr[2],arr[3]], isLocal, thisOrg, cl );
+
+ if( i == summary.length - 1 && !defaultCN) defaultCN = [arr[1],arr[2],arr[3]]; // prefix, label, suffix
+ }
+
+ if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+}
+
+function rdetailBuildBrowseInfo(row, cn, local, orgNode, cl) {
+
+ var whole_cn_json = js2JSON(cn);
+ var whole_cn_text = (cn[0] ? cn[0] + ' ' : '') + cn[1] + (cn[2] ? ' ' + cn[2] : '');
+
+ if(local) {
+ var cache = callnumberCache[whole_cn_json];
+ if( cache ) cache.count++;
+ else callnumberCache[whole_cn_json] = { count : 1 };
+ }
+
+ var depth = getDepth();
+ if( !local ) depth = findOrgDepth(globalOrgTree);
+
+ $n(row, 'rdetail_callnumber_cell').appendChild(text(whole_cn_text));
+
+ if (rdetailShowCopyLocation) {
+ var cl_cell = $n(row, 'rdetail_copylocation_cell');
+ cl_cell.appendChild(text(cl));
+ unHideMe(cl_cell);
+ }
+
+ _debug('setting action clicks for cn ' + whole_cn_text);
+
+ var dHref = 'javascript:rdetailVolumeDetails('+
+ '{copy_location : "'+cl.replace(/\"/g, '\\"')+'", rowid : "'+row.id+'", cn_prefix :"'+cn[0].replace(/\"/g, '\\"')+'",cn :"'+cn[1].replace(/\"/g, '\\"')+'",cn_suffix :"'+cn[2].replace(/\"/g, '\\"')+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
+
+ var bHref = 'javascript:rdetailShowCNBrowse("'+cn[1].replace(/\"/g, '\\"') + '", '+orgNode.id()+', "'+depth+'");';
+
+ unHideMe( $n(row, 'details') )
+ $n(row, 'details').setAttribute('href', dHref);
+ unHideMe( $n(row, 'browse') )
+ $n(row, 'browse').setAttribute('href', bHref);
+
+ if(isXUL()) {
+ unHideMe($n(row, 'hold_div'));
+ $n(row, 'hold').onclick = function() {
+ var req = new Request(FETCH_VOLUME_BY_INFO, cn, record.doc_id(), orgNode.id());
+ req.callback(
+ function(r) {
+ var vol = r.getResultObject();
+ holdsDrawEditor({type: 'V', volumeObject : vol});
+ }
+ );
+ req.send();
+ };
+ }
+}
+
+// sets the path to org as 'active' and displays the path if it's local
+function rdetailSetPath(org, local) {
+ if( findOrgDepth(org) == 0 ) return;
+ var row = $("cp_info_" + org.id());
+ row.setAttribute("hasinfo", "1");
+ unHideMe(row);
+ rdetailSetPath(findOrgUnit(org.parent_ou()), local);
+}
+
+//Append all the statuses for a given summary to the
+//copy summary table
+function rdetailApplyStatuses( row, template, statuses ) {
+ for( var j in _statusPositions ) {
+ var stat = _statusPositions[j];
+ var val = statuses[stat.id()];
+ var nn = template.cloneNode(true);
+ if(val) nn.appendChild(text(val));
+ else nn.appendChild(text(0));
+ row.appendChild(nn);
+ }
+}
+
+//Add one td (creating a new column) to the copy summary
+//table for each opac_visible copy status
+function rdetailBuildStatusColumns() {
+
+ rdetailGrabCopyStatuses();
+ var parent = statusRow;
+ var template = parent.removeChild(G.ui.rdetail.cp_status);
+
+ var i = 0;
+ for( i = 0; i < cp_statuses.length; i++ ) {
+
+ var c = cp_statuses[i];
+ if( c && isTrue(c.opac_visible()) ) {
+ var name = c.name();
+ _statusPositions[i] = c;
+ var node = template.cloneNode(true);
+ var data = findNodeByName( node, config.names.rdetail.cp_status);
+
+ data.appendChild(text(name));
+ parent.appendChild(node);
+ }
+ }
+
+ numStatuses = 0;
+ for(x in _statusPositions) numStatuses++;
+}
+
+function rdetailGrabCopyStatuses() {
+ if(cp_statuses) return cp_statuses;
+ var req = new Request(FETCH_COPY_STATUSES);
+ req.send(true);
+ cp_statuses = req.result();
+ cp_statuses = cp_statuses.sort(_rdetailSortStatuses);
+}
+
+function _rdetailSortStatuses(a, b) {
+ return parseInt(a.id()) - parseInt(b.id());
+}
+
+/**
+ * Check for a Google Book preview after the main page loads
+ */
+function rdetailCheckForGBPreview() {
+ if (!rdetailGoogleBookPreview) return;
+ dojo.addOnLoad(function() {
+ searchForGBPreview( cleanISBN(record.isbn()) );
+ });
+}
+
+/**
+ *
+ * @param {DOM object} isbn The form element containing the input parameters "isbns"
+ */
+function searchForGBPreview( isbn ) {
+ dojo.require("dojo.io.script");
+ dojo.io.script.get({"url": "https://www.google.com/jsapi"});
+ dojo.io.script.get({"url": "http://books.google.com/books", "content": { "bibkeys": isbn, "jscmd": "viewapi", "callback": "GBPreviewCallback"}});
+}
+
+/**
+ * This function is the call-back function for the JSON scripts which
+ * executes a Google book search response.
+ *
+ * XXX I18N of text needed
+ *
+ * @param {JSON} GBPBookInfo is the JSON object pulled from the Google books service.
+ */
+function GBPreviewCallback(GBPBookInfo) {
+ var GBPreviewDiv = document.getElementById("rdetail_preview_div");
+ var GBPBook;
+
+ for ( i in GBPBookInfo ) {
+ GBPBook = GBPBookInfo[i];
+ }
+
+ if ( !GBPBook ) {
+ return;
+ }
+
+ if ( GBPBook.preview != "noview" ) {
+ // Add a button below the book cover image to load the preview.
+ GBPBadge = document.createElement( 'img' );
+ GBPBadge.src = 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_button1.gif';
+ GBPBadge.title = $('rdetail_preview_badge').innerHTML;
+ GBPBadge.style.border = 0;
+ GBPBadgelink = document.createElement( 'a' );
+ GBPBadgelink.href = 'javascript:rdetailShowExtra("preview");';
+ GBPBadgelink.appendChild( GBPBadge );
+ $('rdetail_image_cell').appendChild( GBPBadgelink );
+ $('rdetail_preview_div').style.height = 600;
+
+ /* Display the "Preview" tab in the Extras section */
+ unHideMe( $('rdetail_preview_link' ) );
+ }
+}
+
+/**
+ * This is called when the user clicks on the 'Preview' link. We assume
+ * a preview is available from Google if this link was made visible.
+ *
+ * XXX I18N of Google Book Preview language attribute needed
+ */
+function rdetailDisplayGBPreview() {
+ unHideMe($('rdetail_extras_loading'));
+ GBPreviewPane = $('rdetail_preview_div');
+ if ( GBPreviewPane.getAttribute('loaded') == null ||
+ GBPreviewPane.getAttribute('loaded') == "false" ) {
+ google.load("books", "0", {"callback" : rdetailGBPViewerLoadCallback, "language": "en"} );
+ GBPreviewPane.setAttribute('loaded', 'true');
+ }
+}
+
+function rdetailGBPViewerLoadCallback() {
+ hideMe($('rdetail_extras_loading'));
+ var GBPViewer = new google.books.DefaultViewer(document.getElementById('rdetail_preview_div'));
+ GBPViewer.load('ISBN:' + cleanISBN(record.isbn()) );
+
+}
+
+function rdetailDrawExpandedHoldings(anchor, bibid, type) {
+ var offsets = {"basic": 0, "index": 0, "supplement": 0};
+ var limit = 10; /* XXX give user control over this? */
+ var target_id = "holding_type_" + type;
+ var target = dojo.byId(target_id);
+
+ anchor.innerHTML = "[-]";
+ anchor.oldonclick = anchor.onclick;
+ anchor.onclick = function() {
+ anchor.onclick = anchor.oldonclick;
+ anchor.innerHTML = "[+]";
+ dojo.empty(target);
+ };
+
+ function _load() {
+ dojo.empty(target);
+ fieldmapper.standardRequest(
+ ["open-ils.serial",
+ "open-ils.serial.received_siss.retrieve.by_bib.atomic"], {
+ "params": [bibid, {"offset": offsets[type], "limit": limit}],
+ "async": true,
+ "oncomplete": function(r) {
+ try {
+ if (msg = r.recv().content()) { /* sic, assignment */
+ if (!msg.length) return;
+ offsets[type] += msg.length;
+ var table = dojo.create("table", null, target);
+ dojo.forEach(
+ msg, function(o) {
+ var tr = dojo.create("tr", null, table);
+ dojo.create(
+ "td", {
+ "innerHTML": o.issuance.label(),
+ "style": {"paddingLeft": "3em"}
+ }, tr
+ );
+
+ if (!o.has_units) return;
+ /* can't place holds if no units */
+ var td = dojo.create("td", null, tr);
+ dojo.create(
+ "a", {
+ "href":"javascript:void(0);",
+ "style": {"marginLeft": "1.5em"},
+ "onclick": function() {
+ holdsDrawEditor({
+ "type": "I",
+ "issuance": o.issuance.id()
+ });
+ },
+ "innerHTML": "[" +
+ opac_strings.PLACE_HOLD + "]"
+ }, td
+ );
+ }
+ );
+ if (msg.length == limit) {
+ dojo.create("br", null, target);
+ dojo.create(
+ "a", {
+ "href": "javascript:void(0);",
+ "innerHTML":
+ "[" + opac_strings.MORE + "]",
+ "onclick": _load
+ }, target
+ );
+ }
+ }
+ } catch (E) {
+ void(0);
+ }
+ }
+ }
+ );
+ }
+ _load();
+}
--- /dev/null
+dojo.require('openils.BibTemplate');
+dojo.requireLocalization("openils.opac", "opac");
+var opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
+
+var recordsHandled = 0;
+var recordsCache = [];
+var lowHitCount = 4;
+var isbnList = '';
+var googleBooksLink = false;
+
+var resultFetchAllRecords = false;
+var resultCompiledSearch = null;
+
+/* set up the event handlers */
+if( findCurrentPage() == MRESULT || findCurrentPage() == RRESULT ) {
+ G.evt.result.hitCountReceived.push(resultSetHitInfo);
+ G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts);
+ G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
+ G.evt.result.allRecordsReceived.push( function(){unHideMe($('result_info_2'))}, fetchGoogleBooksLink, fetchChiliFreshReviews);
+
+ attachEvt('result','lowHits',resultLowHits);
+ attachEvt('result','zeroHits',resultZeroHits);
+ attachEvt( "common", "locationUpdated", resultSBSubmit );
+ /* do this after we have ID's so the rank for mr pages will be correct */
+ attachEvt("result", "preCollectRecords", resultPaginate);
+}
+
+function resultSBSubmit(){searchBarSubmit();}
+
+/* returns the last 'index' postion ocurring in this page */
+function resultFinalPageIndex() {
+ if(getHitCount() < (getOffset() + getDisplayCount()))
+ return getHitCount() - 1;
+ return getOffset() + getDisplayCount() - 1;
+}
+
+
+
+
+/* generic search method */
+function resultCollectSearchIds( type, method, handler ) {
+
+ var sort = (getSort() == SORT_TYPE_REL) ? null : getSort();
+ var sortdir = (sort) ? ((getSortDir()) ? getSortDir() : SORT_DIR_ASC) : null;
+
+ var item_type;
+ var item_form;
+ var args = {};
+
+ if( type ) {
+ var form = parseForm(getForm());
+ item_type = form.item_type;
+ item_form = form.item_form;
+
+ } else {
+ item_type = (getItemType()) ? getItemType().split(/,/) : null;
+ item_form = (getItemForm()) ? getItemForm().split(/,/) : null;
+ }
+
+ var limit = (resultFetchAllRecords) ? 1000 : getDisplayCount();
+
+ if( getOffset() > 0 ) {
+ if( getHitCount() > 0 && (getOffset() + getDisplayCount()) > getHitCount() )
+ limit = getHitCount() - getOffset();
+ }
+
+ var lasso = getLasso();
+
+ if (lasso) args.org_unit = -lasso;
+ else args.org_unit = getLocation();
+
+ args.depth = getDepth();
+ args.limit = limit;
+ args.offset = getOffset();
+ args.visibility_limit = 3000;
+ args.default_class = getStype();
+
+ if(sort) args.sort = sort;
+ if(sortdir) args.sort_dir = sortdir;
+ if(item_type) args.item_type = item_type;
+ if(item_form) args.item_form = item_form;
+ if(getAvail()) args.available = 1;
+
+
+ if(getFacet()) args.facets = getFacet();
+
+ if(getAudience()) args.audience = getAudience().split(/,/);
+ if(getLitForm()) args.lit_form = getLitForm().split(/,/);
+ if(getLanguage()) args.language = getLanguage().split(/,/);
+ if(getBibLevel()) args.bib_level = getBibLevel().split(/,/);
+ if(getCopyLocs()) args.locations = getCopyLocs().split(/,/);
+ if(getPubdBefore()) args.before = getPubdBefore();
+ else if(getPubdAfter()) args.after = getPubdAfter();
+ else if(getPubdBetween()) args.between = getPubdBetween().split(/,/);
+
+ _debug('Search args: ' + js2JSON(args));
+ _debug('Raw query: ' + getTerm());
+
+ var my_ou = findOrgUnit(args.org_unit);
+ if (my_ou && my_ou.shortname()) {
+ var atomfeed = "/opac/extras/opensearch/1.1/" + my_ou.shortname() + "/atom-full/" + getStype() + '?searchTerms=' + getTerm();
+ if (args.facets) { atomfeed += ' ' + args.facets; }
+ if (sort) { atomfeed += '&searchSort=' + sort; }
+ if (sortdir) { atomfeed += '&searchSortDir=' + sortdir; }
+ dojo.create('link', {"rel":"alternate", "href":atomfeed, "type":"application/atom+xml"}, dojo.query('head')[0]);
+ }
+
+ var req = new Request(method, args, getTerm(), 1);
+ req.callback(handler);
+ req.send();
+}
+
+
+
+
+
+/* set the search result info, number of hits, which results we're
+ displaying, links to the next/prev pages, etc. */
+function resultSetHitInfo() {
+
+ var lasso = getLasso();
+ if (!lasso) {
+ /* tell the user where the results are coming from */
+ var baseorg = findOrgUnit(getLocation());
+ var depth = getDepth();
+ var mydepth = findOrgDepth(baseorg);
+ if( findOrgDepth(baseorg) != depth ) {
+ var tmporg = baseorg;
+ while( mydepth > depth ) {
+ mydepth--;
+ tmporg = findOrgUnit(tmporg.parent_ou());
+ }
+ unHideMe($('including_results_for'));
+ $('including_results_location').appendChild(text(tmporg.name()));
+ }
+ }
+
+
+ try{searchTimer.stop()}catch(e){}
+
+ //if( findCurrentPage() == MRESULT ) {
+ if( findCurrentPage() == MRESULT ||
+
+ (findCurrentPage() == RRESULT &&
+ (
+ getRtype() == RTYPE_TITLE ||
+ getRtype() == RTYPE_AUTHOR ||
+ getRtype() == RTYPE_SUBJECT ||
+ getRtype() == RTYPE_SERIES ||
+ getRtype() == RTYPE_KEYWORD
+ )
+
+ ) ) {
+
+ if(getHitCount() <= lowHitCount && getTerm())
+ runEvt('result', 'lowHits');
+ }
+
+ if(getHitCount() == 0) {
+ runEvt('result', 'zeroHits');
+ return;
+ }
+
+
+ var pages = getHitCount() / getDisplayCount();
+ if(pages % 1) pages = parseInt(pages) + 1;
+
+
+
+ var cpage = (getOffset()/getDisplayCount()) + 1;
+
+ G.ui.result.current_page.appendChild(text(cpage));
+ G.ui.result.num_pages.appendChild(text(pages + ")")); /* the ) is dumb */
+
+ $('current_page2').appendChild(text(cpage));
+ $('num_pages2').appendChild(text(pages + ")")); /* the ) is dumb */
+
+ /* set the offsets */
+ var offsetEnd = getDisplayCount() + getOffset();
+ if( getDisplayCount() > (getHitCount() - getOffset()))
+ offsetEnd = getHitCount();
+
+ G.ui.result.offset_end.appendChild(text(offsetEnd));
+ G.ui.result.offset_start.appendChild(text(getOffset() + 1));
+
+ $('offset_end2').appendChild(text(offsetEnd));
+ $('offset_start2').appendChild(text(getOffset() + 1));
+
+ G.ui.result.result_count.appendChild(text(getHitCount()));
+ unHideMe(G.ui.result.info);
+
+ $('result_count2').appendChild(text(getHitCount()));
+ unHideMe($('result_info_div2'));
+}
+
+function resultLowHits() {
+ showCanvas();
+ unHideMe($('result_low_hits'));
+ if(getHitCount() > 0)
+ unHideMe($('result_low_hits_msg'));
+
+ var words = [];
+ for(var key in resultCompiledSearch.searches)
+ words.push(resultCompiledSearch.searches[key].term);
+
+ var sreq = new Request(CHECK_SPELL, words.join(' '));
+ sreq.callback(resultSuggestSpelling);
+ sreq.send();
+
+ for(var key in resultCompiledSearch.searches) {
+ var areq = new Request(FETCH_CROSSREF, key, resultCompiledSearch.searches[key].term);
+ areq.callback(resultLowHitXRef);
+ areq.send();
+ }
+
+ if( !(getForm() == null || getForm() == 'all' || getForm() == "") ) {
+ var a = {};
+ a[PARAM_FORM] = "all";
+ $('low_hits_remove_format_link').setAttribute('href',buildOPACLink(a));
+ unHideMe($('low_hits_remove_format'));
+ }
+
+ resultSuggestSearchClass();
+
+ if(getTerm()) resultExpandSearch(); /* advanced search */
+}
+
+var lowHitsXRefSet = {};
+var lowHitsXRefLink;
+var lowHitsXRefLinkParent;
+function resultLowHitXRef(r) {
+ if(!lowHitsXRefLink){
+ lowHitsXRefLinkParent = $('low_hits_xref_link').parentNode;
+ lowHitsXRefLink = lowHitsXRefLinkParent.removeChild($('low_hits_xref_link'));
+ }
+ var res = r.getResultObject();
+ var arr = res.from;
+ arr.concat(res.also);
+ if(arr && arr.length > 0) {
+ unHideMe($('low_hits_cross_ref'));
+ var word;
+ var c = 0;
+ while( word = arr.shift() ) {
+
+ if (lowHitsXRefSet[word] == 1) continue;
+ lowHitsXRefSet[word] = 1;
+
+ if(c++ > 20) break;
+ var a = {};
+ a[PARAM_TERM] = word;
+ var template = lowHitsXRefLink.cloneNode(true);
+ template.setAttribute('href',buildOPACLink(a));
+ template.appendChild(text(word));
+ lowHitsXRefLinkParent.appendChild(template);
+ lowHitsXRefLinkParent.appendChild(text(' '));
+ }
+ }
+}
+
+function resultZeroHits() {
+ showCanvas();
+ unHideMe($('result_low_hits'));
+ unHideMe($('result_zero_hits_msg'));
+ //if(getTerm()) resultExpandSearch(); /* advanced search */
+}
+
+function resultExpandSearch() {
+ var top = findOrgDepth(globalOrgTree);
+ if(getDepth() == top) return;
+ unHideMe($('low_hits_expand_range'));
+ var par = $('low_hits_expand_link').parentNode;
+ var template = par.removeChild($('low_hits_expand_link'));
+
+ var bottom = getDepth();
+ while( top < bottom ) {
+ var a = {};
+ a[PARAM_DEPTH] = top;
+ var temp = template.cloneNode(true);
+ temp.appendChild(text(findOrgTypeFromDepth(top).opac_label()))
+ temp.setAttribute('href',buildOPACLink(a));
+ par.appendChild(temp);
+ top++;
+ }
+}
+
+function resultSuggestSearchClass() {
+ var stype = getStype();
+ if(stype == STYPE_KEYWORD) return;
+ var a = {}; var ref;
+ unHideMe($('low_hits_search_type'));
+ if(stype != STYPE_TITLE) {
+ ref = $('low_hits_title_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_TITLE;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_AUTHOR) {
+ ref = $('low_hits_author_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_AUTHOR;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_SUBJECT) {
+ ref = $('low_hits_subject_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_SUBJECT;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_KEYWORD) {
+ ref = $('low_hits_keyword_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_KEYWORD;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_SERIES) {
+ ref = $('low_hits_series_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_SERIES;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+}
+
+function resultSuggestSpelling(r) {
+ var res = r.getResultObject();
+ var phrase = getTerm();
+ var words = phrase.split(/ /);
+
+ var newterm = "";
+
+ for( var w = 0; w < words.length; w++ ) {
+ var word = words[w];
+ var blob = grep(res, function(i){return (i.word == word);});
+ if( blob ) blob = blob[0];
+ else continue;
+ if( blob.word == word ) {
+ if( !blob.found && blob.suggestions && blob.suggestions[0] ) {
+ newterm += " " + blob.suggestions[0];
+ unHideMe($('did_you_mean'));
+ } else {
+ newterm += " " + word;
+ }
+ }
+ }
+
+ var arg = {};
+ arg[PARAM_TERM] = newterm;
+ $('spell_check_link').setAttribute('href', buildOPACLink(arg));
+ $('spell_check_link').appendChild(text(newterm));
+}
+
+
+function resultPaginate() {
+ var o = getOffset();
+
+ if( !( ((o) + getDisplayCount()) >= getHitCount()) ) {
+
+ var args = {};
+ args[PARAM_OFFSET] = o + getDisplayCount();
+ args[PARAM_SORT] = SORT;
+ args[PARAM_SORT_DIR] = SORT_DIR;
+ args[PARAM_RLIST] = new CGI().param(PARAM_RLIST);
+
+ G.ui.result.next_link.setAttribute("href", buildOPACLink(args));
+ addCSSClass(G.ui.result.next_link, config.css.result.nav_active);
+
+ $('next_link2').setAttribute("href", buildOPACLink(args));
+ addCSSClass($('next_link2'), config.css.result.nav_active);
+
+ args[PARAM_OFFSET] = getHitCount() - (getHitCount() % getDisplayCount());
+
+ /* when hit count is divisible by display count, we have to adjust */
+ if( getHitCount() % getDisplayCount() == 0 )
+ args[PARAM_OFFSET] -= getDisplayCount();
+
+ /*
+ G.ui.result.end_link.setAttribute("href", buildOPACLink(args));
+ addCSSClass(G.ui.result.end_link, config.css.result.nav_active);
+
+ $('end_link2').setAttribute("href", buildOPACLink(args));
+ addCSSClass($('end_link2'), config.css.result.nav_active);
+ */
+ }
+
+ if( o > 0 ) {
+
+ var args = {};
+ args[PARAM_SORT] = SORT;
+ args[PARAM_SORT_DIR] = SORT_DIR;
+ args[PARAM_RLIST] = new CGI().param(PARAM_RLIST);
+
+ args[PARAM_OFFSET] = o - getDisplayCount();
+ G.ui.result.prev_link.setAttribute( "href", buildOPACLink(args));
+ addCSSClass(G.ui.result.prev_link, config.css.result.nav_active);
+
+ $('prev_link2').setAttribute( "href", buildOPACLink(args));
+ addCSSClass($('prev_link2'), config.css.result.nav_active);
+
+ args[PARAM_OFFSET] = 0;
+ G.ui.result.home_link.setAttribute( "href", buildOPACLink(args));
+ addCSSClass(G.ui.result.home_link, config.css.result.nav_active);
+
+ $('search_home_link2').setAttribute( "href", buildOPACLink(args));
+ addCSSClass($('search_home_link2'), config.css.result.nav_active);
+ }
+
+ if(getDisplayCount() < getHitCount()) {
+ unHideMe($('start_end_links_span'));
+ unHideMe($('start_end_links_span2'));
+ }
+
+ showCanvas();
+ try{searchTimer.stop()}catch(e){}
+}
+
+function buildunAPISpan (span, type, id) {
+ var cgi = new CGI();
+ var d = new Date();
+
+ addCSSClass(span,'unapi-id');
+
+ span.setAttribute(
+ 'title',
+ 'tag:' + cgi.server_name + ',' +
+ d.getFullYear() +
+ ':' + type + '/' + id
+ );
+}
+
+function unhideGoogleBooksLink (data) {
+ for ( var i in data ) {
+ //if (data[i].preview == 'noview') continue;
+
+ var gbspan = $n(document.documentElement, 'googleBooksLink-' + i);
+ var gba = $n(gbspan, "googleBooks-link");
+
+ gba.setAttribute(
+ 'href',
+ data[i].info_url
+ );
+ removeCSSClass( gbspan, 'hide_me' );
+ }
+}
+
+/* display the record info in the record display table 'pos' is the
+ zero based position the record should have in the display table */
+function resultDisplayRecord(rec, pos, is_mr) {
+
+ fieldmapper.IDL.load(['mvr']);
+ if(rec == null) rec = new mvr(); /* so the page won't die if there was an error */
+ recordsHandled++;
+ recordsCache.push(rec);
+
+ var r = table.rows[pos + 1];
+ var currentISBN = cleanISBN(rec.isbn());
+ var is_online_only;
+
+ if (rec.online_loc()[0]) {
+ // FIXME: check more than just the first url, check for copies, bib source?
+ if (rec.online_loc()[0].substring(0,20) == "http://via.tadl.org/") {
+ is_online_only = true;
+ }
+ }
+
+ if (googleBooksLink) {
+ var gbspan = $n(r, "googleBooksLink");
+ if (currentISBN) {
+ gbspan.setAttribute(
+ 'name',
+ gbspan.getAttribute('name') + '-' + currentISBN
+ );
+
+ if (isbnList) isbnList += ', ';
+ isbnList += currentISBN;
+ }
+ }
+
+ if (currentISBN && chilifresh && chilifresh != '(none)') {
+ var cfrow = $n(r, "chilifreshReview");
+ if (cfrow) {
+ removeCSSClass( cfrow, 'hide_me' );
+ }
+ var cflink = $n(r, "chilifreshReviewLink");
+ if (cflink) {
+ cflink.setAttribute(
+ 'id',
+ 'isbn_' + currentISBN
+ );
+ }
+ var cfdiv = $n(r, "chilifreshReviewResult");
+ if (cfdiv) {
+ cfdiv.setAttribute(
+ 'id',
+ 'chili_review_' + currentISBN
+ )
+ }
+ }
+
+/*
+ try {
+ var rank = parseFloat(ranks[pos + getOffset()]);
+ rank = parseInt( rank * 100 );
+ var relspan = $n(r, "relevancy_span");
+ relspan.appendChild(text(rank));
+ unHideMe(relspan.parentNode);
+ } catch(e){ }
+*/
+
+ var pic = $n(r, config.names.result.item_jacket);
+ if (currentISBN) {
+ pic.setAttribute("src", buildISBNSrc(currentISBN));
+ } else {
+ pic.setAttribute("src", "/opac/images/blank.png");
+ }
+
+ var title_link = $n(r, config.names.result.item_title);
+ var author_link = $n(r, config.names.result.item_author);
+
+ var onlyrec;
+ if( is_mr ) {
+ onlyrec = onlyrecord[ getOffset() + pos ];
+ if(onlyrec) {
+ buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', onlyrec);
+
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = onlyrec;
+ args[PARAM_MRID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+ title_link.setAttribute("href", buildOPACLink(args));
+ title_link.appendChild(text(normalize(truncate(rec.title(), 65))));
+
+ } else {
+ buildunAPISpan($n(r,'unapi'), 'metabib-metarecord', rec.doc_id());
+
+ buildTitleLink(rec, title_link);
+ var args = {};
+ args.page = RRESULT;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_MRID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+ }
+
+ unHideMe($n(r,'place_hold_span'));
+ $n(r,'place_hold_link').onclick = function() { resultDrawHoldsWindow(rec.doc_id(), 'M'); }
+
+
+ } else {
+ onlyrec = rec.doc_id();
+ buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', rec.doc_id());
+
+ buildTitleDetailLink(rec, title_link);
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+
+ if (!is_online_only) {
+ // don't show Place Hold for online-only bibs
+ unHideMe($n(r,'place_hold_span'));
+ $n(r,'place_hold_link').onclick = function() { resultDrawHoldsWindow(rec.doc_id(), 'T'); }
+ }
+ }
+
+ buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
+
+ if(! is_mr ) {
+
+ if(!isNull(rec.edition())) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ $n(r, "result_table_edition_span").appendChild( text( rec.edition()) );
+ }
+ if(!isNull(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( $n(r, "result_table_extra_span"));
+ unHideMe($n(r, "result_table_pub_span"));
+ $n(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() ));
+ }
+
+ if(!isNull(rec.physical_description()) ) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ var t;
+ if (is_online_only) {
+ // simplify physical description for online-only bibs
+ t = "online";
+ } else {
+ t = " " + rec.physical_description();
+ }
+ //$n(r, "result_table_phys_span").appendChild( text(t.replace(/:.*/g,'')));
+ $n(r, "result_table_phys_span").appendChild( text(t));
+ }
+
+ }
+
+ if (is_online_only) {
+ hideMe($n(r,'result_table_format_cell'));
+ } else {
+ resultBuildFormatIcons( r, rec, is_mr );
+ }
+
+ var bt_params = {
+ sync : false,
+ root : r,
+ subObjectLimit : 10,
+ org_unit : findOrgUnit(getLocation()).shortname(),
+ depth : getDepth()
+ };
+
+ if (!is_mr) {
+ bt_params = dojo.mixin( bt_params, { record : onlyrec } );
+ } else {
+ bt_params = dojo.mixin( bt_params, { metarecord : onlyrec } );
+ }
+
+ if (findOrgType(findOrgUnit(getLocation()).ou_type()).can_have_vols())
+ unHideMe($n(r,'local_callnumber_list'));
+
+ new openils.BibTemplate( bt_params ).render();
+
+ unHideMe(r);
+
+ runEvt("result", "recordDrawn", rec.doc_id(), title_link);
+
+ /*
+ if(resultPageIsDone()) {
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ }
+ */
+}
+
+function resultDrawHoldsWindow(hold_target, hold_type) {
+ var src = location.href;
+
+ if(forceLoginSSL && src.match(/^http:/)) {
+
+ src = src.replace(/^http:/, 'https:');
+
+ if(src.match(/&hold_target=/)) {
+ src.replace(/&hold_target=(\d+)/, hold_target);
+
+ } else {
+ src += '&hold_target=' + hold_target;
+ }
+
+ location.href = src;
+
+ } else {
+ holdsDrawEditor({record:hold_target, type:hold_type});
+ }
+}
+
+
+
+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;
+}
+
+
+function resultBuildFormatIcons( row, rec, is_mr ) {
+
+ var ress = rec.types_of_resource();
+
+ for( var i in ress ) {
+
+ var res = ress[i];
+ if(!res) continue;
+
+ var link = $n(row, res + "_link");
+ link.title = res;
+ var img = link.getElementsByTagName("img")[0];
+ removeCSSClass( img, config.css.dim );
+
+ var f = getForm();
+ if( f != "all" ) {
+ if( f == modsFormatToMARC(res) )
+ addCSSClass( img, "dim2_border");
+ }
+
+ var args = {};
+ args[PARAM_OFFSET] = 0;
+
+ if(is_mr) {
+ args.page = RRESULT;
+ args[PARAM_TFORM] = modsFormatToMARC(res);
+ args[PARAM_MRID] = rec.doc_id();
+
+ } else {
+ args.page = RDETAIL
+ args[PARAM_RID] = rec.doc_id();
+ }
+
+ link.setAttribute("href", buildOPACLink(args));
+
+ }
+}
+
+function fetchGoogleBooksLink () {
+ if (isbnList && googleBooksLink) {
+ var scriptElement = document.createElement("script");
+ scriptElement.setAttribute("id", "jsonScript");
+ scriptElement.setAttribute("src",
+ "http://books.google.com/books?bibkeys=" +
+ escape(isbnList) + "&jscmd=viewapi&callback=unhideGoogleBooksLink");
+ scriptElement.setAttribute("type", "text/javascript");
+ // make the request to Google Book Search
+ document.documentElement.firstChild.appendChild(scriptElement);
+ }
+}
+
+function fetchChiliFreshReviews() {
+ if (chilifresh && chilifresh != '(none)') {
+ try { chili_init(); } catch(E) { console.log(E + '\n'); }
+ }
+}
+
+function resultPageIsDone(pos) {
+
+ return (recordsHandled == getDisplayCount()
+ || recordsHandled + getOffset() == getHitCount());
+}
+
+var resultCCHeaderApplied = false;
+
+/* -------------------------------------------------------------------- */
+/* dynamically add the copy count rows based on the org type 'countsrow'
+ is the row into which we will add TD's to hold the copy counts
+ This code generates copy count cells with an id of
+ 'copy_count_cell_<depth>_<pagePosition>' */
+function resultAddCopyCounts(rec, pagePosition) {
+
+ var r = table.rows[pagePosition + 1];
+ var countsrow = $n(r, config.names.result.counts_row );
+ var ccell = $n(countsrow, config.names.result.count_cell);
+
+ var nodes = orgNodeTrail(findOrgUnit(getLocation()));
+ var start_here = 0;
+ var orgHiding = checkOrgHiding();
+ if (orgHiding) {
+ for (var i = 0; i < nodes.length; i++) {
+ if (orgHiding.depth == findOrgDepth(nodes[i])) {
+ start_here = i;
+ }
+ }
+ }
+
+ var node = nodes[start_here];
+ var type = findOrgType(node.ou_type());
+ ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition;
+ ccell.title = type.opac_label();
+ //addCSSClass(ccell, config.css.result.cc_cell_even);
+
+ var lastcell = ccell;
+ var lastheadcell = null;
+
+ var cchead = null;
+ var ccheadcell = null;
+ if(!resultCCHeaderApplied && !getLasso()) {
+ 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()));
+ ccrow.appendChild(t);
+ resultCCHeaderApplied = true;
+ }
+
+ if(nodes[start_here+1]) {
+
+ var x = start_here+1;
+ var d = findOrgDepth(nodes[start_here+1]);
+ var d2 = findOrgDepth(nodes[nodes.length -1]);
+
+ for( var i = d; i <= d2 ; i++ ) {
+
+ ccell = ccell.cloneNode(true);
+
+ //if((i % 2)) removeCSSClass(ccell, "copy_count_cell_even");
+ //else addCSSClass(ccell, "copy_count_cell_even");
+
+ var node = nodes[x++];
+ var type = findOrgType(node.ou_type());
+
+ ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition;
+ ccell.title = type.opac_label();
+ countsrow.insertBefore(ccell, lastcell);
+ lastcell = ccell;
+
+ if(ccheadcell) {
+ var t = ccheadcell.cloneNode(true);
+ t.appendChild(text(type.opac_label()));
+ ccrow.insertBefore(t, lastheadcell);
+ lastheadcell = t;
+ }
+ }
+ }
+
+ unHideMe($("search_info_table"));
+}
+
+/* collect copy counts for a record using method 'methodName' */
+function resultCollectCopyCounts(rec, pagePosition, methodName) {
+ if(rec == null || rec.doc_id() == null) return;
+
+ var loc = getLasso();
+ if (loc) loc = -loc;
+ else loc= getLocation();
+
+ var req = new Request(methodName, loc, rec.doc_id(), getForm() );
+ req.request.userdata = [ rec, pagePosition ];
+ req.callback(resultHandleCopyCounts);
+ req.send();
+}
+
+function resultHandleCopyCounts(r) {
+ runEvt('result', 'copyCountsReceived', r.userdata[0], r.userdata[1], r.getResultObject());
+}
+
+
+/* XXX Needs to understand Lasso copy counts... */
+/* display the collected copy counts */
+function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
+ if(copy_counts == null || rec == null) return;
+
+ if (getLasso()) {
+ var copy_counts_lasso = {
+ transcendant : null,
+ count : 0,
+ unshadow : 0,
+ available : 0,
+ depth : -1,
+ org_unit : getLasso()
+ };
+
+ for (var i in copy_counts) {
+ copy_counts_lasso.transcendant = copy_counts[i].transcendant;
+ copy_counts_lasso.count += parseInt(copy_counts[i].count);
+ copy_counts_lasso.unshadow += parseInt(copy_counts[i].unshadow);
+ copy_counts_lasso.available += parseInt(copy_counts[i].available);
+ }
+
+ copy_counts = [ copy_counts_lasso ];
+ }
+
+ var i = 0;
+ while(copy_counts[i] != null) {
+ var cell = $("copy_count_cell_" + i +"_" + pagePosition);
+ if (cell) {
+ var cts = copy_counts[i];
+ cell.appendChild(text(cts.available + " / " + cts.count));
+
+ if(isXUL()) {
+ /* here we style opac-invisible records for xul */
+
+ if( cts.depth == 0 ) {
+ if(cts.transcendant == null && cts.unshadow == 0) {
+ _debug("found an opac-shadowed record: " + rec.doc_id());
+ var row = cell.parentNode.parentNode.parentNode.parentNode.parentNode;
+ if( cts.count == 0 )
+ addCSSClass( row, 'no_copies' );
+ else
+ addCSSClass( row, 'shadowed' );
+ }
+ }
+ }
+ }
+ i++;
+ }
+}
+
+
--- /dev/null
+var records = new Array();
+var table;
+var rowtemplate;
+var rresultLimit = 200;
+var resultFacetKey;
+
+var rresultIsPaged = false;
+
+function rresultUnload() { removeChildren(table); table = null;}
+
+attachEvt("common", "unload", rresultUnload);
+attachEvt("common", "run", rresultDoSearch);
+attachEvt("result", "idsReceived", rresultCollectRecords);
+attachEvt("result", "recordDrawn", rresultLaunchDrawn);
+
+hideMe($('copyright_block'));
+
+function rresultDoSearch() {
+
+ swapCanvas($('loading_alt'));
+
+ table = G.ui.result.main_table;
+ hideMe(G.ui.result.row_template);
+ if( table && table.parentNode ) {
+ while( table.parentNode.rows.length <= (getDisplayCount() +1) )
+ hideMe(table.appendChild(G.ui.result.row_template.cloneNode(true)));
+ }
+ rresultCollectIds();
+}
+
+function rresultCollectIds() {
+ var ids;
+
+
+ var holdTarget = new CGI().param('hold_target');
+ if(holdTarget != null) {
+ rresultHandlePlaceHold(holdTarget);
+ return;
+ }
+
+ var rtype = getRtype();
+ if (rtype && rtype.indexOf('|') > -1)
+ rtype = rtype.substring(0,rtype.indexOf('|'));
+
+ switch(rtype) {
+
+ case RTYPE_COOKIE:
+ ids = JSON2js(dojo.cookie(COOKIE_RIDS));
+ _rresultHandleIds( ids, ids.length );
+ break;
+
+ case RTYPE_TITLE:
+ case RTYPE_AUTHOR:
+ case RTYPE_SUBJECT:
+ case RTYPE_SERIES:
+ case RTYPE_KEYWORD:
+ rresultDoRecordSearch();
+ break;
+
+ case RTYPE_MULTI:
+ rresultDoRecordMultiSearch();
+ break;
+
+ case RTYPE_LIST :
+ rresultHandleList();
+ break;
+
+ case RTYPE_MARC :
+ rresultCollectMARCIds();
+ break;
+
+ case RTYPE_ISBN :
+ rresultCollectISBNIds();
+ break;
+
+ case RTYPE_TCN :
+ rresultCollectTCNIds();
+ break;
+
+ case RTYPE_ISSN :
+ rresultCollectISSNIds();
+ break;
+
+
+ case RTYPE_MRID :
+ case null :
+ case "" :
+ default:
+ var form = rresultGetForm();
+ var args = { format : form, org : getLocation(), depth : rresultGetDepth() };
+
+ var lasso = getLasso();
+ if (lasso) args.org = -lasso;
+
+ var req = new Request(FETCH_RIDS, getMrid(), args);
+ req.callback( rresultHandleRIds );
+ req.send();
+
+ if( rresultGetDepth() != findOrgDepth(globalOrgTree) ) {
+ var link = $('rresult_show_all_link');
+ if(link) {
+ unHideMe($('rresult_show_all'));
+ link.appendChild( text(
+ findOrgType(globalOrgTree.ou_type()).opac_label()));
+ }
+
+ } else {
+ if( rresultGetDepth() != getDepth() ) { /* inside a limited display */
+ var link = $('rresult_show_here_link');
+ if(link) {
+ link.appendChild( text(
+ findOrgType(findOrgUnit(getLocation()).ou_type()).opac_label()));
+ unHideMe($('rresult_show_here'));
+ }
+ }
+ }
+ }
+}
+
+function rresultExpandSearch() {
+ var args = {};
+ args[PARAM_RDEPTH] = findOrgDepth(globalOrgTree);
+ goTo(buildOPACLink(args));
+}
+
+function rresultContractSearch() {
+ var args = {};
+ RDEPTH = null;
+ args[PARAM_OFFSET] = 0;
+ goTo(buildOPACLink(args));
+}
+
+
+function rresultGetDepth() {
+ if( getRdepth() != null) return getRdepth();
+ return getDepth();
+}
+
+
+function rresultGetForm() {
+ var form;
+
+ if(getTform()) /* did the user select a format from the icon list (temporary) */
+ form = (getTform() == 'all') ? null : getTform();
+ else /* did the use select a format from simple search dropdown */
+ form = (getForm() == 'all') ? null : getForm();
+
+ if(!form) { /* did the user select a format from the advanced search */
+ form = getItemType();
+ var f = getItemForm();
+
+ if(form) {
+ form = form.replace(/,/,'');
+ if(f) form += '-' + f;
+ } else {
+ if(f) form = '-' + f;
+ }
+ }
+
+ return form;
+}
+
+
+function rresultCollectMARCIds() {
+
+ var args = {};
+ args.searches = JSON2js(getSearches());
+ args.limit = 200;
+ args.org_unit = globalOrgTree.id();
+ args.depth = 0;
+
+ rresultIsPaged = true;
+ var req = new Request(FETCH_ADV_MARC_MRIDS, args, getDisplayCount(), getOffset());
+ req.callback(rresultHandleRIds);
+ req.request.noretry = true;
+ req.send();
+}
+
+
+function rresultCollectISBNIds() {
+ var req = new Request(FETCH_ADV_ISBN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultCollectTCNIds() {
+ var req = new Request(FETCH_ADV_TCN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultCollectISSNIds() {
+ var req = new Request(FETCH_ADV_ISSN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultHandleList() {
+ var ids = new CGI().param(PARAM_RLIST);
+ var count;
+ if(!dojo.isArray(ids)) {
+ count = 1;
+ ids = [ids];
+ } else {
+ count = ids.length;
+ }
+ if(ids) _rresultHandleIds(ids, count);
+}
+
+var rresultTries = 0;
+function rresultHandleRIds(r) {
+ var res = r.getResultObject();
+
+ if(!res) res = {count:0,ids:[]};
+
+ if( res.count == 0 && rresultTries == 0 && ! r.noretry) {
+
+ rresultTries++;
+ var form = rresultGetForm();
+ var args = { format : form, org : getLocation(), depth : findOrgDepth(globalOrgTree) };
+
+ var lasso = getLasso();
+ if (lasso) args.org = -lasso;
+
+ var req = new Request(FETCH_RIDS, getMrid(), args );
+ req.callback( rresultHandleRIds );
+ req.send();
+ unHideMe($('no_formats'));
+ hideMe($('rresult_show_all'));
+
+ } else {
+
+ _rresultHandleIds(res.ids, res.count);
+ }
+}
+
+function _rresultHandleIds(ids, count) {
+ //var json = js2JSON({ids:ids,count:count});
+ /*
+ dojo.cookie(COOKIE_SRIDS, json, {'expires':1});
+ */
+
+ HITCOUNT = parseInt(count);
+ runEvt('result', 'hitCountReceived');
+ runEvt('result', 'idsReceived', ids, getOffset());
+}
+
+/*
+function rresultCollectRecords(ids) {
+ runEvt("result", "preCollectRecords");
+ var x = 0;
+ for( var i = getOffset(); i!= getDisplayCount() + getOffset(); i++ ) {
+ if(ids[i] == null) break;
+ var req = new Request(FETCH_RMODS, parseInt(ids[i]));
+ req.callback(rresultHandleMods);
+ req.request.userdata = x++;
+ req.send();
+ }
+}
+*/
+
+
+function rresultCollectRecords(ids, base) {
+ runEvt("result", "preCollectRecords");
+ var x = 0;
+
+ // don't perform rdetail redirect if user was on rdetail and cliecked Back
+ if(findCurrentPage() == RRESULT && isXUL()) {
+ if(ids.length == 1 && !xulG.fromBack) {
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = ids[0];
+ location.href = buildOPACLink(args);
+ }
+ }
+
+ if (!base) base = 0;
+ if( rresultIsPaged ) base = 0;
+
+ for( var i = base; i!= getDisplayCount() + base; i++ ) {
+ if(ids[i] == null) break;
+ var req = new Request(FETCH_RMODS, parseInt(ids[i]));
+ req.callback(rresultHandleMods);
+ req.request.userdata = x++;
+ req.send();
+ }
+}
+
+
+var recsReceivedCalled = false;
+function rresultHandleMods(r) {
+ var rec = r.getResultObject();
+ runEvt('result', 'recordReceived', rec, r.userdata, false);
+ // Don't display copy counts if we're an online-only bib
+ // FIXME: more robust logic, centralize and remove hardcoded string
+ if (!rec.online_loc()[0] || rec.online_loc()[0].substring(0,20) != "http://via.tadl.org/") {
+ resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS);
+ }
+ if(resultPageIsDone() && !recsReceivedCalled) {
+ recsReceivedCalled = true;
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ unHideMe($('copyright_block'));
+ }
+}
+
+function rresultLaunchDrawn(id, node) {
+ runEvt("rresult", "recordDrawn", id, node);
+}
+
+
+function rresultDoRecordSearch() {
+ rresultIsPaged = true;
+ resultCollectSearchIds(true, SEARCH_RS_QUERY, rresultFilterSearchResults );
+}
+
+function rresultDoRecordMultiSearch() {
+ rresultIsPaged = true;
+ resultCollectSearchIds(false, SEARCH_RS_QUERY, rresultFilterSearchResults );
+}
+
+
+function rresultFilterSearchResults(r) {
+ var result = r.getResultObject();
+ var ids = [];
+ if( result.count > 0 ) {
+ for( var i = 0; i != result.ids.length; i++ )
+ ids.push(result.ids[i][0]);
+ }
+
+ resultFacetKey = result.facet_key;
+ resultCompiledSearch = result.compiled_search;
+ dojo.require('dojo.cookie');
+ dojo.cookie(COOKIE_SEARCH, js2JSON(result.compiled_search));
+ _rresultHandleIds( ids, result.count );
+}
+
+
+function rresultHandlePlaceHold(target) {
+ function reload() {
+ location.href = location.href.replace(/&hold_target=\d+/, '');
+ }
+ attachEvt("common", "holdUpdated", reload);
+ attachEvt("common", "holdUpdateCanceled", reload);
+ attachEvt("common", "loginCanceled", reload);
+ holdsDrawEditor({record:target, type: 'T'});
+}
+
--- /dev/null
+<!--
+<tr id='adv_global_trow' type='input'>
+-->
+<tr id='<!--#echo var="adv_global_row_id"-->' type='input'>
+ <td align='center' width='100%' nowrap='nowrap'>
+
+ <!-- select the search class -->
+ <select name='type' style='margin-right: 7px;'>
+ <option value='keyword' selected='selected'>&common.keyword;</option>
+ <option value='title'>&common.title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='subject'>&common.subject;</option>
+ <option value='series'>&common.series;</option>
+ </select>
+
+ <!-- select how to treat the text -->
+ <select name='contains' style='margin-right: 7px;'>
+ <option value='contains'>&opac.advanced.refined.contains;</option>
+ <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
+ <option value='exact'>&opac.advanced.refined.exact;</option>
+ </select>
+
+ <!-- search term -->
+ <input type='text' size='18' name='term' style='margin-right: 3px;' />
+
+ <!-- Remove this row -->
+ <button
+ onclick='
+ var row = this.parentNode.parentNode;
+ var tbody = row.parentNode;
+ if( tbody.getElementsByTagName("tr").length > 2 )
+ row.parentNode.removeChild(row);'>X</button>
+
+ </td>
+</tr>
+
--- /dev/null
+<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
+
+ <style type="text/css">
+ #adv_global_search select { width: 13em; }
+ #adv_global_input_table select { width: 7em; }
+ .adv_adv_link { font-size: 8pt; color: red; }
+ </style>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/adv_global.js'> </script>
+
+ <tr style='border-bottom: none;'>
+
+ <!-- Contains the user-addable(?) rows to define search class, containment and text -->
+ <td valign='top' width='65%' style='border-bottom: none;'>
+ <table width='100%' id='adv_global_input_table'>
+
+ <thead>
+ <tr><td colspan='2' align='center'>&advanced.search.title;</td></tr>
+ </thead>
+ <tbody id='adv_global_tbody'>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+ <!--#set var="adv_global_row_id" value="adv_global_trow"-->
+ <!--#include virtual="adv_global_row.xml"-->
+
+ <!--#set var="adv_global_row_id" value=""-->
+ <!--#include virtual="adv_global_row.xml"-->
+ <!--#include virtual="adv_global_row.xml"-->
+
+ <!-- add a new row -->
+ <tr id='adv_global_addrow'>
+ <td align='center'>
+ <button onclick='clearSearchBoxes();'>&advanced.search.reset;</button>
+ <span style='padding-left: 10px;'> </span>
+ <button id='myopac_new_global_row' onclick='advAddGblRow();'>&advanced.add.row;</button>
+ <span style='padding-left: 10px;'> </span>
+ <button onclick='advSubmitGlobal();'>&advanced.search.submit;</button>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </td>
+
+
+ <td rowspan='2'>
+
+ <table width='100%'>
+ <thead>
+ <tr><td colspan='2' align='center'>&advanced.search.filters;</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.item.form;</span>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_item_form'>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.item.type;</span>
+ <a id='adv_global_item_type_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_item_type_basic"));
+ unHideMe($("adv_global_item_type"));
+ hideMe(this);
+ unHideMe($("adv_global_item_type_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_item_type_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_item_type_basic"));
+ hideMe($("adv_global_item_type"));
+ unHideMe($("adv_global_item_type_link_adv"));
+ hideMe(this);
+ '>&advanced.basic.link;</a>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_item_type_basic'>
+ <option value='at'>&opac.search.books;</option>
+ <option value='i'>&opac.search.audioBooks;</option>
+ <option value='g'>&opac.search.videoRecordings;</option>
+ <option value='j'>&opac.search.music;</option>
+ <option value='m'>&opac.search.electronic;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.literary.form;</span>
+ <a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_lit_form_basic"));
+ unHideMe($("adv_global_lit_form"));
+ hideMe(this);
+ unHideMe($("adv_global_lit_form_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_lit_form_basic"));
+ hideMe($("adv_global_lit_form"));
+ unHideMe($("adv_global_lit_form_link_adv"));
+ hideMe(this);
+ '>&advanced.basic.link;</a>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
+ <option value='0 '>&advanced.non.fiction;</option>
+ <option value='1'>&advanced.fiction;</option>
+ </select>
+ </td>
+ </tr>
+
+
+ <!-- Language selector -->
+ <tr>
+ <td align='right'>
+ <span>&advanced.language;</span>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_lang'>
+ <!--#include virtual="../../../../../common/xml/item_lang_options.xml"-->
+ </select>
+ </td>
+ </tr>
+
+ <!-- Audience selector -->
+ <tr>
+ <td align='right'>
+ <span>&advanced.audience;</span>
+
+ <a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_audience_basic"));
+ unHideMe($("adv_global_audience"));
+ hideMe(this);
+ unHideMe($("adv_global_audience_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_audience_basic"));
+ hideMe($("adv_global_audience"));
+ unHideMe($("adv_global_audience_link_adv"));
+ hideMe(this);'>&advanced.basic.link;</a>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_audience_basic'>
+ <option value='e '>&advanced.adult;</option>
+ <option value='abcdj'>&advanced.juvenile;</option>
+ <option value='fg '>&advanced.general;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.biblevel;</span>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_bib_level'>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.filter.pubyear;</span>
+ </td>
+ <td align='left'>
+ <select id='adv_global_pub_date_type' onchange='
+ if($("adv_global_pub_date_type").selectedIndex == 3)
+ unHideMe($("adv_global_pub_date_2_span"));
+ else
+ hideMe($("adv_global_pub_date_2_span"));'>
+ <option value='equals' selected='selected'>&advanced.filter.pubyear.equals;</option>
+ <option value='before'>&advanced.filter.pubyear.before;</option>
+ <option value='after'>&advanced.filter.pubyear.after;</option>
+ <option value='between'>&advanced.filter.pubyear.between;</option>
+ </select>
+ <div style='margin-top:5px;'>
+ <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
+ <span id='adv_global_pub_date_2_span' class='hide_me'>
+ &common.and; <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+ </span>
+ </div>
+ </td>
+ </tr>
+
+
+ <!-- copy location selector -->
+ <tr id='adv_copy_location_filter_row' class='hide_me'>
+ <td align='right'>&opac.advanced.copy_loc_filter;</td>
+ <td align='left' id='adv_copy_location_filter_td'>
+ <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+ </select>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr style='border-top: none;'>
+ <td align='center' valign='top' style='border-top: none;'>
+
+ <table style='border: none; width: 100%;'>
+ <tr>
+ <td align='center' width='100%'>
+ <table class='' width='100%'>
+
+ <thead>
+ <tr>
+ <td align='center' width='50%'>&advanced.sort.criteria;</td>
+ <td align='center'>&advanced.search.library;</td>
+ </tr>
+ </thead>
+
+ <tbody>
+ <tr>
+
+ <script language='javascript' type='text/javascript'>
+ function __setsortsel() {
+ var sel = $('adv_global_sort_by')
+ if(sel.selectedIndex == 0) {
+ $("adv_global_sort_dir").disabled = true;
+ $("adv_global_sort_dir").selectedIndex = 0;
+ } else $("adv_global_sort_dir").disabled = false;
+ }
+ </script>
+
+ <td align=''>
+ <select id='adv_global_sort_by' onchange='__setsortsel();'>
+ <option value='rel'>&advanced.relevance;</option>
+ <option value='titlesort'>&common.title;</option>
+ <option value='authorsort'>&common.author;</option>
+ <option value='pubdate'>&advanced.pubdate;</option>
+ </select>
+ </td>
+
+
+ <td align='center' width='100%' nowrap='nowrap'>
+ <b id='now_searching_location'> </b>
+ </td>
+
+ </tr>
+
+ <tr>
+
+ <td>
+ <select id='adv_global_sort_dir' disabled='disabled'>
+ <option value='asc'>&advanced.sort.asc;</option>
+ <option value='desc'>&advanced.sort.desc;</option>
+ </select>
+ </td>
+
+ <!-- force the enable/disable sort dir code to run -->
+ <script language='javascript' type='text/javascript'>__setsortsel();</script>
+
+ <td align='center'>
+ <!--#include virtual="../common/libselect.xml"-->
+ </td>
+
+ </tr>
+ <tr>
+ <td align='center'>
+ <span>&advanced.frbrize;</span>
+ <input id='adv_group_titles' type='checkbox' />
+ </td>
+ <td align='center'>
+ <span>&result.limit2avail;</span>
+ <input type='checkbox' id='opac.result.limit2avail'/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+ <tr class='border_4_2'>
+ <td colspan='2'><input type='submit' onclick='advSubmitGlobal();' value='&advanced.search.submit;'></input></td>
+ </tr>
+
+</table>
+
+
--- /dev/null
+<!--
+XXX Deprecate me
+-->
+
+<table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td colspan='6'>&opac.advanced.marc.title;</td>
+ </tr>
+ </thead>
+ <tbody id='advanced.marc.tbody'>
+ <tr id='advanced.marc.template'>
+ <td>
+ <span>&opac.advanced.marc.tag;: </span>
+ <input name='advanced.marc.tag' maxlength='3' size='3' />
+ </td>
+ <td>
+ <span>&opac.advanced.marc.subfield;: </span>
+ <input name='advanced.marc.subfield' maxlength='1' size='1' />
+ </td>
+ <td>
+ <span>&opac.advanced.marc.value;: </span>
+ <input name='advanced.marc.value' size='36' />
+ </td>
+
+ <td>
+ <input type='submit' value='X' onclick='
+ var row = this.parentNode.parentNode;
+ var tbody = row.parentNode;
+ if(tbody.getElementsByTagName("tr").length > 2)
+ tbody.removeChild(row);
+ ' />
+ </td>
+ </tr>
+ <tr id='advanced.marc.submit.row'>
+ <td colspan='4' align='center'>
+
+ <input name='advanced.marc.addrow' type='submit' onclick='advAddMARC();'
+ value='&opac.advanced.marc.addrow;' />
+
+ <input style='margin-left: 10px;'
+ onclick='advMARCRun();' type='submit' value='&common.submit;' />
+ </td>
+ </tr>
+ </tbody>
+</table>
--- /dev/null
+<!--
+XXX Deprecate me
+-->
+
+<table class='data_grid' width='95%'>
+ <thead>
+ <tr>
+ <td colspan='6'>&opac.advanced.quick.title;</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span style='padding-right: 0px;'>&common.call.number.label;</span>
+ <input id='opac.advanced.quick.cn' style='margin: 2px;' type='text' size='12' />
+ <input type='submit' onclick='advCNRun();' value='&advanced.go;' />
+ </td>
+ <td>
+ <span style='padding-right: 0px;'>&common.isbn.label;</span>
+ <input id='opac.advanced.quick.isbn' style='margin: 2px;' type='text' size='13' maxlength='13' />
+ <input type='submit' onclick='advISBNRun();' value='&advanced.go;' />
+ </td>
+ <td>
+ <span style='padding-right: 0px;'>&common.issn.label;</span>
+ <input id='opac.advanced.quick.issn' style='margin: 2px;' type='text' size='9' maxlength='9' />
+ <input type='submit' onclick='advISSNRun();' value='&advanced.go;' />
+ </td>
+ </tr>
+ </tbody>
+</table>
--- /dev/null
+<body class="tundra">
+ <table width='100%'>
+ <tbody>
+ <tr>
+ <td id='main_left_cell'>
+ <!--#include virtual="common/logo.xml"-->
+ <!--#include virtual="common/sidebar.xml"-->
+ </td>
+ <td id='main_right_cell'>
+ <div id='content' class=''>
+
+ <!--#if expr="$OILS_PAGE!='advanced.xml'"-->
+ <!--#include virtual="common/searchbar.xml"-->
+ <!--#include virtual="common/statusbar.xml"-->
+ <!--#endif-->
+
+ <!--#include virtual="common/fonts.xml"-->
+
+ <!--#include virtual="common/altcanvas.xml"-->
+ <!--#include virtual="common/ilsevents.xml"-->
+ <!--#include virtual="page_${OILS_PAGE}"-->
+ </div>
+ <br/>
+ <!--#include virtual="common/tips.xml"-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!--#include virtual='footer.xml'-->
+
+ <script language="javascript" type="text/javascript">
+ dojo.addOnLoad(init);
+ dojo.require("dijit._Calendar");
+ dojo.require("dijit.form.DateTextBox");
+ dojo.require("dijit.form.FilteringSelect");
+ dojo.require("dojo.date.locale");
+ dojo.require("dojo.date.stamp");
+ dojo.require("dojo.parser");
+ dojo.require("openils.widget.FacetSidebar"); // pulls in Searcher and I18N
+ </script>
+
+</body>
--- /dev/null
+
+<!-- These are the UI components that may be needed on any given page. The must be
+ set to class += 'hide_me' by default -->
+
+<div id='not_the_canvas' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <!-- the login page -->
+ <!--#if expr="$FRONT_PAGE!='true'"-->
+ <!--#include virtual="login.xml"-->
+ <!--#endif-->
+
+ <!-- The org tree -->
+ <!--#include virtual="orgtree.xml"-->
+
+ <!-- ============================================================================= -->
+ <!-- Register the alternate canvases -->
+ <script language='javascript' type='text/javascript'>
+ config.ids.altcanvas.org_tree = config.ids.common.org_container;
+ config.ids.altcanvas.holds = 'holds_box';
+ config.ids.altcanvas.check_holds = 'check_holds_box';
+ config.ids.altcanvas.xulholds = 'xulholds_box';
+ config.ids.altcanvas.loading = 'loading_alt';
+ //config.ids.altcanvas.cnbrowse = 'cn_browse';
+ </script>
+
+ <!--#if expr="$FRONT_PAGE!='true'"-->
+ <!--#include virtual="holds.xml"-->
+ <!-- #include virtual="cn_browse.xml"-->
+ <!--#endif-->
+
+ <div id='loading_alt' class='hide_me canvas' style='margin-top: 6px;'>
+ <div style='margin-top: 30px; margin-bottom: 30px; text-align: center; font-weight: 700;' class='color_3'>
+ <img src='../../../../images/progressbar_green.gif' style='margin: 5px; height: 32px; width: 32px;' />
+ </div>
+ </div>
+
+</div>
--- /dev/null
+<div id='cn_browse' class='hide_me cn_browser'
+ style='width: 95%; text-align: center; padding: 15px;'>
+ <div id='cn_browse_loading' class='cn_browse_loading hide_me'>&common.cn.loading;</div>
+ <div id='cn_browse_div'>
+
+
+ <div style='width: 90%; text-align: center; margin: 10px;' class='color_4'>
+ <span>&common.cn.browsing;</span><b style='margin-left: 6px;' id='cn_browse_where'> </b>
+ </div>
+ <table class='data_grid bookshelf' width='100%'>
+ <thead>
+ <tr>
+ <td><a id='cn_browse_next' class='classic_link'
+ href='javascript:cnBrowsePrev();'><b>&common.cn.previous;</b></a></td>
+ <td colspan='1' align='center'>&common.cn.shelf;</td>
+ <td><a id='cn_browse_prev' class='classic_link'
+ href='javascript:cnBrowseNext();'><b>&common.cn.next;</b></a></td>
+ </tr>
+ </thead>
+ <tbody id='cn_tbody'>
+ <tr id='cn_browse_row'>
+ <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
+ <a><img height='60' width='50'
+ class='cn_browse_info' name='cn_browse_pic' border='0' /></a>
+ <div style='font-weight: bold;' class='cn_browse_info' name='cn_browse_cn'> </div>
+ <div class='cn_browse_info'><a name='cn_browse_title' class='classic_link'> </a></div>
+ <div class='cn_browse_info'><a name='cn_browse_author' class='classic_link'> </a></div>
+ <div class='cn_browse_info' name='cn_browse_lib'> </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
--- /dev/null
+<!-- CSS shared across pages goes here -->
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/default/css/layout.css"/>
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/tadlv2/css/tadl_layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/default/css/colors.css" />
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_SKIN_BASE'-->/tadlv2/css/tadl_colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+ rel='search' title="Evergreen"
+ href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/-/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+ @import '/js/dojo/dojo/resources/dojo.css';
+ @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
--- /dev/null
+<div id='fonts_div'>
+
+ <div id='text_size_div' style='position:absolute; top: 2px; right: 6px;'>
+ <span style='vertical-align: top;'>&common.textsize.title;</span>
+ <span style='vertical-align: top;'><a href="javascript:void(0);" onclick="setFontSize('regular');"> &common.textsize.regular; </a></span>
+ <span style='vertical-align: top;'> &common.textsize.separator; </span>
+ <span style='vertical-align: top;'><a href="javascript:void(0);" onclick="setFontSize('large');"> &common.textsize.large; </a></span>
+ <span style='vertical-align: top;'> <span style="font-weight:bold;">|</span> </span>
+ <span style='vertical-align: top;'>&common.language;</span>
+ <span id='translation_switch' dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore"
+ searchAttr="label" required="false" jsId='opacLocaleSelector'>
+ <script type="text/javascript">
+ dojo.addOnLoad(function() {
+ opacLocaleSelector.setValue(locale);
+ dojo.connect(opacLocaleSelector, 'onChange',
+ function () {
+ location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+ }
+ );
+ });
+ </script>
+ </span>
+ </div>
+
+</div>
--- /dev/null
+<select id='<!--#echo var="FORM_SEL_ID"-->' >
+ <option value=''>&opac.search.allFormats;</option>
+ <option value='at'>&opac.search.books;</option>
+ <option value='at-d'>&opac.search.largePrint;</option>
+ <option value='at-s'>&opac.search.ebook;</option>
+ <option value='i'>&opac.search.audioBooks;</option>
+ <option value='g'>&opac.search.videoRecordings;</option>
+ <option value='j'>&opac.search.music;</option>
+ <option value='m'>&opac.search.electronic;</option>
+</select>
+
--- /dev/null
+<div>
+ <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
+ <center>
+ <table class='data_grid' style='margin-top: 20px;'>
+ <tbody>
+ <tr>
+ <td>&opac.holds.xulRecipient;:</td>
+ <td><input type='text' id='xul_recipient_barcode' /></td>
+ <td><input type='submit' value='&common.submit;' id='xul_recipient_barcode_submit' /></td>
+ <td><input type='submit' value='&common.cancel;' onclick='showCanvas();' /></td>
+ <td><input type='submit' value='&common.hold.place;' id='xul_recipient_me' /></td>
+ </tr>
+ </tbody>
+ </table>
+ </center>
+ </div>
+
+ <div id='check_holds_box' class='hide_me canvas'
+ style='margin-top: 6px; width: 100%; text-align: center'>
+ <br/><br/><br/>
+ <b>&common.hold.check;</b>
+ </div>
+
+ <div id='holds_box' class='hide_me canvas' style='margin-top: 6px;'>
+
+ <br/>
+ <table width='90%'>
+ <tbody>
+ <tr>
+ <td class='holds_cell color_1'
+ align='center' colspan='2'>&common.hold.create;</td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&opac.holds.recipient;:</td>
+ <td class='holds_cell' id='holds_recipient'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.title.label;</td>
+ <td class='holds_cell' id='holds_title'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.author;</td>
+ <td class='holds_cell' id='holds_author'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.format;</td>
+ <td class='holds_cell' id='holds_format'> </td>
+ </tr>
+ <tr id='hold_physical_desc_row'>
+ <td class='holds_cell'>&common.physical.label;</td>
+ <td class='holds_cell' id='holds_physical_desc'> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_parts_row'>
+ <td class='holds_cell'>&common.mono_parts.label;</td>
+ <td class='holds_cell'>
+ <span class='hide_me' id='holds_parts_label'></span>
+ <select id='holds_parts_selector' class='hide_me'>
+ <option value=''></option>
+ </select>
+ </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_cn_row'>
+ <td class='holds_cell'>&common.call.number.label;</td>
+ <td class='holds_cell'><b id='holds_cn'/> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_copy_row'>
+ <td class='holds_cell'>&common.copy.barcode.label;</td>
+ <td class='holds_cell'><b id='holds_copy'/> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_issuance_row'>
+ <td class='holds_cell'>&common.issuance_label.label;</td>
+ <td class='holds_cell'><b id='holds_issuance_label'/> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_type_row'>
+ <td class='holds_cell'>&common.hold.type.label;</td>
+ <td class='holds_cell hide_me' id='holds_is_cn'><b>&common.hold.volume;</b></td>
+ <td class='holds_cell hide_me' id='holds_is_copy'><b>&common.hold.copy;</b></td>
+ <td class='holds_cell hide_me' id='holds_is_issuance'><b>&common.hold.issuance;</b></td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.contactPhone;:</td>
+ <td class='holds_cell'>
+ <input id='holds_phone' size='13' maxlength='12'/>
+ <span style='margin-left: 4px; font-size: 7pt;'>&common.phone.format;</span>
+ </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.phone.enable;</td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_enable_phone' checked='checked'
+ onchange='
+ if (this.checked) $("holds_phone").disabled=false;
+ else $("holds_phone").disabled = true;'/>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.contactEmail;:</td>
+ <td class='holds_cell' id='holds_email'>
+ <span class='hide_me' id='holds.no_email'>
+ &common.email.none;<br/>
+ &common.email.set;
+ </span>
+ <span class='hide_me' id='holds.no_email.xul'>
+ &common.email.none;
+ </span>
+
+ </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.email.enable;</td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_enable_email' checked='checked'/>
+ </td>
+ </tr>
+ <!--
+ <tr id='holds_depth_selector_row' class='hide_me'>
+ <td class='holds_cell'>Hold Range</td>
+ <td class='holds_cell'>
+ <select id='holds_depth_selector'></select>
+ </td>
+ </tr>
+ -->
+ <tr>
+ <td class='holds_cell'>&opac.holds.pickupLocation;</td>
+ <td class='holds_cell'>
+ <select id='holds_org_selector'> </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.expire_time;</td>
+ <td class='holds_cell'>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' id='holds_expire_time' />
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>
+ &opac.holds.freeze;
+ <a class='classic_link' href='javascript:alert("&opac.holds.freeze.help;");'>&common.help;</a>
+ </td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_frozen_chkbox'
+ onchange='
+ if($("holds_frozen_chkbox").checked)
+ unHideMe($("hold_frozen_thaw_row"));
+ else
+ hideMe($("hold_frozen_thaw_row"));
+ ' />
+ </td>
+ </tr>
+
+ <tr id='hold_frozen_thaw_row' class='hide_me'>
+ <td class='holds_cell'>
+ <script language='javascript' type='text/javascript'> if($('holds_frozen_chkbox').checked) unHideMe($("hold_frozen_thaw_row"));</script>
+ &opac.holds.freeze.thaw_date;
+ </td>
+ <td class='holds_cell'>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' id='holds_frozen_thaw_input' />
+ </td>
+ </tr>
+
+ <tr id='holds_alt_formats_row_extras' class='hide_me'>
+ <td colspan='2' align='center'>
+ <div style='padding: 8px;'>
+ <a class='classic_link' href='javascript:void(0);' style='padding: 5px;'
+ onclick='unHideMe($("holds_alt_formats_row"));'>&common.hold.advanced;</a>
+ </div>
+ </td>
+ </tr>
+
+ <tr id='holds_alt_formats_row' class='hide_me'>
+
+ <td class='holds_cell'>
+ <div style='margin-bottom: 5px;'>
+ <span>&common.format.alternatives; </span>
+ <span> <a class='classic_link' style='color:red;' href='javascript:void(0);'
+ onclick='alert($("holds_explain_adv").innerHTML)'>&common.help;</a></span>
+ </div>
+ <div>&common.control.click;</div>
+ </td>
+
+ <td class='holds_cell'>
+ <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
+ <option value='at' class='hide_me'>&opac.search.books;</option>
+ <option value='at-d' class='hide_me'>&opac.search.largePrint;</option>
+ <option value='at-s' class='hide_me'>&opac.search.ebook;</option>
+ <option value='i' class='hide_me'>&opac.search.audioBooks;</option>
+ <option value='g' class='hide_me'>&opac.search.videoRecordings;</option>
+ <option value='j' class='hide_me'>&opac.search.music;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell' align='center' colspan='2'>
+ <button id='holds_submit'>&opac.holds.placeHold;</button>
+ <button class='hide_me' id='holds_update'>&common.hold.update;</button>
+ <span style='padding: 20px;'> </span>
+ <button id='holds_cancel'>&common.cancel;</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='holds_success'>&opac.holds.success;</div>
+ <div class='hide_me' id='holds_failure'>&opac.holds.failure;</div>
+ <span class='hide_me' id='holds_bad_phone'>
+ &common.phone.format.help;
+ </span>
+
+ <span class='hide_me' id='hold_not_allowed'>
+ &common.hold.failed;
+ </span>
+ <span class='hide_me' id='hold_has_parts'>&opac.hold.has_parts;</span>
+
+ </div>
+
+ <span class='hide_me' id='format_words'>
+ <span name='at'>&opac.search.books;</span>
+ <span name='at-d'>&opac.search.largePrint;</span>
+ <span name='i'>&opac.search.audioBooks;</span>
+ <span name='g'>&opac.search.videoRecordings;</span>
+ <span name='j'>&opac.search.music;</span>
+ <span name='m'>&opac.search.electronic;</span>
+ </span>
+
+ <span class='hide_me' id='holds_explain_adv'>&holds.advanced_options;</span>
+
+ <span class='hide_me' id='holds_pick_good_org'>&common.hold.delivery;</span>
+
+ <span class='hide_me' id='hold_dup_exists'>&common.hold.exists;</span>
+ <span class='hide_me' id='hold_checked_out'>&common.hold.checked_out;</span>
+
+ <span class='hide_me' id='hold_dup_exists_override'>&common.hold.exists.override;</span>
+ <span class='hide_me' id='hold_checked_out_override'>&common.hold.checked_out.override;</span>
+
+ <span id='hold_failed_patron_barred' class='hide_me'>&common.hold.barred;</span>
+
+ <span id='invalid_hold' class='hide_me'>&common.hold.item.invalid;</span>
+
+ <span id='holds_invalid_recipient' class='hide_me'>&common.hold.patron.invalid;</span>
+
+</div>
--- /dev/null
+<span class='hide_me'>
+ <span id='ilsevent.1000'>&ilsevent.1000;</span>
+ <span id='ilsevent.1001'>&ilsevent.1001;</span>
+ <span id='ilsevent.1002'>&ilsevent.1002;</span>
+ <span id='ilsevent.1200'>&ilsevent.1200;</span>
+ <span id='ilsevent.5000'>&ilsevent.5000;</span>
+ <span id='ilsperm.CREATE_HOLD'>&ilsperm.CREATE_HOLD;</span>
+
+ <!-- Local OPAC Specific strings/events -->
+ <span id='auth_session_expiring'>&opac.session_expiring;</span>
+ <span id='auth_session_expired'>&opac.session_expired;</span>
+ <span id='user_not_found'>&common.user_not_found;</span>
+</span>
+
--- /dev/null
+<!--#if expr="$OILS_PAGE='myopac.xml'"-->
+<!-- my acccount uses a lot more classes -->
+<script language='javascript'
+ src='/IDL2js?mvr,bre,aou,aout,pgt,lasso,cmf,cmc,cmsa,cam,cifm,clfm,citm,cblvl,ccs,accs,au,ahr,ahrn,acn,actscecm,cbreb,cbreb,cbrebi,acp,cust,ac,aua,mous,circ,mbts,mb,ausp,csp'
+ type='text/javascript'></script>
+<!--#else-->
+<script language='javascript'
+ src='/IDL2js?mvr,bre,aou,aout,pgt,lasso,cmf,cmc,cmsa,cam,cifm,clfm,citm,cblvl,ccs'
+ type='text/javascript'></script>
+<!--#endif-->
+
+<script language='javascript' type="text/javascript">
+ var locale = location.href.replace( /.+opac\/([^\/]+)\/skin.+/, '$1' );
+ if (!locale) locale = '<!--#echo var="locale"-->';
+ var djConfig = {
+ locale: locale.toLowerCase(),
+ parseOnLoad: true,
+ isDebug: false
+ }, lang, bidi;
+</script>
+
+<script language='javascript' src='/js/dojo/dojo/dojo.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/JSON_v1.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type="text/javascript" src='/js/dojo/opensrf/opensrf.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type="text/javascript" src='/js/dojo/dojo/openils_dojo.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type="text/javascript" src='/js/dojo/fieldmapper/AutoIDL.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+
+<script language='javascript' type="text/javascript" src='<!--#echo var="OILS_JS_BASE"-->/<!--#echo var="locale"-->/OrgTree.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type="text/javascript" src='<!--#echo var="OILS_JS_BASE"-->/<!--#echo var="locale"-->/FacetDefs.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<script language='javascript' type="text/javascript" src='<!--#echo var="OILS_JS_BASE"-->/OrgLasso.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+
+<!--#if expr="$OILS_OPAC_COMBINED_JS"-->
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/combined.js?<!--#include virtual="/eg_cache_hash"-->'></script>
+<!--#else -->
+<!--
+ When combined JS is enabled in the Apache config, the block
+ below defines which files are added to the final combined JS file.
+ Currently, only files in $OPAC/common/js/ are eligible for automatic combination.
+-->
+<!--START COMPRESSION-->
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/utils.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/config.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/CGI.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/md5.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/slimtree.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/opac_utils.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/org_utils.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/RemoteRequest.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/init.js'></script>
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_JS_BASE"-->/added_content.js'></script>
+<!--END COMPRESSION-->
+<!--#endif -->
+
+<!-- Some global js -->
+<script language='javascript' type='text/javascript'>
+ config.css.color_1 = "color_1";
+ config.css.color_2 = "color_2";
+ config.css.color_3 = "color_3";
+ <!-- set up some global JS config variables, read from the Apache config -->
+ var OILS_OPAC_IMAGES_HOST = null;
+ <!--#if expr="$OILS_OPAC_IMAGES_HOST"-->
+ OILS_OPAC_IMAGES_HOST = '<!--#echo var="OILS_OPAC_IMAGES_HOST"-->extras/ac/jacket/';
+ <!--#endif -->
+ var OILS_OPAC_STATIC_PROTOCOL = null;
+ <!--#if expr="$OILS_OPAC_STATIC_PROTOCOL"-->
+ OILS_OPAC_STATIC_PROTOCOL = '<!--#echo var="OILS_OPAC_STATIC_PROTOCOL"-->';
+ <!--#endif -->
+ <!-- builds the "Now searching: <org_unit>" text on the home page -->
+ function home_init() {
+ getId("home_adv_search_link").setAttribute("href", buildOPACLink({page:ADVANCED}));
+ getId("home_myopac_link").setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));
+ }
+ <!--#if expr="$OILS_OPAC_FORCE_LOGIN_SSL"-->
+ forceLoginSSL = true;
+ <!--#endif -->
+</script>
--- /dev/null
+<span>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js'></script>
+ <span class='hide_me' id='depth_selector_span'>
+ <!--#if expr="$SHOW_DEPTHSEL_TEXT='true'"-->
+ <span>&library.select; </span>
+ <!--#endif-->
+ <select id='depth_selector' >
+ <option value='new'>&library.select.label;</option>
+ </select>
+ </span>
+ <span class='hide_me' id='lib_selector_span'>
+ <a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
+ </span>
+</span>
+
--- /dev/null
+
+<div id='login_box' class='hide_me canvas' style='margin-top: 6px;'>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.login = {};
+ config.css.login = {};
+ config.ids.login.form = "login_form";
+ config.ids.login.box = "login_box";
+ config.ids.login.tbody = "login_tbody";
+ config.ids.login.username = "login_username";
+ config.ids.login.password = "login_password";
+ config.ids.login.button = "login_button";
+ config.ids.login.cancel = "login_cancel_button";
+ config.ids.altcanvas.login = config.ids.login.box;
+ </script>
+ <script type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/password_reset.js'></script>
+
+ <br/>
+
+ <div class='login_text color_1' style='padding: 4px; text-align: center;'>
+ <span>&opac.login.login;</span>
+ </div>
+
+ <br/>
+
+ <form id='login_form' method='POST' action='javascript:loginDance();'>
+ <table id='login_table' class='data_grid' style='margin-left: 20px;' width='95%'>
+ <tbody id='login_tbody'>
+ <tr>
+ <td><span class='login_text'>&login.username;</span></td>
+ <td>
+ <span class='login_text'>
+ <input id='login_username' name='login_username' type='text' size='16'></input>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class='login_text'>&common.password;</span>
+ </td>
+ <td>
+ <span class='login_text'>
+ <input id='login_password' name='login_password' type='password' size='16'></input>
+ </span>
+ </td>
+ </tr>
+ <tr><td><br/></td><td/></tr>
+ <tr class='color_1'>
+ <td colspan='2' align='center'>
+ <span class='login_text' style='margin-right: 20px;'>
+ <input type='submit' value='&common.login;' name='login_button' id='login_button'></input>
+ </span>
+ <span class='login_text' style='margin-left: 20px;'>
+ <input type='submit' name='login_cancel_button' id='login_cancel_button' value='&common.cancel;'></input>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+
+ <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+ <thead>
+ <tr><td colspan='2' align='center'><b>&login.password;</b></td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td colspan='2' style='padding:10px;'>
+ &login.first.time;
+ &common.password_criteria;
+ </td>
+ </tr>
+
+ <tr>
+ <td>&login.password.current.enter;</td>
+ <td><input type='password' id='change_pw_current'/></td>
+ </tr>
+
+ <tr>
+ <td>&login.password.new.enter;</td>
+ <td><input type='password' id='change_pw_1'/></td>
+ </tr>
+ <tr>
+ <td>&login.password.new.reenter;</td>
+ <td><input type='password' id='change_pw_2'/></td>
+ </tr>
+ <tr><td><br/></td><td/></tr>
+ <tr class='color_1'>
+ <td colspan='2' align='center'>
+ <span class='login_text' style='margin-right: 20px;'>
+ <input type='submit' value='&login.password.update;' id='change_pw_button'/>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <span id='pw_no_match' class='hide_me'>&login.password.nomatch;</span>
+ <span id='pw_update_successful' class='hide_me'>&login.password.success;</span>
+
+ <span id='pw_not_strong' class='hide_me'>
+ &login.password.strength;
+ &common.password_criteria;
+ </span>
+
+ <span id='patron_card_inactive_alert' class='hide_me'>&login.barcode.inactive;</span>
+
+ <span id='patron_inactive_alert' class='hide_me'>&login.account.inactive;</span>
+
+ <span id='patron_login_failed' class='hide_me'>&login.failed;</span>
+
+</div>
+
+
--- /dev/null
+<div id='logo_div'>
+ <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+ <img style='margin-right: 4px; height: 102px; width: 250px;' src='<!--#echo var="OILS_BASE"-->/images/tadl/tadl_logo.png' id='top_left_logo' border='0' class='logo' />
+</div>
--- /dev/null
+
+<!-- the org tree -->
+<div id='org_container' class='hide_me canvas'>
+
+ <div id='org_link_container' class='color_1'>
+ <span class='org_link'>
+ <a onclick='orgTreeSelector.expandAll();'
+ href='javascript:void(0);'>&common.org.openAll;</a>
+ </span>
+ <span class='org_link'>
+ <a onclick='orgTreeSelector.closeAll();'
+ href='javascript:void(0);'>&common.org.closeAll;</a>
+ </span>
+ <span class='org_link'>
+ <a onclick='showCanvas();' href='javascript:void(0);'>&common.org.cancel;</a>
+ </span>
+ </div>
+
+ <div id='org_loading_div'><br/><span>&common.org.loading;</span></div>
+ <br/>
+ <div id='org_selector_tip' class='tips hide_me'><b>&common.org.note;</b>
+ <span>&common.org.notetext;</span>
+ </div>
+ <br/>
+ <div id='org_tree' class='org_tree'> </div>
+ <br/>
+</div>
--- /dev/null
+
+<!-- Searchbar for doing metarecord searches -->
+
+<div id='searchbar' dojoType="openils.widget.Searcher" basicTextBox='search_box'>
+ <script type='dojo/method' event='performSearch'>
+ this.compileFullSearch();
+ dojo.byId(this.basicTextBox).value = this.basic_query;
+ dojo.byId(this.facetTextBox).value += this.facet_query;
+ dojo.byId('search_submit').click();
+ </script>
+ <script type='dojo/method' event='populate'><![CDATA[
+ var searcher = this;
+ attachEvt("result", "allRecordsReceived", function () {
+ if(!resultCompiledSearch) {
+ return;
+ }
+
+ var all_search = dojo.query( '.classedSearch', searcher.classedSearches );
+ if (all_search.length > 1) {
+ for (var i = 1; i < all_search.length; i++) {
+ dojo.destroy(all_search[i]);
+ }
+ }
+
+ var csearch = dijit.byNode(dojo.query( '.classedSearch', searcher.classedSearches )[0]);
+
+ for (var type in resultCompiledSearch.searches) {
+ csearch.matchIndex.attr('value',type);
+ csearch.searchValue.attr('value',resultCompiledSearch.searches[type].term);
+ csearch = searcher.addClassAnd();
+ }
+ });
+ ]]></script>
+
+
+ <!-- load my js -->
+ <script language='javascript' type='text/javascript'>
+ config.ids.searchbar = {};
+ config.css.searchbar = {};
+ config.ids.searchbar.text = 'search_box';
+ config.ids.searchbar.facets = 'facet_box';
+ config.ids.searchbar.submit = 'search_submit';
+ config.ids.searchbar.type_selector = 'search_type_selector';
+ config.ids.searchbar.depth_selector = 'depth_selector';
+ config.ids.searchbar.form_selector = 'form_selector';
+ config.ids.searchbar.extra_row = 'searchbar_extra';
+ config.ids.searchbar.main_row = 'searchbar_main_row';
+ config.ids.searchbar.table = 'searchbar_table';
+ config.ids.searchbar.location_tag = 'search_location_tag_link';
+ config.ids.searchbar.lib_sel_span = 'lib_selector_span';
+ config.ids.searchbar.lib_sel_link = 'lib_selector_link';
+ config.ids.searchbar.depth_sel_span = 'depth_selector_span';
+ </script>
+
+
+ <table class='color_1 color_border1' width='100%' style='border-collapse: collapse;'>
+ <tbody>
+ <tr>
+
+ <td nowrap='nowrap' align='center' class='search_box_container color_2'>
+
+ <input id='search_box' type='text' onkeyup='dojo.byId("facet_box").value = "";'/>
+ <input id='facet_box' type='hidden' />
+ <span style='padding-left: 6px;'>
+ <input type='button' style='width: 40px;' id='search_submit' value='&button.go;' />
+ </span>
+ </td>
+
+ <td nowrap='nowrap' style='padding: 3px;' align='right' >
+
+ <span style='padding-right:9px;'>
+ <!--
+ <span>&common.type;: </span>
+ -->
+ <!--#include virtual="stypes_selector.xml"-->
+ </span>
+
+ <span style='padding-right:9px;'>
+ <!--#set var='FORM_SEL_ID' value='form_selector'-->
+ <!--#include virtual="format_selector.xml"-->
+ </span>
+
+ <!--#include virtual="libselect.xml"-->
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js'></script>
+</div>
+
+
+
+
+
+
--- /dev/null
+
+<!-- Navigation bar -->
+
+<div id="sidebar_div" class="sidebar_div" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <div class='sidebar_chunk'>
+
+ <div title="&navigate.home.title;"
+ id='home_link_div' class="side_bar_item ">
+ <a id='home_link' href='index.xml'>&navigate.home;</a>
+ </div>
+
+ <div title="&opac.navigate.advanced.title;"
+ id='advanced_link_div' class="side_bar_item ">
+ <a id='advanced_link' href='advanced.xml'>&opac.navigate.advanced;</a>
+ </div>
+
+ <div title="&navigate.myopac.title;"
+ id='myopac_link_div' class="side_bar_item ">
+ <a id='myopac_link' href='myopac/myopac.xml'>&navigate.myopac;</a>
+ </div>
+
+ <div title="&navigate.login.title;"
+ id='login_link_div' class="side_bar_item ">
+ <a id='login_link' href='javascript:void(0);'>&navigate.login;</a>
+ </div>
+
+ <div title="&navigate.logout.title;"
+ id='logout_link_div' class="side_bar_item hide_me ">
+ <a id='logout_link' href='javascript:void(0);'>&navigate.logout;</a>
+ </div>
+
+
+ <!-- Informational sidebar components -->
+
+ <div id='logged_in_as_div' title="&navigate.loggedinas.title;" class="side_bar_item hide_me">
+ <span>&navigate.loggedinas;<b id='username_dest'> </b></span>
+ </div>
+
+ <div id='sidebar_results_wrapper' class='hide_me border_1'>
+ <div title="&navigate.titleGroupResults;"
+ id='mresult_link_div' class="side_bar_item hide_me">
+ <a id='sidebar_title_group_results'>&navigate.titleGroupResults;</a>
+ </div>
+
+ <div title="&navigate.titleResults;"
+ id='result_link_div' class="side_bar_item hide_me">
+ <a id='sidebar_title_results'>&navigate.titleResults;</a>
+ </div>
+
+ <div title="&navigate.record.details;"
+ id='rdetail_link_div' class="side_bar_item hide_me">
+ <span>&navigate.title.details;</span>
+ </div>
+ </div>
+ </div>
+
+ <div id='facetSidebarContainer' class='hide_me'>
+
+ <div class="side_bar_item" style="margin-top: 10px; font-weight: bold;">
+ <span>&navigate.facetRefine;</span>
+ </div>
+
+ <div dojoType='openils.widget.FacetSidebar' searchBox='facet_box' searchSubmit='search_submit' facetLimit='5' classOrder='["author","subject","series","title","keyword"]'>
+ <script type='dojo/method' event='populate'><![CDATA[
+ var fblob = this;
+ attachEvt("result", "allRecordsReceived", function () {
+ if(!resultFacetKey) return;
+ if (fblob.facetCacheKey) return; // already rendered it
+
+ dojo.removeClass('facetSidebarContainer','hide_me');
+
+ fblob.facetCacheKey = resultFacetKey;
+ fblob.render();
+ });
+ ]]></script>
+ </div>
+ </div>
+
+ <div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'
+ style='text-align:center; margin-top: 20px;'>
+ <hr/>
+ <div id='adv_quick_search'>
+ <div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
+ <div style='margin-top: 8px;'>
+ <table><tbody><tr>
+ <td>
+ <select id='adv_quick_type' style='width: 6em;'>
+ <option value='isbn'>&opac.advanced.quick.isbn;</option>
+ <option value='issn'>&opac.advanced.quick.issn;</option>
+ <option value='cn'>&opac.advanced.quick.cn;</option>
+ <option value='lccn'>&opac.advanced.quick.lccn;</option>
+ <option value='tcn'>&opac.advanced.quick.tcn;</option>
+ <option value='barcode'>&opac.advanced.quick.barcode;</option>
+ </select>
+ </td><td>
+ <input type='text' id='adv_quick_text' size='16' />
+ </td>
+ </tr></tbody></table>
+ </div>
+
+ <span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
+ <span class='hide_me' id='myopac.copy.not.cataloged'>&sidebar.copy.not.cataloged;</span>
+ <div style='margin-top: 8px;' class='adv_quick_search_submit'>
+ <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a>
+ </div>
+ </div>
+ </div>
+
+ <div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
+ style='text-align:center; margin-top: 20px;'>
+ <hr/>
+ <div class='adv_quick_search color_4'><b>&search.marc;</b></div>
+ <table style='margin: 3px; width: 100%;' id='adv_sdbar_table' class='border_4_3'>
+ <tbody>
+ <tr>
+ <td>&search.marc.tag;</td>
+ <td><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
+ <td>&search.marc.subfield;</td>
+ <td><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
+ </tr>
+ <tr>
+ <td>&search.marc.value;</td>
+ <td colspan='3'><input name='advanced.marc.value' size='18' /></td>
+ </tr>
+ <tr name='crow' class='hide_me'>
+ <td colspan='4' align='center'>
+ <a href='javascript:void(0);' class='classic_link'
+ onclick='
+ var div = $("adv_marc_search_sidebar");
+ if( div.getElementsByTagName("table").length > 1 )
+ div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ <div id='adv_marc_submit' class='adv_quick_search_submit'>
+ <a style='margin-right: 4px;' class='classic_link' href='javascript:advAddMARC();'>&search.marc.add.row;</a>
+ <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a>
+ </div>
+ </div>
+
+
+
+
+ <!-- ============================================================================= -->
+ <!-- Our javascript -->
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/sidebar.js'></script>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.sidebar = {};
+ config.css.sidebar = {};
+ config.names.sidebar = {};
+ config.css.sidebar.item = {};
+ config.ids.sidebar.home = 'home_link_div';
+ config.ids.sidebar.advanced = 'advanced_link_div';
+ config.ids.sidebar.myopac = 'myopac_link_div';
+ config.ids.sidebar.prefs = 'prefs_link_div';
+ config.ids.sidebar.mresult = 'mresult_link_div';
+ config.ids.sidebar.rresult = 'result_link_div';
+ config.ids.sidebar.rdetail = "rdetail_link_div";
+ config.ids.sidebar.login = 'login_link';
+ config.ids.sidebar.logout = 'logout_link';
+ config.ids.sidebar.logoutbox = 'logout_link_div';
+ config.ids.sidebar.loginbox = 'login_link_div';
+ config.ids.sidebar.logged_in_as = 'logged_in_as_div';
+ config.ids.sidebar.username_dest = 'username_dest';
+
+ config.ids.sidebar.home_link = 'home_link'
+ config.ids.sidebar.advanced_link = 'advanced_link'
+ config.ids.sidebar.myopac_link = 'myopac_link'
+
+ config.css.encircled = 'encircled';
+ </script>
+
+</div>
+
--- /dev/null
+
+<div id='statusbar' style='margin-bottom: 6px; margin-top: 6px;'>
+
+ <table width='100%'>
+ <tbody>
+ <tr>
+ <td align='left'>
+ <b>
+ <span style='padding: 1px; ' id='now_searching_location'> </span>
+ </b>
+ <i id='including_results_for' class='hide_me'>
+ <span>&status.results;</span> <b id='including_results_location'> </b>
+ </i>
+ </td>
+ <td align='right'>
+ <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
+ <!--#include virtual="../result/filtersort.xml" -->
+ <!--#endif -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+</div>
--- /dev/null
+<select id='search_type_selector'>
+ <option value='keyword' selected='selected'>&common.keyword;</option>
+ <option value='title'>&common.title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='subject'>&common.subject;</option>
+ <option value='series'>&common.series;</option>
+</select>
+
--- /dev/null
+
+<div id='tips' class='tips hide_me'>
+ <div class='hide_me'>
+ <span>&common.tips.tip1;</span>
+ <span>&common.tips.tip2;</span>
+ </div>
+ <span style="font-weight: bold;">&tips.label; </span>
+</div>
--- /dev/null
+<div id='copyright_block'>
+ <div id='footer_links'>
+ <span class='footer_link'>
+ <a class='classic_link'
+ href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&footer.help.url;'>&footer.help;</a>
+ </span>
+ </div>
+ <div id='footer_logo'>&footer.logo;
+ <a href='http://open-ils.org'><img style='border:none; width: 94px; height: 16px;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+ </div>
+</div>
--- /dev/null
+<head>
+ <meta http-equiv="X-UA-Compatible" content="chrome=1"></meta>
+ <!-- Set the page title -->
+
+ <!--#include virtual="common/css_common.xml"-->
+
+ <title>&<!--#echo var="OILS_TITLE"-->;</title>
+ <link rel="unapi-server" type="application/xml" title="unAPI" href="http://<!--#echo var='HTTP_HOST'-->/opac/extras/unapi"/>
+ <link rel="icon" type="image/ico" href="/favicon.ico"/>
+
+ <!--#if expr="$slimpac!='true'"-->
+ <!--#include virtual="common/js_common.xml"-->
+ <!--#endif-->
+
+</head>
--- /dev/null
+
+<div id='canvas_main' class='home_search canvas'
+ style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;'
+ xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <!-- load my js -->
+ <script language='javascript' type='text/javascript'
+ src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+ <script language='javascript' type='text/javascript'
+ src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.searchbar = {};
+ config.css.searchbar = {};
+ config.ids.searchbar.text = 'search_box';
+ config.ids.searchbar.submit = 'search_submit';
+ config.ids.searchbar.type_selector = 'search_type_selector';
+ config.ids.searchbar.depth_selector = 'depth_selector';
+ config.ids.searchbar.form_selector = 'form_selector';
+ config.ids.searchbar.extra_row = 'searchbar_extra';
+ config.ids.searchbar.main_row = 'searchbar_main_row';
+ config.ids.searchbar.table = 'searchbar_table';
+ config.ids.searchbar.location_tag = 'search_location_tag_link';
+ config.ids.searchbar.lib_sel_span = 'lib_selector_span';
+ config.ids.searchbar.lib_sel_link = 'lib_selector_link';
+ config.ids.searchbar.depth_sel_span = 'depth_selector_span';
+ </script>
+
+
+ <div style='width: 100%; text-align: center'>
+ <img src='<!--#echo var="OILS_BASE"-->/images/tadl/tadl_logo.png' />
+ </div>
+
+ <style type="text/css">.rowpad { height: 20px; }</style>
+
+ <table id='frontsearch_table' height='100%' width='100%'
+ style='margin-top: 10px; border-collapse: collapse;'>
+
+ <tbody>
+
+ <tr class='color_3'>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+ <td style='padding: 6px;' class='border_5' align='center'>
+ <span>&opac.search.nowSearching;</span>
+ <span style='padding: 1px;' id='now_searching_location'> </span>
+ </td>
+ </tr>
+
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr>
+ <td nowrap='nowrap' align='center' class='color_1 border_5'>
+ <input id='search_box' style='width: 300px;' type='text' />
+ <span style='padding-left: 6px;'>
+ <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+ </span>
+ </td>
+ </tr>
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr class='color_3 border_5'>
+
+ <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+ <span style='padding-right:40px;'>
+ <!--#include virtual="../common/stypes_selector.xml"-->
+ </span>
+
+ <span>
+ <!--
+ <span>&common.format;: </span>
+ -->
+ <!--#set var='FORM_SEL_ID' value='form_selector'-->
+ <!--#include virtual="../common/format_selector.xml"-->
+ </span>
+
+ </td>
+ </tr>
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr class='color_1 border_5'>
+ <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+ <span style='padding-right: 15px;'>
+ <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+ <span>
+ <span class='hide_me' id='depth_selector_span'>
+ <select id='depth_selector' >
+ <option value='new'>&opac.navigate.selectNewOrg;...</option>
+ </select>
+ </span>
+ <span class='hide_me' id='lib_selector_span'>
+ <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+ </span>
+ </span>
+ <span style='padding-left: 15px;'>
+ <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+ </span>
+ </td>
+ </tr>
+
+ <!-- locale picker -->
+ <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+ <span style='vertical-align: top;'>&common.language;</span>
+ <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore"
+ searchAttr="label" required="false" jsId='opacLocaleSelector'>
+ <script type="text/javascript">
+ dojo.addOnLoad(function() {
+ opacLocaleSelector.setValue(locale);
+ dojo.connect(opacLocaleSelector, 'onChange',
+ function () {
+ location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+ }
+ );
+ });
+ </script>
+ </span>
+ </td></tr>
+
+ </tbody>
+ </table>
+
+</div>
+
+
+
+
+
+
--- /dev/null
+<body class="tundra">
+
+ <noscript>
+ <style type="text/css">#toptable { display: none; }</style>
+ <p style="font-size: 1.3em; padding: 3em; text-align: center;">
+ &home.js.disabled;
+ </p>
+ </noscript>
+
+ <table id='toptable' width='100%' style='border-collapse: collapse;'>
+ <tbody>
+ <tr>
+ <td width='10%'> </td>
+ <td width='80%'>
+ <div id='canvas'>
+ <!--#include virtual="../common/altcanvas.xml"-->
+ <!--#include virtual="homesearch.xml"-->
+ </div>
+ </td>
+ <td width='10%'> </td>
+ </tr>
+ </tbody>
+ </table>
+ <!--#include virtual='../footer.xml'-->
+
+ <script language="javascript" type="text/javascript">
+ isFrontPage = true;
+ dojo.addOnLoad(init);
+ dojo.addOnLoad(home_init);
+
+ try {
+ dojo.style(dojo.byId('toptable'), 'display', 'table');
+ } catch(e) {
+ try {
+ dojo.style(dojo.byId('toptable'), 'display', '');
+ } catch(ee) {}
+ }
+
+ dojo.require("dijit._Calendar");
+ dojo.require("dijit.form.DateTextBox");
+ dojo.require("dijit.form.FilteringSelect");
+ dojo.require("dojo.date.locale");
+ dojo.require("dojo.date.stamp");
+ dojo.require("dojo.parser");
+ dojo.require("openils.widget.FacetSidebar"); // pulls in Searcher and I18N
+ </script>
+</body>
+
+
--- /dev/null
+
+<xsl:stylesheet version="1.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="html" indent="yes" encoding="utf-8"/>
+ <xsl:template match="/">
+ <xsl:copy-of select='/*[local-name()="html"]'/>
+ </xsl:template>
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Loads the environment -->
+<!--#include virtual="setenv.xml"-->
+
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/locale/${locale}/opac.dtd"-->
+]>
+
+
+<html xmlns='http://www.w3.org/1999/xhtml'>
+ <!--#include virtual="header.xml"-->
+ <!--#if expr="$OILS_PAGE='index.xml'"-->
+ <!--#include virtual="home/index_body.xml"-->
+ <!--#else-->
+ <!--#include virtual="body.xml"-->
+ <!--#endif-->
+</html>
+
--- /dev/null
+
+<div id='myopac_bookbag_div' class='hide_me' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/container.js'> </script>
+
+ <div id='myopac_delete_bookbag_warn' class='hide_me'>
+ &myopac.delete.bookbag;
+ </div>
+
+ <div style='text-align: center; font-weight: bold;'
+ class='hide_me' id='myopac_bookbags_none'>&myopac.no.bookbags;</div>
+
+ <div style='width: 99%; text-align: center; margin-bottom: 10px;'>
+ <b>&myopac.bookbags.title;</b>
+ <!--
+ <a class='classic_link' style='margin-left: 5px; font-size: 8pt;'
+ href='javascript:alert($("myopac_bb_what_are").innerHTML);'>(What are Bookbags?)</a>
+ -->
+ </div>
+
+ <table width='100%' class='data_grid data_grid_center hide_me' id='myopac_bookbag_table'>
+ <thead>
+ <tr><td>&common.name;</td><td>&myopac.bookbag.items;</td><td>&myopac.bookbag.shared;</td><td>&myopac.bookbag.toggle;</td><td>&myopac.bookbag.delete;</td></tr>
+ </thead>
+ <tbody id='myopac_bookbag_tbody'>
+ <tr id='myopac_bookbag_tr'>
+ <td>
+ <a href='javascript:void(0);' class='classic_link' name='myopac_expand_bookbag'> </a>
+ </td>
+ <td><span name='myopac_bookbag_item_count'> </span> <span> &myopac.items;</span></td>
+ <td>
+ <span name='myopac_bb_published_no' class='hide_me'>&common.no;</span>
+ <span name='myopac_bb_published_yes' class='hide_me'>&common.yes;</span>
+ <a name='myopac_bb_published_view' class='classic_link hide_me'>&myopac.view;</a>
+ <a name='myopac_bb_published_atom' class='unadorned_link hide_me'>
+ <img border="0" src="/opac/images/small-rss.png" title="&myopac.atom.feed;" alt="&myopac.atom.feed;"/>
+ </a>
+ <br/><a name='myopac_bb_exp_refworks' class='classic_link hide_me'>&myopac.bookbag.refworks;</a>
+ </td>
+
+ <td>
+ <a name='myopac_bb_make_unpublished' class='classic_link hide_me'>&myopac.bookbag.hide;</a>
+ <a name='myopac_bb_make_published' class='classic_link hide_me'>&myopac.bookbag.share;</a>
+ </td>
+
+ <td>
+ <a class='classic_link' href='javascript:void(0);' name='myopac_container_delete'>&myopac.delete;</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table width='100%' class='data_grid data_grid_center' style='margin-top: 10px;'>
+ <thead>
+ <tr><td>&myopac.bookbag.create;</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span style='padding-right: 5px;'>&myopac.bookbag.naming;</span>
+ <input id='myopac_bookbag_new_name' type='text' />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span style='padding: 5px;'>&myopac.bookbag.share;</span>
+ <a class='classic_link' href='javascript:alert($("bb_publish_text").innerHTML);'><b>&common.help;</b></a>
+ <span>&common.yes;</span> <input type='radio' name='bb_public' id='bb_public_yes'/>
+ <span>&common.no;</span> <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
+ <input style='padding-left: 10px;' onclick='myOPACCreateBookbag();'
+ type='submit' value='&common.submit;' />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!--
+ <div style='overflow: auto; max-height: 200px;' class='hide_me'>
+ -->
+ <div style='width: 99%; text-align: center'> <b id='myopac_bookbag_items_name'> </b></div>
+
+ <div class='hide_me' style='width: 100%; text-align: center; font-weight: 700; margin-top: 10px;'
+ id='myopac_bookbag_no_items'>&myopac.bookbag.no.items;</div>
+
+ <table width='100%' class='hide_me data_grid data_grid_center' id='myopac_bookbag_items_table'>
+ <thead>
+ <tr> <td>&common.title;</td> <td>&common.authors;</td> <td>&myopac.bookbag.remove;</td> </tr>
+ </thead>
+ <tbody id='myopac_bookbag_items_tbody'>
+ <tr id='myopac_bookbag_items_row'>
+ <td> <a name='myopac_bookbag_items_title' class='classic_link'> </a> </td>
+ <!--
+ <td> <a name='myopac_bookbag_items_author' class='classic_link'> </a> </td>
+ -->
+ <td name='myopac_bookbag_items_author'> </td>
+ <td><a name='myopac_bookbag_items_remove' class='classic_link'>&myopac.remove.link;</a></td>
+ </tr>
+ </tbody>
+ </table>
+ <!--</div>-->
+
+ <span id='bb_publish_text' class='hide_me'>
+ &myopac.publish.text;
+ </span>
+
+ <span id='myopac_remove_bb_item_confirm' class='hide_me'>
+ &myopac.item.confirm;
+ </span>
+
+ <span id='myopac_make_published_confirm' class='hide_me'>
+ &myopac.publish.confirm;
+ </span>
+
+ <span id='myopac_make_unpublished_confirm' class='hide_me'>
+ &myopac.unpublish.confirm;
+ </span>
+
+ <span id='myopac_bb_update_success' class='hide_me'>
+ &myopac.update.success;
+ </span>
+
+ <span id='bb_create_warning' class='hide_me'>
+ &myopac.create.warning;
+ </span>
+
+ <span id='myopac_bb_what_are' class='hide_me'>
+ &myopac.describe.bookbags;
+ </span>
+
+ <span class='hide_me' id='bb_update_success'>
+ &myopac.updated.success;
+ </span>
+
+</div>
+
+
--- /dev/null
+
+<div id='myopac_checked_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <!--
+ <script language='javascript' type='text/javascript' src='<!||#echo var="OILS_JS_BASE"||>/Date.W3CDTF.js'/>
+ -->
+
+ <table width='100%'><tbody>
+ <tr>
+ <td aligh='left' class='data_grid'>
+ <!--
+ Total items out: <b id='mo_items_out_count' style='padding-right: 20px;'>0</b>
+ -->
+ &myopac.checked.out; <b id='mo_items_out_count' style='padding: 5px;'>0</b> /
+ &myopac.checked.overdue; <b id='mo_items_overdue_count' style='padding: 5px;'>0</b>
+ </td>
+ <td align='right'>
+ <button onclick='myOPACRenewSelected();' id='mo_renew_button' disabled='disabled'>&myopac.checked.renew;</button>
+ </td>
+ </tr>
+ <tr id='my_renewing' class='hide_me'><td align='center'><b>&myopac.checked.renewing;</b></td></tr>
+ </tbody></table>
+
+ <table width='100%' class='light_border data_grid'>
+
+ <thead class='color_3'>
+ <tr>
+ <td width='45%'>&common.title;</td>
+ <td width='20%'>&common.author;</td>
+ <td width='10%' nowrap='nowrap' align='center'>&myopac.fines.due;</td>
+ <td width='10%' nowrap='nowrap' align='center'>&myopac.checked.renew.remaining;</td>
+ <td width='15%'>&common.select;
+ (<a id='myopac_select_all_checked' onclick='myopacSelectAllChecked();'
+ class='classic_link' href='javascript:void(0);'>&common.all;</a>/<a id='myopac_select_none_checked'
+ onclick='myopacSelectNoneChecked();' class='classic_link' href='javascript:void(0);'>&common.none;</a>)
+ </td>
+ </tr>
+ </thead>
+
+
+ <tbody id='myopac_checked_tbody'>
+
+ <tr id='myopac_checked_none' class='hide_me'>
+ <td colspan='10' align='center'><b>&myopac.checked.noitems;</b></td>
+ </tr>
+
+
+ <tr id='myopac_checked_loading'><td>&common.loading;</td></tr>
+
+ <tr id='myopac_checked_row' class='light_border hide_me'>
+
+ <td name='myopac_checked_title' class='light_border'>
+ <a href='javascript:void(0);' name='myopac_checked_title_link'> </a>
+ </td>
+
+ <td name='myopac_checked_author' class='light_border'>
+ <a href='javascript:void(0);' name='myopac_checked_author_link'> </a>
+ </td>
+
+ <td align='center' name='myopac_checked_due' class='light_border'> </td>
+ <td align='center' name='myopac_checked_renewals' class='light_border'> </td>
+
+ <!--
+ <td align='center' name='myopac_checked_renew' class='light_border'>
+ <a style='text-decoration:underline;' href='javascript:void(0);'
+ name='myopac_checked_renew_link' class='class_link'>Renew</a>
+ </td>
+ -->
+
+ <td align='center'><input type='checkbox' name='selectme'/></td>
+
+ </tr>
+ </tbody>
+ </table>
+
+ <div id='non_cat_circs_div' class='hide_me'>
+ <br/>
+ <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
+ <table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td>&myopac.checked.circ.lib;</td>
+ <td>&myopac.checked.item.type;</td>
+ <td>&myopac.checked.circ.time;</td>
+ </tr>
+ </thead>
+ <tbody id='non_cat_circs_tbody'>
+ <tr id='non_cat_circs_row'>
+ <td name='circ_lib'/>
+ <td name='item_type'/>
+ <td name='circ_time'/>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
+
+ <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
+
+ <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
+
+ <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
+
+</div>
+
+
--- /dev/null
+
+<div id='myopac_fines_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <form method="POST" action="https://www.tadl.org/pay/pay.cgi">
+ <input type="hidden" name="ses" id="myopac_fines_pay_ses" />
+ <input style="background-color: #ffff55; font-weight: bold;" type="submit" value="Pay Fines Online" />
+ </form>
+
+ <table width='100%' class='data_grid data_grid_center'>
+
+ <thead class='color_3'>
+ <tr><td colspan='3' style='padding: 6px'><b>&myopac.fines.title;</b></td></tr>
+ <tr>
+ <td width='33%'>&myopac.fines.owed;</td>
+ <td width='33%'>&myopac.fines.paid;</td>
+ <td width='33%'>&myopac.fines.balance;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_fines_summary_tbody'>
+ <tr id='myopac_fines_summary_loading'><td>&myopac.fines.status;</td></tr>
+ <tr id='myopac_fines_summary_row' class='hide_me'>
+ <td id='myopac_fines_summary_total' >&common.currency;</td>
+ <td id='myopac_fines_summary_paid' >&common.currency;</td>
+ <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!--
+ <div id='accrue_explanation' class='hide_me'>
+ <span>Transactions whose balances are marked with a</span>
+ <span style='color:red; font-weight: bold'>*</span>
+ <span>will continue to accrue fines until the checked out item is returned.</span>
+ </div>
+ -->
+
+
+ <!-- Table for circulation transactions only -->
+ <div id='myopac_circ_trans_div' class='hide_me'>
+ <br/><hr/><br/>
+ <table width='100%' class='data_grid data_grid_center' id='myopac_circ_trans_table'>
+ <thead>
+ <tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>
+ <tr>
+ <td>&common.title;</td>
+ <td>&common.author;</td>
+ <td>&myopac.fines.checkout;</td>
+ <td>&myopac.fines.due;</td>
+ <td>&myopac.fines.returned;</td>
+ <td>&myopac.fines.balance;</td>
+ </tr>
+ </thead>
+ <tbody id='myopac_circ_trans_tbody'>
+ <tr id='myopac_circ_trans_row'>
+ <td><a class='classic_link' name='myopac_circ_trans_title'> </a></td>
+ <td name='myopac_circ_trans_author'> </td>
+ <td name='myopac_circ_trans_start'> </td>
+ <td name='myopac_circ_trans_due'> </td>
+ <td name='myopac_circ_trans_finished'><span style='color:red;'>&myopac.fines.accruing;</span></td>
+ <td>
+ <span style='color: red; font-weight: bold;'
+ name='myopac_circ_trans_balance'>&common.currency;</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <!-- Table for all non-circulation transactions -->
+ <div id='myopac_trans_div' class='hide_me'>
+ <br/><hr/><br/>
+ <table width='100%' class='data_grid data_grid_center' id='myopac_trans_table'>
+ <thead>
+ <tr><td colspan='8' style='padding: 6px'><b>&myopac.fines.other;</b></td></tr>
+ <tr>
+ <td width='12%'>&myopac.fines.time.start;</td>
+ <td width='12%'>&myopac.fines.time.paid;</td>
+ <td width='12%'>&myopac.fines.owed.initial;</td>
+ <td width='12%'>&myopac.fines.paid.amount;</td>
+ <td width='12%'>&myopac.fines.balance;</td>
+ <td width='12%'>&myopac.fines.type;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_trans_tbody'>
+ <tr id='myopac_trans_row'>
+ <td name='myopac_trans_start'> </td>
+ <td name='myopac_trans_last_payment'> </td>
+ <td name='myopac_trans_init_amount'>&common.currency;</td>
+ <td name='myopac_trans_total_paid'>&common.currency;</td>
+ <td style='color:red; font-weight: bold;'>
+ <span name='myopac_trans_balance_recur' class='hide_me'> * </span>
+ <span name='myopac_trans_balance'>&common.currency;</span>
+ </td>
+ <td name='myopac_trans_bill_type'> </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <br/>
+
+</div>
+
+
--- /dev/null
+
+<div id='myopac_holds_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/holds.js'> </script>
+
+ <table width='100%'>
+ <tbody><tr><td width='100%' align='right'>
+ <select id='myopac_holds_actions' onchange='myopacDoHoldAction();'>
+ <option id='myopac_holds_actions_none' value=''>-- &myopac.holds.actions; --</option>
+ <option value='freeze'>&myopac.holds.freeze_selected;</option>
+ <option value='thaw'>&myopac.holds.thaw_selected;</option>
+ <option value='thaw_date'>&myopac.holds.thaw_date_selected;</option>
+ <option value='cancel'>&myopac.holds.cancel_selected;</option>
+ </select>
+ </td></tr></tbody>
+ <script language='javascript' type='text/javascript'>$('myopac_holds_actions_none').selected = true;</script>
+ </table>
+
+ <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
+ <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
+ <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
+ <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
+ <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
+
+ <table width='100%' id='myopac_holds_processing' class='hide_me'>
+ <tr><td>&myopac.holds.processing;</td></tr>
+ </table>
+
+ <div id='myopac_holds_thaw_date_form' class='hide_me'>
+ <div id='myopac_holds_freeze_select_thaw'>&myopac.holds.freeze.select_thaw;</div>
+ <p>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' type='text' id='myopac_holds_thaw_date_input' />
+ </p>
+ <p>
+ <button onclick='myopacApplyThawDate();'>&common.submit;</button>
+ </p>
+ </div>
+
+ <table width='100%' class='light_border data_grid data_grid_center' id='myopac_holds_main_table'>
+
+ <thead class='color_3'>
+ <tr>
+ <td width=''>&common.title;</td>
+ <td width=''>&common.author;</td>
+ <td>&myopac.holds.formats;</td>
+ <td>&myopac.holds.location;</td>
+ <td>&common.status;</td>
+ <td class='hide_me' id='myopac_holds_estimated_wait_column'>&myopac.holds.estimated_wait;</td>
+ <td>&myopac.holds.unfrozen;</td>
+ <td>&myopac.holds.frozen.until;</td>
+ <td>&opac.holds.expire_time;</td>
+ <td width=''>&common.select;
+ (<a id='myopac_select_all_holds' onclick='myopacSelectAllHolds();'
+ class='classic_link' href='javascript:void(0);'>&common.all;</a>/<a id='myopac_select_none_holds'
+ onclick='myopacSelectNoneHolds();' class='classic_link' href='javascript:void(0);'>&common.none;</a>)
+ </td>
+
+ <td>&myopac.holds.edit;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_holds_tbody'>
+
+ <tr id='myopac_holds_none' class='hide_me'>
+ <td colspan='10'><b>&myopac.holds.status.none;</b></td>
+ </tr>
+ <tr id='myopac_holds_loading'><td>&myopac.loading;</td></tr>
+
+ <tr id='myopac_holds_row' class='hide_me'>
+
+ <td name='myopac_holds_title'>
+ <a href='javascript:void(0);' name='myopac_holds_title_link'> </a>
+ <div name='vol_copy' style='border: 1px solid #808080; width:98%; margin-top: 2px;' class='hide_me'>
+ <div style='font-size: 90%' name='part'></div>
+ <div style='font-size: 90%' name='volume'></div>
+ <div style='font-size: 90%' name='copy'></div>
+ </div>
+ </td>
+
+ <td name='myopac_holds_author'>
+ <a href='javascript:void(0);' name='myopac_holds_author_link'> </a>
+ </td>
+
+ <td name='myopac_holds_formats'> </td>
+
+ <td name='myopac_holds_location'></td>
+ <td>
+ <span class='hide_me' name='hold_status_waiting'>&myopac.holds.status.waiting;</span>
+ <span class='hide_me' name='hold_status_transit'>&myopac.holds.status.intransit;</span>
+ <span class='hide_me' name='hold_status_available'><b style='color:red'>&myopac.holds.status.available;</b></span>
+ <span class='hide_me' name='hold_qstats'></span>
+ </td>
+ <td class='hide_me' name='myopac_holds_estimated_wait'/>
+
+ <td>
+ <!-- These characaters do not display in Internet Exploror, *sigh*
+ <span name='myopac_hold_unfrozen_false' class='x_mark'>✗</span>
+ <span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>✓</span>
+ -->
+ <span name='myopac_hold_unfrozen_false' class='x_mark'>&common.no;</span>
+ <span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>&common.yes;</span>
+ </td>
+
+
+ <td name='myopac_holds_frozen_until'></td>
+ <td name='myopac_hold_expire_time'></td>
+ <td><input type='checkbox' name='myopac_holds_selected_chkbx'/></td>
+
+ <td name='myopac_holds_cancel' style='border-left: 3px solid #E0E0E0; border-right: 3px solid #E0E0E0;'>
+ <a href='javascript:void(0);'
+ name='myopac_holds_edit_link' class='classic_link'>&myopac.holds.edit;</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <span class='hide_me' id='myopac_holds_cancel_verify'>
+ &myopac.holds.verify;
+ </span>
+
+</div>
+
+
--- /dev/null
+
+<div id='myopac_prefs_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <table width='100%' class='data_grid'>
+
+ <thead>
+ <tr>
+ <td colspan='2' align='center'>
+ <b>&myopac.prefs.title;</b>
+ </td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_prefs_tbody'>
+ <tr id='myopac_prefs_loading'><td colspan='3'><b>&myopac.loading;</b></td></tr>
+ <tr id='myopac_prefs_row'>
+ <td width='50%'>&myopac.prefs.hits;</td>
+ <td>
+ <select id='prefs_hits_per'>
+ <option value='5'>5</option>
+ <option value='8'>8</option>
+ <option value='10'>10</option>
+ <option value='15'>15</option>
+ <option value='20'>20</option>
+ <option value='25'>25</option>
+ <option value='50'>50</option>
+ </select>
+ </td>
+ </tr>
+
+ <!-- FONT size preference -->
+ <tr>
+ <td>&myopac.prefs.font;</td>
+ <td>
+ <select id='prefs_def_font'>
+ <option value='regular'>&myopac.prefs.font.regular;</option>
+ <option value='large'>&myopac.prefs.font.large;</option>
+ </select>
+ </td>
+ </tr>
+
+ <!-- default hold notification type -->
+ <tr>
+ <td>
+ <span>&myopac.prefs.holds.notify;</span>
+ <a class='classic_link' href='javascript:void(0);'
+ onclick='alert($("myopac_pref_hold_notify_alert").textContent);' >&common.help;</a>
+ </td>
+ <td>
+ <select id='prefs_hold_notify'>
+ <option value='phone:email' selected='selected'>&myopac.prefs.holds.both;</option>
+ <option value='phone'>&myopac.prefs.holds.phone;</option>
+ <option value='email'>&myopac.prefs.holds.email;</option>
+ </select>
+ </td>
+ </tr>
+
+
+ <tr id='prefs_def_location_row'>
+ <td>&myopac.prefs.search.location;</td>
+ <td>
+ <div style='margin-bottom: 5px;'>
+ <input type='checkbox' id='myopac_pref_home_lib'
+ onclick='
+ if( this.checked ) $("prefs_def_location").disabled = true;
+ else $("prefs_def_location").disabled = false;
+ ' /> &myopac.prefs.search.home;
+ </div>
+ <select id='prefs_def_location'>
+ </select>
+ </td>
+ </tr>
+
+ <tr id='prefs_def_range_row'>
+ <td>&myopac.prefs.search.range;</td>
+ <td>
+ <select id='prefs_def_range'>
+ </select>
+ </td>
+ </tr>
+
+
+
+ <!-- Save the preferences -->
+ <tr><td colspan='2'><br/></td></tr>
+
+ <tr>
+ <td align='center' class='color_3' colspan='2'>
+ <button onclick='myOPACSavePrefs();'
+ id='myopac_prefs_submit'>&myopac.prefs.save;</button>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='prefs_update_success'>&myopac.prefs.save.success;</div>
+ <div class='hide_me' id='prefs_update_failure'>&myopac.prefs.save.failed;</div>
+ <span class='hide_me' id='myopac_pref_hold_notify_alert'>
+ &myopac.prefs.help;
+ </span>
+
+</div>
+
+
--- /dev/null
+
+<div id='myopac_summary_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+
+ <div id='myopac.expired.alert' class='hide_me' style='margin-bottom: 20px;'>
+ <table class='data_grid' width='100%'>
+ <tbody>
+ <tr>
+ <td width='100%' style='color:red;'>
+ &myopac.summary.expired;
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id='myopac.notes.div' class='hide_me'>
+ <table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td colspan='2'><b> &myopac.summary.notes;</b></td>
+ </tr>
+ </thead>
+ <tbody id='myopac.notes.tbody'>
+ <tr id='myopac.notes.tr'>
+ <td>
+ <b name='title'/> : <span name='value'/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br/>
+ </div>
+
+ <table width='70%' class='light_border myopac_summary_table'>
+ <tbody id='myopac_summary_tbody'>
+ <tr>
+ <td width='30%' class='color_4 light_border'>&common.name;</td>
+ <td class='light_border'>
+ <span id='myopac_summary_prefix' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_first' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_middle' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_last' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_suffix'> </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.day;</td>
+ <td class='light_border' id='myopac_summary_dayphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.evening;</td>
+ <td class='light_border' id='myopac_summary_eveningphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.other;</td>
+ <td class='light_border' id='myopac_summary_otherphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&common.username;</td>
+ <td class='light_border' id='myopac_summary_username'> </td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_username_row"));$("myopac_username_current_password").focus();'
+ id='myopac_summary_username_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_username_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+
+ <table><tbody>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.current; </span></td>
+ <td><input type='password' size='24' id='myopac_username_current_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateUsername();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.username.enter; </span></td>
+ <td><input type='text' size='24' id='myopac_new_username'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateUsername();' /></td>
+ </tr>
+ </tbody></table>
+
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdateUsername();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_username_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class='color_4 light_border'>&common.password;</td>
+ <td class='light_border' id='myopac_summary_password'>&myopac.summary.password.text;</td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_password_row"));$("myopac_current_password").focus();'
+ id='myopac_summary_password_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_password_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+
+ <table><tbody>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.current; </span></td>
+ <td><input type='password' size='24' id='myopac_current_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.new; </span></td>
+ <td><input type='password' size='24' id='myopac_new_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.reenter; </span></td>
+ <td><input type='password' size='24' id='myopac_new_password2'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ </tbody></table>
+
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdatePassword();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_password_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.email;</td>
+ <td class='light_border' id='myopac_summary_email'> </td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_email_row"));$("myopac_email_current_password").focus();'
+ id='myopac_summary_email_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_email_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+
+ <table><tbody>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.current; </span></td>
+ <td><input type='password' size='24' id='myopac_email_current_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateEmail();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.email.new; </span></td>
+ <td><input type='text' size='24' id='myopac_new_email'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateEmail();' /></td>
+ </tr>
+ </tbody></table>
+
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdateEmail();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_email_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.id.primary;</td>
+ <td class='light_border' id='myopac_summary_ident1'> </td>
+ </tr>
+ <!--
+ <tr>
+ <td class='color_4 light_border'>Secondary Identification</td>
+ <td class='light_border' id='myopac_summary_ident2'> </td>
+ </tr>
+ -->
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.barcode;</td>
+ <td class='light_border' id='myopac_summary_barcode'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.home;</td>
+ <td class='light_border' id='myopac_summary_homelib'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.genesis;</td>
+ <td class='light_border' id='myopac_summary_create_date'> </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+ <br/><hr/><br/>
+
+ <table width='100%' class='light_border data_grid'>
+ <thead>
+ <tr>
+ <td>&myopac.summary.addresses;</td>
+ <td id='myopac_pending_addr_td' class='hide_me'>&myopac.summary.addresses.pending;</td>
+ </tr>
+ </thead>
+ <tbody id='myopac_addr_tbody'>
+ <tr id='myopac_addr_row' class='light_border'>
+ <td>
+ <table>
+ <tr>
+ <td>&myopac.summary.address.type;</td>
+ <td name='myopac_addr_type'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td name='myopac_addr_street'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td name='myopac_addr_street2'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.city;</td>
+ <td name='myopac_addr_city'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.county;</td>
+ <td name='myopac_addr_county'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.state;</td>
+ <td name='myopac_addr_state'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.country;</td>
+ <td name='myopac_addr_country'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.zip;</td>
+ <td name='myopac_addr_zip'> </td>
+ </tr>
+ <tr name='myopac_invalid_addr_row' class='hide_me'>
+ <td colspan='2'>&myopac.summary.address.invalid;</td>
+ </tr>
+ <tr>
+ <td name='myopac_addr_edit_td' colspan='2' class='hide_me'>
+ <a class='classic_link' name='myopac_addr_edit_link' href='javascript:void(0);'>&myopac.summary.address.edit;</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class='hide_me' name='myopac_pending_addr_td'>
+ <table>
+ <tr>
+ <td>&myopac.summary.address.type;</td>
+ <td><input name='myopac_pending_addr_type'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td><input name='myopac_pending_addr_street'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td><input name='myopac_pending_addr_street2'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.city;</td>
+ <td><input name='myopac_pending_addr_city'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.county;</td>
+ <td><input name='myopac_pending_addr_county'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.state;</td>
+ <td><input name='myopac_pending_addr_state'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.country;</td>
+ <td><input name='myopac_pending_addr_country'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.zip;</td>
+ <td><input name='myopac_pending_addr_zip'/> </td>
+ </tr>
+ <tr>
+ <td name='myopac_addr_edit_td' colspan='2'>
+ <a class='classic_link' name='myopac_pending_addr_edit_link' href='javascript:void(0);'>Save Changes</a>
+ <a style='padding-left:10px;' class='classic_link' name='myopac_pending_addr_del_link' href='javascript:void(0);'>Discard Pending Address</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='myopac_username_error'>&myopac.summary.username.error;</div>
+ <div class='hide_me' id='myopac_username_dup'>
+ &myopac.summary.username.dup;
+ </div>
+ <div class='hide_me' id='myopac_username_success'>&myopac.summary.username.success;</div>
+ <div class='hide_me' id='myopac_username_failure'>&myopac.summary.username.failure;</div>
+
+ <div class='hide_me' id='myopac_email_error'>&myopac.summary.email.error;</div>
+ <div class='hide_me' id='myopac_email_success'>&myopac.summary.email.success;</div>
+ <div class='hide_me' id='myopac_email_failure'>&myopac.summary.email.failed;</div>
+
+ <div class='hide_me' id='myopac_password_error'>&myopac.summary.password.error;</div>
+ <div class='hide_me' id='myopac_password_success'>&myopac.summary.password.success;</div>
+ <div class='hide_me' id='myopac_password_failure'>&myopac.summary.password.failure;</div>
+ <span class='hide_me' id='myopac_invalid_username'>&myopac.summary.username.invalid;</span>
+ <span class='hide_me' id='myopac_addr_changes_saved'>Address Saved</span>
+</div>
+
+
--- /dev/null
+<div id='canvas_main' class='canvas' style='margin-top: 20px;'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/advanced.js'></script>
+
+ <style type='text/css'>
+ .advanced_div { text-align: center; margin: 8px; margin-left: 2px; width: 95%; padding: 5px; }
+ </style>
+
+ <div class='advanced_div'>
+ <!--#include virtual="advanced/advanced_global.xml"-->
+ </div>
+</div>
+
+
--- /dev/null
+<div id='canvas_main' class='canvas' style='margin-top: 20px;'>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/cn_browse.js'></script>
+ <!--#include virtual="common/cn_browse.xml"-->
+</div>
+
+
--- /dev/null
+<div>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/mresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/tips.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/holds.js'></script>
+ <!--#include virtual="result/result_common.xml"-->
+</div>
+
--- /dev/null
+<div id='canvas_main' class='canvas hide_me'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/myopac.js'></script>
+
+ <script language='javascript' type='text/javascript'> config.ids.altcanvas.myopac_reload = 'myopac_reloading'; </script>
+ <div id='myopac_reloading' class='hide_me canvas'> &common.loading; </div>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.myopac = {};
+ config.css.myopac = {};
+ config.names.myopac = {};
+ </script>
+
+ <br/>
+ <table style='width: 98%; text-align: center;'>
+ <tbody>
+ <tr id='myopac_nav_row'>
+
+ <td class='myopac_link border_6' id='myopac_summary_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("summary");'>&myopac.account;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_checked_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("checked");'>&myopac.checkouts;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_holds_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("holds");'>&myopac.holds;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_fines_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("fines");'>&myopac.fines;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_prefs_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("prefs");'>&myopac.preferences;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_bookbag_td' nowrap='nowrap'>
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("bookbag");'>&myopac.bookbags;</a>
+
+ </td>
+
+ </tr>
+ </tbody>
+ </table>
+
+ <br/>
+
+ <div id='myopac_main_div'>
+ <!--#include virtual="myopac/myopac_summary.xml"-->
+ <!--#include virtual="myopac/myopac_checked.xml"-->
+ <!--#include virtual="myopac/myopac_holds.xml"-->
+ <!--#include virtual="myopac/myopac_fines.xml"-->
+ <!--#include virtual="myopac/myopac_prefs.xml"-->
+ <!--#include virtual="myopac/myopac_bookbags.xml"-->
+ </div>
+
+</div>
+
+
--- /dev/null
+<div id='canvas_main' class='canvas'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/rresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/rdetail.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/holds.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/cn_browse.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/container.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/grpl_utils.js'></script>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail = {};
+ config.ids.rdetail.view_marc = "rdetail_view_marc";
+ </script>
+
+ <table width='100%' id='np_table' class='hide_me' style='margin-top: 3px;'>
+ <tbody>
+ <tr class='color_4' style='height: 1em;'>
+ <td style='vertical-align: top;'>
+
+ <span>
+ &rdetail.result; <span id='np_offset'> </span>
+ <span> &common.of; </span>
+ <span id='np_count'> </span>
+ </span>
+
+ <span style='padding-left: 40px;' >
+ <a class='np_nav_link classic_link hide_me' id='np_start'
+ href='javascript:rdetailStart();' title="&rdetail.page.results;">&rdetail.start;</a>
+ <a class='np_nav_link classic_link hide_me' id='np_prev'
+ href='javascript:rdetailPrev();' title='&rdetail.page.previous;'>&rdetail.page.previous.short;</a>
+ <span> </span>
+ <a class='np_nav_link classic_link hide_me' id='np_next'
+ href='javascript:rdetailNext();' title='&rdetail.page.next;'>&rdetail.page.next.short;</a>
+ <a class='np_nav_link classic_link hide_me' id='np_end'
+ href='javascript:rdetailEnd();' title="&rdetail.page.last;">&rdetail.end;</a>
+ </span>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table style='' class='rdetail_header color_1' width='100%'>
+ <tbody>
+
+ <tr>
+ <td width='33%' align='left'>
+ <span>&rdetail.detailMain.headerLabel;</span>
+ </td>
+
+ <td align='right' style='padding-right: 7px;' width='33%'>
+ <span id='rdetail_exp_refworks_span' class='hide_me' style='padding-right: 7px;'>
+ <a id='rdetail_exp_refworks'>&opac.holds.exportRefWorks;</a>
+ </span>
+ <span style='padding-right: 7px;'>
+ <a id='rdetail_place_hold' class='css_button' href='javascript:;'>&opac.holds.placeHold;</a>
+ </span>
+ <span style='padding-right: 7px;' class='hide_me' id='rdetail_more_actions'>
+ <select id='rdetail_more_actions_selector' style='max-width: 11em;'>
+ <option value='start'>&rdetail.more;</option>
+ <option disabled='disabled'>--------------</option>
+ <option disabled='disabled'>&rdetail.bookbag.add;</option>
+ <option disabled='disabled'>--------------</option>
+ <option value='new_bookbag' onclick='rdetailNewBookbag();'>&rdetail.bookbag.create;</option>
+ <option disabled='disabled'>--------------</option>
+ </select>
+ </span>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
+ class='hide_me color_4' id='rdetail_deleted_exp'>
+ &rdetail.record.deleted;
+ </div>
+
+ <!--#include virtual="rdetail/rdetail_summary.xml"-->
+ <br/><br/>
+ <!--#include virtual="rdetail/rdetail_extras.xml"-->
+
+ <div class='hide_me' id='rdetail_bb_none'>&rdetail.none;</div>
+ <div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
+ <div dojoType='dijit.Dialog' id='newBBDialog' jsId='newBBDialog' title='&rdetail.bookbag.name;' style="width: 20em;">
+ <input id='bbName' jsId='bbName' dojoType='dijit.form.TextBox'></input><br/>
+ <button id='bbok' dojoType='dijit.form.Button' onClick='finishBookbag(0);' type='button'>&common.submit;</button>
+ <button id='bbca' dojoType='dijit.form.Button' onClick='finishBookbag(1);' type='button'>&common.cancel;</button>
+ </div>
+ <div class='hide_me' id='rdetail_bb_success'>&rdetail.bookbag.create.success;</div>
+
+</div>
--- /dev/null
+<div>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/rresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/tadlv2/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/tips.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/holds.js'></script>
+ <!--#include virtual="result/result_common.xml"-->
+</div>
+
--- /dev/null
+
+<!-- record details alternate canvases -->
+<div class=''>
+
+ <!--
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail.view_marc_div = 'view_marc_div';
+ config.ids.altcanvas.view_marc_div = config.ids.rdetail.view_marc_div;
+ config.ids.rdetail.hide_marc = "rdetail_hide_marc";
+ config.ids.rdetail.view_marc_box = "rdetail_view_marc_box";
+ </script>
+
+ <div class='hide_me canvas' id='view_marc_div'>
+ <div>
+ <table width='100%'><tbody><tr>
+ <td class='color_1' align='left' style='padding-left: 7px;text-decoration: underline;'>
+ <a href="javascript:void(0);" id='rdetail_hide_marc'>&rdetail.detailMain.hideMarc;</a>
+ </td>
+ </tr></tbody></table>
+ </div>
+ <br/>
+ <div id='rdetail_view_marc_box'> </div>
+ <br/><br/>
+ </div>
+ -->
+
+</div>
+
--- /dev/null
+<table class='hide_me'>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/copy_details.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/Date.W3CDTF.js'></script>
+ <tbody>
+ <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
+ <td colspan='10'>
+ <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
+
+ <a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
+ <table class='data_grid data_grid_center' style='width: 100%'>
+ <thead>
+ <tr>
+ <td width='33%'>&rdetail.cn.barcode;</td>
+ <td>&common.status;</td>
+ <td>&rdetail.cn.location;</td>
+ <td name='copy_part_label' class='hide_me'>&rdetail.cn.part;</td>
+ <td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
+ <td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
+ <td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
+ <td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
+ </tr>
+ </thead>
+ <tbody name='copies_tbody' class='copy_details_table' width='100%'>
+
+ <tr name='copies_row'>
+
+ <td>
+ <span name='barcode'> </span>
+ <a class='hide_me classic_link copy_more_info' name='details_link'>&rdetail.cn.more;</a>
+ <a class='hide_me classic_link copy_more_info' name='less_details_link'>&rdetail.cn.less;</a>
+ <a class='hide_me classic_link copy_more_info' name='copy_hold_link'
+ href='javascript:void(0);'>&rdetail.cn.hold;</a>
+ <a class='hide_me classic_link copy_more_info' name='copy_reserve_link'
+ href='javascript:void(0);'>&rdetail.cn.reserve;</a>
+ <a class='hide_me classic_link copy_more_info' name='copy_multi_home'
+ href='javascript:void(0);'>&rdetail.cn.multi_home;</a>
+ </td>
+
+ <td name='status'> </td>
+ <td name='location'> </td>
+ <td name='copy_part' class='hide_me'> </td>
+ <td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
+ <td name='create_date_value' class='hide_me'> </td>
+
+ <td name='copy_holdable_td' class='hide_me'>
+ <span name='copy_is_holdable'> </span>
+ </td>
+
+ <td name='copy_due_date_td' class='hide_me'>
+ <span name='copy_due_date'> </span>
+ </td>
+
+ </tr>
+
+ <tr name='copy_extras_row' class='hide_me'>
+ <td colspan='10'>
+ <table width='100%' class='data_grid'>
+ <tbody name='extras_tbody'>
+ <tr name='extras_row' class='hide_me'>
+ <td name='type' width='20%'>
+ <span name='note' class='hide_me'><b>&rdetail.cn.note;</b></span>
+ <span name='cat' class='hide_me'><b>&rdetail.cn.category;</b></span>
+ </td>
+ <td>
+ <span name='key'> </span> : <span name='value'> </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<span class='hide_me' id='rdetail.yes'>&common.yes;</span>
+<span class='hide_me' id='rdetail.no'>&common.no;</span>
+
+
+<div id='rdetail_print_details' class='hide_me'>
+ <div style='text-align: center; padding: 20px; width: 100%'>
+ <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
+ <input type='submit' value='&rdetail.cn.print;' onclick='window.print();'> </input>
+ </div>
+ <div name='body'>
+ <table>
+ <tbody name='tbody'>
+ <tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
+ <tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
+ <tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
+ <tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
+ <tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
+ <tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
+ <tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
+ <tr>
+ <td colspan='3' style='background: #E0F0E0;'> </td>
+ </tr>
+ <tr name='cnrow'><td><b>&common.callnumber;</b></td><td><b colspan='2' name='cn'></b></td></tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
+
--- /dev/null
+
+<!-- This holds information for copies attached to this record -->
+<div id='rdetail_copy_info_div' class='rdetail_extras_div'>
+
+ <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
+ <span>
+ <a href='javascript:void(0);' id='copy_info_local_link'
+ class='rdetail_copy_nav_link hide_me classic_link'><b>&rdetail.copyInfo.local;</b></a>
+ </span>
+ <span width=''>
+ <a href='javascript:void(0);' id='copy_info_all_link'
+ class='rdetail_copy_nav_link classic_link'><b>&rdetail.copyInfo.all;</b></a>
+ </span>
+ </div>
+
+ <table id='rdetail_copy_info_table' class='data_grid'>
+ <thead>
+
+ <tr>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
+ <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>&rdetail.copyInfo.copylocation;</td>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.actions;</td>
+ <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'>
+ <div name='rdetail_status_cell'> </div>
+ </td>
+ </tr>
+
+ </thead>
+ <tbody id='rdetail_copy_info_tbody'>
+ <tr id='rdetail_copy_info_row' class='hide_me'>
+ <td name='rdetail_library_cell'>
+ <a name='lib_print_link' class='hide_me classic_link' style='font-size: 8pt; padding-left: 20px;'>
+ &rdetail.copyInfo.print;
+ </a>
+ </td>
+ <td name='rdetail_callnumber_cell'> </td>
+ <td class="hide_me" name='rdetail_copylocation_cell'> </td>
+ <td name='rdetail_actions_cell'>
+ <div style='padding-bottom: 1px;'>
+ <a style='font-size: 8pt;'
+ name='details' class='hide_me classic_link'>&rdetail.copyInfo.details;</a>
+ </div>
+ <div style='margin-top: 2px;'>
+ <a name='browse' style='font-size: 8pt;'
+ class='hide_me classic_link'>&rdetail.copyInfo.browse;</a>
+ </div>
+ <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
+ <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
+ class='classic_link'>&rdetail.copyInfo.hold;</a>
+ </div>
+ </td>
+ <td nowrap='nowrap' class='rdetail_copy_count_cell vertical'
+ name='rdetail_copy_count_cell'> </td>
+ </tr>
+
+ <tr id='rdetail_copy_info_loading'><td>&rdetail.loading;</td></tr>
+
+ </tbody>
+ </table>
+
+ <!--
+ <table class='hide_me'>
+ <tbody>
+ <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
+ </tbody>
+ </table>
+ -->
+
+ <br/><br/>
+
+ <div id='rdetail_copy_info_none' class='hide_me'>&rdetail.noneAvailable;</div>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail.cp_status = "rdetail_copy_info_status";
+ config.ids.rdetail.cp_info_row = "rdetail_copy_info_row";
+ config.ids.rdetail.cp_info_loading = "rdetail_copy_info_loading";
+ config.ids.rdetail.cp_info_local = "copy_info_local_link";
+ config.ids.rdetail.cp_info_all = "copy_info_all_link";
+ config.ids.rdetail.cp_info_none = "rdetail_copy_info_none";
+ config.names.rdetail.lib_cell = "rdetail_library_cell";
+ config.names.rdetail.cn_cell = "rdetail_callnumber_cell";
+ config.names.rdetail.cp_count_cell = "rdetail_copy_count_cell";
+ config.names.rdetail.cp_status = 'rdetail_status_cell';
+ </script>
+
+</div> <!-- copy info -->
+
+
--- /dev/null
+
+<div xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <table class='rdetails_extra_links'>
+ <thead>
+ <tr>
+ <td id='rdetail_copy_info_link' class='rdetail_extras_td rdetail_extras_selected'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("copyinfo");'
+ class='classic_link'>&rdetail.extras.summary;</a>
+ </td>
+
+ <td id='rdetail_viewcn_link' class='rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("cn");'
+ class='classic_link'>&rdetail.extras.browser;</a>
+ </td>
+
+ <td id='rdetail_summary_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("summary");'
+ class='classic_link'>&rdetail.extras.bib_summary;</a>
+ </td>
+
+ <td id='rdetail_reviews_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("reviews");'
+ class='classic_link'>&rdetail.extras.reviews;</a>
+ </td>
+
+ <td id='rdetail_toc_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("toc");'
+ class='classic_link'>&rdetail.extras.toc;</a>
+ </td>
+
+ <td id='rdetail_excerpt_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("excerpt");'
+ class='classic_link'>&rdetail.extras.excerpt;</a>
+ </td>
+
+ <td id='rdetail_preview_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("preview");'
+ class='classic_link'>&rdetail.extras.preview;</a>
+ </td>
+
+ <td id='rdetail_anotes_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("anotes");'
+ class='classic_link'>&rdetail.extras.author.notes;</a>
+ </td>
+
+ <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("annotation");'
+ class='classic_link'>&rdetail.extras.annotation;</a>
+ </td>
+
+ <td id='rdetail_viewmarc_link' class='rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("marc");'
+ class='classic_link'>&rdetail.extras.marc;</a>
+ </td>
+
+ <td id='rdetail_novelist_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("novelist");'
+ class='classic_link'>&rdetail.extras.novelist;</a>
+ </td>
+
+ <td id='rdetail_foreign_items_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("foreign_items");'
+ class='classic_link'>&rdetail.extras.foreign_items;</a>
+ </td>
+
+ </tr>
+ </thead>
+ </table>
+
+ <div id='rdetail_extras_div' style='width: 95%;'>
+ <div id='rdetail_extras_loading' class='hide_me'
+ style='padding: 10px;'>&common.loading;</div>
+ <!--#include virtual="rdetail_copyinfo.xml"-->
+
+ <div id='rdetail_summary_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'>
+ <div id='rdetail_review_container'/>
+ <!--
+ <div id='rdetail_review_template' style='width: 100%;'>
+ <div name='review_header' style='width: 100%; padding: 15px; border: 1px solid #E0E0E0;'> </div>
+ <div name='review_text' style='width: 100%; padding: 15px; border: 1px solid #E0E0E0;'> </div>
+ </div>
+ -->
+ <div id='rdetail_chilifresh_reviews' class='hide_me'>
+ <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
+ <div id='chilifreshReviewResult' name='chilifreshReviewResult' style='display:none'></div>
+ </div>
+ </div>
+
+ <div id='rdetail_toc_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_anotes_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
+ <div id='rdetail_view_marc_box'> </div>
+ </div>
+
+ <div id='rdetail_novelist_div' class='rdetail_extras_div hide_me'>
+ <div id="NoveListSelect" class="NoveListSelect">
+ <div id="NoveListAnchor" class="NoveListSelect"></div>
+ <div id="novsuggestions"></div>
+ <div id="nextreads"></div>
+ <div id="novrelatedauthors"></div>
+ <div id="novrelateditems"></div>
+ </div>
+ </div>
+
+ <div id='rdetail_foreign_items_div' class='rdetail_extras_div hide_me'>
+ <table width='100%' class='data_grid data_grid_center' id='rdetail_foreign_items_table'>
+ <thead>
+ <tr> <td>&common.title;</td> <td>&common.authors;</td> <td> </td></tr>
+ </thead>
+ <tbody id='rdetail_foreign_items_tbody'>
+ </tbody>
+ </table>
+ </div>
+
+ <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
+
+ <div id='cn_browse_none' class='hide_me color_4' style='width: 90%; text-align: center; margin: 10px;'>
+ &rdetail.extras.call.null;
+ </div>
+
+ <div id='rdetail_cn_browse_select_div'
+ style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
+ <span>&rdetail.extras.call.local; </span>
+ <select id='cn_browse_selector'>
+ </select>
+ </div>
+
+ <!--#include virtual="../common/cn_browse.xml"-->
+ </div>
+
+ <!--#include virtual="rdetail_cn_details.xml"-->
+
+ </div>
+ <!-- Text for dynamic JavaScript -->
+ <div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
+ <div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
+ <div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+
+ <!-- ChiliFresh setup -->
+ <script language='javascript' type='text/javascript'>
+ var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+ if (chilifresh == '(none)') { chilifresh = false; }
+ </script>
+ <!--#if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+ <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+ value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+ <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+ value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+ <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+ <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+ <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+ <!--#endif-->
+
+ <!-- Novelist setup -->
+ <!--#if expr="${OILS_NOVELIST_URL} && ${OILS_NOVELIST_URL}!='(none)'"-->
+ <script type="text/javascript" id="EIT" src="<!--#echo var='OILS_NOVELIST_URL'-->"></script>
+ <!--#endif-->
+ <script language='javascript' type='text/javascript'>
+ var novelist = '<!--#echo var="OILS_NOVELIST_URL"-->';
+ if (novelist == '(none)') { novelist = false; }
+ </script>
+
+</div>
--- /dev/null
+
+<abbr class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+ <!-- temporary hack to give IE somewhere to put these things; should just rip out from rdetail.js
+ See https://bugs.launchpad.net/evergreen/+bug/532217 -->
+ <span class='hide_me' id='rdetail_title'></span>
+ <table id='rdetail_details_table'>
+ <tbody id='rdetail_details_tbody'>
+
+ <tr>
+ <td id='rdetail_image_cell' rowspan='30'>
+ <a id='rdetail_img_link'>
+ <img style='border: none;' id='rdetail_image'
+ onerror='
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));'/>
+ </a>
+ <!-- vendor attribution link -->
+ <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+ <div>&opac.image_provided;</div>
+ <div><a target='_blank' href='&vendor.base_link;'
+ class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+ </div>
+ </td>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with more and/or different information. In this case, the raw MARC 245. -->
+ <td type='opac/slot-data' query='datafield[tag="245"]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ var out = '';
+ var list = dojo.query( 'subfield', item );
+ for (var i = 0; i < list.length; i++) {
+ out += BT.textContent(list[i]) + ' ';
+ }
+ document.title += ': ' + out;
+ return out;
+ ]]></script>
+ </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+ <td class='rdetail_item'>
+ <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+ </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>
+ <td class='rdetail_item' id='rdetail_isbn'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+ <td class='rdetail_item' id='rdetail_edition'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>
+ <td class='rdetail_item' id='rdetail_pubdate'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>
+ <td class='rdetail_item' id='rdetail_publisher'> </td>
+ </tr>
+
+ <tr id='series_row' class='hide_me'>
+ <td nowrap='nowrap' class='rdetail_desc'>Series</td>
+ <td class='rdetail_item' id='rdetail_series'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>
+ <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>
+ <td class='rdetail_item'>
+ <img id='rdetail_tor_pic' class='tor_pic' />
+ <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>
+ <td class='rdetail_item' id='rdetail_abstract'> </td>
+ </tr>
+
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as new search links on subjects. -->
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.subjects;</td>
+ <td type='opac/slot-data' query='datafield[tag^="6"]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ var cgi = new CGI();
+ var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd', 'ol' ];
+ var total = '';
+ var output = [];
+ var list = dojo.query( 'subfield', item );
+ for (var i = 0; i < list.length; i++) {
+ var sub_code = list[i].getAttribute('code');
+ if ( sub_code.match(/[a-z]/i) ) {
+ var current = '';
+ if ( sub_code.match(/[vxyz]/) ) {
+ current += '-- ';
+ }
+ total += BT.textContent(list[i]) + ' ';
+ current += '<a href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p]))
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ current += '">' + BT.textContent(list[i]) + '</a>'
+ output.push(current);
+ }
+ }
+ return '<span>' + output.join(' ') + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+
+ <tr id='rdetail_hold_count_row' class=''>
+ <td nowrap='nowrap' class='rdetail_desc'>Current Holds</td>
+ <td class='rdetail_item' id='rdetail_hold_count'> </td>
+ </tr>
+
+ <tr class='hide_me' id='rdetail_online_row'>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as location-specific URIs (856$9). -->
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri' join=", ">
+ <script type='opac/slot-format'><![CDATA[
+ var link;
+ var linklabel = item.getAttribute('label');
+ if (linklabel.substring(0,7) == 'http://') {
+ linklabel = 'Connect to this resource online';
+ }
+ var link = '<a href="' + item.getAttribute('href') + '" class="css_button">' + linklabel + '</a>';
+ if (item.getAttribute('use_restriction'))
+ link += ' (Use restriction: ' + item.getAttribute('use_restriction') + ')';
+ return link;
+ ]]></script>
+ </td>
+ </tr>
+ <tr name="serial_holdings_label"
+ class="result_table_title_cell hide_me">
+ <td class="rdetail_desc">&rdetail.summary.issues_held;</td>
+ <td templated="true" type="opac/slot-data"
+ query="datafield[tag='901'] subfield[code='c']"
+ class="rdetail_item">
+ ${holdingsStatement}
+ <span class="hide_me" name="holdingsStatement" type="opac/template-value"><![CDATA[
+ if (fetchOrgSettingDefault(
+ getLocation(),
+ "opac.fully_compressed_serial_holdings"
+ )) {
+ var bibid = BT.textContent(item_list[0]);
+ var blob = fieldmapper.standardRequest(
+ ["open-ils.serial",
+ "open-ils.serial.bib.summary_statements"],
+ [bibid, {
+ "orgid": getLocation(), "depth": getDepth()
+ }]
+ );
+
+ var fake = dojo.create("td");
+ var something = false;
+
+ for (var i in blob) {
+ if (!blob[i].length) continue;
+ if (something) dojo.create("br", null, fake);
+ something = true;
+
+ var a = dojo.create(
+ "a", {
+ "innerHTML": "[+]",
+ "href": "javascript:void(0);",
+ "onclick":
+ "rdetailDrawExpandedHoldings(this,"+
+ bibid + ",'" + i + "');",
+ "style": {"marginRight": "1.5em"}
+ }, fake
+ );
+ dojo.create(
+ "span", {
+ "innerHTML": blob[i].join(", ")
+ }, fake
+ );
+ dojo.create(
+ "span", {"id": "holding_type_" + i}, fake
+ );
+ }
+
+ if (something)
+ unHideMe(slot.parentNode);
+
+ return fake.innerHTML;
+ } else {
+ return "";
+ }
+ ]]></span>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <!-- Empty span used for creating unAPI links -->
+ <abbr name="unapi" class="unapi-id">
+ <!-- unAPI URI goes here -->
+ </abbr>
+
+ <script language='javascript' type='text/javascript'><![CDATA[
+
+ config.ids.rdetail.details_body = 'rdetail_details_body';
+ config.ids.rdetail.title = 'rdetail_title';
+ config.ids.rdetail.author = 'rdetail_author';
+ config.ids.rdetail.isbn = 'rdetail_isbn';
+ config.ids.rdetail.edition = 'rdetail_edition';
+ config.ids.rdetail.pubdate = 'rdetail_pubdate';
+ config.ids.rdetail.publisher = 'rdetail_publisher';
+ config.ids.rdetail.tor = 'rdetail_tor';
+ config.ids.rdetail.abstr = 'rdetail_abstract';
+ config.ids.rdetail.image = 'rdetail_image';
+ config.ids.rdetail.tor_pic = 'rdetail_tor_pic';
+
+ dojo.addOnLoad(function() {
+ setTimeout( function () {
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ }
+
+ dojo.require('openils.BibTemplate');
+ new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+ }, 0);
+ });
+ ]]></script>
+
+</div> <!-- details_body -->
+
--- /dev/null
+<span>
+ &result.limit2avail;<input type='checkbox' id='opac.result.limit2avail' onclick='searchBarSubmit(true);'/>
+ <select id='opac.result.sort' onchange='searchBarSubmit(true);'>
+ <option selected='selected' value=''>&result.sort_by;</option>
+ <optgroup label='&result.sort_by.title;'>
+ <option id='opac.result.title.a2z' label='&common.a2z.titla;' value='titlesort.asc'>&common.a2z.title;</option>
+ <option id='opac.result.title.z2a' label='&common.z2a.titla;' value='titlesort.desc'>&common.z2a.title;</option>
+ </optgroup>
+ <optgroup label='&result.sort_by.author;'>
+ <option id='opac.result.author.a2z' label='&common.a2z.author;' value='authorsort.asc'>&common.a2z.author;</option>
+ <option id='opac.result.author.z2a' label='&common.z2a.author;' value='authorsort.desc'>&common.z2a.author;</option>
+ </optgroup>
+ <optgroup label='&result.sort_by.pubdate;'>
+ <option id='opac.result.pubdate.new2old' label='&common.new2old.pubdate;'
+ value='pubdate.desc'>&common.new2old.pubdate;</option>
+ <option id='opac.result.pubdate.old2new' label='&common.old2new.pubdate;'
+ value='pubdate.asc'>&common.old2new.pubdate;</option>
+ </optgroup>
+ </select>
+</span>
--- /dev/null
+
+<div id='canvas_main' class='canvas' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.result = {};
+ config.css.result = {};
+ config.names.result = {};
+ config.ids.result.offset_start = "offset_start";
+ config.ids.result.offset_end = "offset_end";
+ config.ids.result.result_count = "result_count";
+ config.ids.result.next_link = 'next_link';
+ config.ids.result.prev_link = 'prev_link';
+ config.ids.result.home_link = 'search_home_link';
+ config.ids.result.end_link = 'end_link';
+ config.ids.result.main_table = 'result_table';
+ config.ids.result.row_template = 'result_table_template';
+ config.ids.result.num_pages = 'num_pages';
+ config.ids.result.current_page = 'current_page';
+ config.css.result.nav_active = "nav_link_active";
+ config.ids.result.top_div = "result_table_div";
+ config.ids.result.nav_links = "search_nav_links";
+ config.ids.result.info = "result_info_div";
+ config.css.result.cc_cell_even = "copy_count_cell_even";
+ config.names.result.item_jacket = "item_jacket";
+ config.names.result.item_title = "item_title";
+ config.names.result.item_author = "item_author";
+ config.names.result.counts_row = "counts_row";
+ config.names.result.count_cell = "copy_count_cell";
+ </script>
+
+ <!--#include virtual="result_table.xml"-->
+ <!--#include virtual="result_lowhits.xml"-->
+
+</div>
+
+
--- /dev/null
+<table style='width: 100%;'>
+ <tbody>
+
+ <tr class='color_4' style='height: 1em;'>
+
+ <td style='vertical-align: top;' id='next_prev_links'>
+
+ <span class='hide_me' id='result_info_div' style='font-size: 9pt;'>
+ <span> &common.results; </span>
+ <span id='offset_start'> </span>
+ <span> - </span>
+ <span id='offset_end'> </span>
+ <span> &common.ofAtLeast; </span>
+ <span id='result_count'> </span>
+ <span style='padding-left: 6px;'> (page </span>
+ <span id='current_page'> </span>
+ <span> &common.of; </span>
+ <span id='num_pages'> </span>
+ </span>
+
+ <span id='start_end_links_span' class='hide_me'
+ style='padding-left: 40px;' >
+ <a class='search_page_nav_link' id='search_home_link'
+ title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link'
+ id='prev_link' title='&rdetail.page.previous;'>&rdetail.page.previous.short;</a>
+
+ <span class='search_page_nav_link' id='page_numbers'> </span>
+
+ <a class='search_page_nav_link' id='next_link'
+ title='&rdetail.page.next;'>&rdetail.page.next.short;</a>
+ <!--
+ <a class='search_page_nav_link'
+ id='end_link' title="&rdetail.page.last;">&rdetail.end;</a>
+ -->
+ </span>
+
+ </td>
+
+ <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>&result.info.copies; </b>
+ </span>
+ </td>
+ </tr>
+
+ <tr style='height: 2em;' id='result_thead_row'>
+ <td>
+ <div class='hide_me' id='no_formats' style='padding: 4px;'>
+ <b>
+ <span style='color:red;'>*</span>
+ &result.info.no.items;
+ <div>&result.info.format.items;</div>
+ </b>
+ </div>
+
+ <div class='hide_me' id='rresult_show_all' style='padding: 4px;'>
+ <a href='javascript:rresultExpandSearch();' id='rresult_show_all_link'
+ class='classic_link'>&result.info.show; </a>
+ </div>
+
+ <div class='hide_me' id='rresult_show_here' style='padding: 4px;'>
+ <a href='javascript:rresultContractSearch();' id='rresult_show_here_link'
+ class='classic_link'>&result.info.show; </a>
+ </div>
+
+ </td>
+ <td rowspan='2' style='font-size: 8pt; padding-top: 4px;' class='copy_count_cell'
+ width='12%' align='center' name='result_thead_ccell'> </td>
+ </tr>
+
+ </tbody>
+</table>
+
--- /dev/null
+
+<div id='result_low_hits' class='hide_me'>
+
+ <br/><br/><br/>
+
+ <div style='text-align: center; padding-bottom: 8px;'>
+ <div id='result_low_hits_msg' class='hide_me'>&result.lowhits.few;</div>
+ <div id='result_zero_hits_msg' class='hide_me'>&result.lowhits.zero;</div>
+ </div>
+
+ <!-- spell checker -->
+ <div id='did_you_mean' class='lowhits_div hide_me'>
+ <span>&result.lowhits.did.you.mean; </span>
+ <a class='classic_link' id='spell_check_link'> </a>
+ </div>
+
+ <div id='low_hits_remove_format' class='lowhits_div hide_me'>
+ <span>&result.lowhits.formats; </span>
+ <a id='low_hits_remove_format_link' class='classic_link'>&result.lowhits.formats.search;</a>
+ </div>
+
+ <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
+ <span>&result.lowhits.related;</span>
+ <div style='padding: 5px;'>
+ <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
+ </div>
+ </div>
+
+ <div id='low_hits_expand_range' class='lowhits_div hide_me'>
+ <span>&result.lowhits.expand; </span>
+ <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
+ </div>
+
+ <div id='low_hits_search_type' class='lowhits_div hide_me'>
+ <span>&result.lowhits.class;</span>
+ <a id='low_hits_title_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.title;</a>
+ <a id='low_hits_author_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.author;</a>
+ <a id='low_hits_subject_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.subject;</a>
+ <a id='low_hits_series_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.series;</a>
+ <a id='low_hits_keyword_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.keyword;</a>
+ </div>
+
+</div>
+
--- /dev/null
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <table id='res_table'>
+
+ <!-- for some reason, this is the only way i can force the cell widths -->
+ <thead id='result_thead'>
+ <tr>
+ <td class='result_table_pic_header'></td>
+ <td> </td>
+ </tr>
+ </thead>
+
+ <tbody id='result_table'>
+ <tr>
+
+ <td class='result_table_row'>
+ <!--#include virtual="result_info.xml"-->
+ </td>
+ </tr>
+
+ <!-- Template for displaying a search result. This row template is cloned and inserted
+ for each result returned -->
+
+ <tr id='result_table_template' class='hide_me'>
+
+ <!-- Jacket image goes here -->
+
+ <td class='result_table_row' align='left'>
+ <table class='result_table_subtable'>
+ <tbody class='result_table_subtbody'>
+
+ <tr style='height: 1em' name='counts_row' valign="top">
+
+ <td rowspan='4' class='result_table_pic_header'>
+ <a><img name='item_jacket' class='result_table_pic' onerror='this.style.display="none";' /></a>
+ </td>
+
+ <td class='result_table_title_cell' name='result_table_title_cell'>
+ <!-- Title goes here -->
+ <a title="&result.table.keyword;" name='item_title' class='search_link'>
+ <!-- Title goes here -->
+ </a>
+ </td>
+
+ <!-- Copy this td for each copy count appended -->
+ <td rowspan='4' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'>
+ </td>
+
+ </tr>
+
+ <tr style='height: 1em' >
+ <td class='result_table_author_cell'>
+ <a title="&result.table.author;" name='item_author' class='search_link'>
+ <!-- Author goes here -->
+ </a>
+ <div>
+ <span name='result_table_extra_span' class='hide_me'>
+ <span name='result_table_pub_box' style='padding-left: 10px;'>
+ <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+ <span name='result_table_pub_span'> </span> |
+ <span name='result_table_phys_span'> </span>
+ </span>
+ </span>
+ </div>
+ </td>
+ </tr>
+
+ <tr style='height:1em;' >
+ <td name='result_table_format_cell' class='result_table_format_cell'>
+
+ <a name='text_link' class='search_link'>
+ <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording-nonmusical_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='moving image_link' class='search_link'>
+ <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='software, multimedia_link' class='search_link'>
+ <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording-musical_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='cartographic_link' class='search_link'>
+ <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='mixed material_link' class='search_link'>
+ <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='notated music_link' class='search_link'>
+ <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='still image_link' class='search_link'>
+ <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='three dimensional object_link' class='search_link'>
+ <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+ </a>
+
+ <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 style='padding-left: 8px;' href='javascript:void(0);'
+ class='css_button' name='place_hold_link'>&opac.holds.placeHold;</a>
+ </span>
+
+ <!-- Empty span used for creating unAPI links -->
+ <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+ <!-- unAPI URI goes here -->
+ </abbr>
+
+ <!-- Empty span used for creating Google Book Search-->
+ <span name="googleBooksLink" class="hide_me">
+ <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
+ </span>
+
+ </td>
+ </tr>
+ <tr name="local_callnumber_list" class="result_table_title_cell">
+ <td>
+ <span type='opac/slot-data+holdings_xml-full' query='volumes'>
+ <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+ var output = dojo.create('span');
+
+ var item_cnt = 0;
+ var max_items = 4;
+
+ dojo.query('volume', item).forEach(function(vol) {
+ if (item_cnt >= max_items) {
+ return output.innerHTML;
+ }
+ if (vol.getAttribute('deleted') == 't') {
+ return;
+ }
+ if (vol.getAttribute('opac_visible') == 'f') {
+ return;
+ }
+ dojo.query('uri', vol).forEach(function (uri) {
+ var urihref = uri.getAttribute('href');
+ var urilabel = uri.getAttribute('label');
+ if (urihref.substring(0,20) == "http://via.tadl.org/") {
+ var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
+ var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
+ if (urilabel.substring(0,7) == "http://") {
+ // Provide a default label if label appears to be a URL
+ urilabel = "Connect to this resource online";
+ }
+ var link_text = dojo.doc.createTextNode(urilabel);
+ link.appendChild(link_text);
+ output.appendChild(uri_entry);
+ }
+ });
+ dojo.query('copy', vol).forEach(function (cp) {
+ if (item_cnt >= max_items) {
+ return;
+ }
+ if (cp.getAttribute('deleted') == 't') {
+ return;
+ }
+ if (cp.getAttribute('opac_visible') == 'f') {
+ return;
+ }
+
+ /* Ensure the status is visible */
+ var visible_status;
+ dojo.query('status', cp).forEach(function (status) {
+ visible_status = status.getAttribute('opac_visible');
+ });
+ if (visible_status == 'f') {
+ return;
+ }
+
+ /* Ensure the circulation library is visible */
+ var lib_vis;
+ dojo.query('circlib', cp).forEach(function (status) {
+ lib_vis = status.getAttribute('opac_visible');
+ });
+ if (lib_vis != 't') {
+ return;
+ }
+
+ var cp_entry = dojo.create('div');
+ var loc_visible;
+ var vol_appended = false;
+ dojo.query('location', cp).forEach(function (location) {
+ loc_visible = location.getAttribute('opac_visible');
+ if (loc_visible == 't') {
+ if (!vol_appended) {
+ var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry);
+ var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label'));
+ cn.appendChild(cn_txt);
+ vol_appended = true;
+ }
+ var loc = dojo.create('span', { "style": "font-weight: bold;"}, cp_entry);
+ var loc_txt = dojo.doc.createTextNode(' - ' + BT.textContent(location));
+ loc.appendChild(loc_txt);
+ }
+ });
+ if (loc_visible != 't') {
+ return;
+ }
+ dojo.query('circ_lib', cp).forEach(function (circ_lib) {
+ var cp_lib = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry, "first");
+ var cp_lib_txt = dojo.doc.createTextNode(circ_lib.getAttribute('name') + ' - ');
+ cp_lib.appendChild(cp_lib_txt);
+ });
+ dojo.query('status', cp).forEach(function (status) {
+ var cp_status = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry);
+ var cp_status_txt = dojo.doc.createTextNode(' (' + BT.textContent(status) + ')');
+ cp_status.appendChild(cp_status_txt);
+ });
+
+ item_cnt++;
+ if (item_cnt >= max_items) {
+ dojo.create('br', null, cp_entry);
+ cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
+ }
+ output.appendChild(cp_entry);
+ });
+ });
+
+ return output.innerHTML;
+ ]]></span>
+ </span>
+ </td>
+ </tr>
+ <!-- Placeholder for ChiliFresh Review -->
+ <tr class="hide_me" name="chilifreshReview">
+ <td valign="top" colspan="2">
+ <span name="chilifreshReviewLink" class="chili_review"></span>
+ <div name="chilifreshReviewResult" style="display:none"></div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+
+ <!-- ====================== -->
+ <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+ <tbody>
+
+ <tr class='color_4' style='height: 1em;'>
+
+ <td style='vertical-align: top;' id='next_prev_links2'>
+
+ <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+ <span> &common.results; </span>
+ <b id='offset_start2'> </b>
+ <span> - </span>
+ <b id='offset_end2'> </b>
+ <span> &common.ofAtLeast; </span>
+ <b id='result_count2'> </b>
+ <span style='padding-left: 6px;'> (page </span>
+ <span id='current_page2'> </span>
+ <span> &common.of; </span>
+ <span id='num_pages2'> </span>
+ </span>
+
+ <span id='start_end_links_span2' class='hide_me'
+ style='padding-left: 40px;' >
+ <a class='search_page_nav_link' id='search_home_link2'
+ title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link'
+ id='prev_link2' title='&rdetail.page.previous;'>&rdetail.page.previous.short;</a>
+
+ <span class='search_page_nav_link' id='page_numbers2'> </span>
+ <a class='search_page_nav_link' id='next_link2'
+ title='&rdetail.page.next;'>&rdetail.page.next.short;</a>
+ <!--
+ <a class='search_page_nav_link'
+ id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+ -->
+ </span>
+
+ </td>
+
+ <td colspan='5'
+ style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+ <!--
+ <span id='search_info_table2' style='font-size: 8pt;'>
+ <b>Available copies / Total copies </b>
+ </span>
+ -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- ====================== -->
+
+
+ <script language='javascript' type='text/javascript'>
+ config.names.result.format_cell = 'result_table_format_cell';
+ config.names.result.format_link = 'resource_link'
+ config.names.result.format_pic = 'format_pic'
+ </script>
+
+ <!-- ChiliFresh setup -->
+ <script language='javascript' type='text/javascript'>
+ var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+ if (chilifresh=='(none)') { chilifresh = false; }
+ </script>
+ <!--#if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+ <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+ value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+ <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+ value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+ <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+ <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+ <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+ <!--#endif-->
+</div>
+
+
--- /dev/null
+<!-- Sets our environment variables for convenience and determining which page we're on -->
+
+<!--#set var='OILS_PAGE' value="$DOCUMENT_NAME"-->
+
+<!--#if expr="$DOCUMENT_NAME='index.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.home'-->
+ <!--#set var='FRONT_PAGE' value='true'-->
+
+<!--#elif expr="$DOCUMENT_NAME='mresult.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.mresult'-->
+
+
+<!--#elif expr="$DOCUMENT_NAME='rresult.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.rresult'-->
+
+<!--#elif expr="$DOCUMENT_NAME='rdetail.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.rdetail'-->
+
+<!--#elif expr="$DOCUMENT_NAME='myopac.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.myopac'-->
+
+<!--#elif expr="$DOCUMENT_NAME='advanced.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.advanced'-->
+
+<!--#elif expr="$DOCUMENT_NAME='reqitems.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.reqitems'-->
+
+<!--#elif expr="$DOCUMENT_NAME='cnbrowse.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.cnbrowse'-->
+
+<!--#endif-->
+
+<!--#if expr="$HTTPS"-->
+ <!--#set var="OILS_PROTOCOL" value="https"-->
+ <!--#if expr="$OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=='yes'"-->
+ <!--#set var="OILS_OPAC_CSS_HOST" value=""-->
+ <!--#set var="OILS_OPAC_JS_HOST" value=""-->
+ <!--#endif-->
+<!--#else-->
+ <!--#set var="OILS_PROTOCOL" value="http"-->
+<!--#endif-->
+
+<!--#if expr="$OILS_OPAC_STATIC_PROTOCOL"-->
+
+<!--#else-->
+ <!--#set var="OILS_OPAC_STATIC_PROTOCOL" value="$OILS_PROTOCOL"-->
+<!--#endif-->
+
+<!--#set var="OILS_BASE" value="${OILS_PROTOCOL}://${SERVER_NAME}/${OILS_OPAC_BASE}"-->
+<!--#set var="OILS_XML_BASE" value="${OILS_BASE}/common/xml"-->
+
+
+<!-- Javascript host -->
+<!--#if expr="$OILS_OPAC_JS_HOST"-->
+ <!--#set var="OILS_OPAC_JS_HOST" value="${OILS_OPAC_STATIC_PROTOCOL}://${OILS_OPAC_JS_HOST}"-->
+<!--#else -->
+ <!--#set var="OILS_OPAC_JS_HOST" value="$OILS_BASE"-->
+<!--#endif -->
+<!--#set var="OILS_JS_BASE" value="${OILS_OPAC_JS_HOST}/common/js"-->
+
+
+<!--#if expr="$OILS_OPAC_CSS_HOST"-->
+ <!--#set var="OILS_OPAC_CSS_HOST" value="${OILS_OPAC_STATIC_PROTOCOL}://${OILS_OPAC_CSS_HOST}"-->
+<!--#else -->
+ <!--#set var="OILS_OPAC_CSS_HOST" value="$OILS_BASE"-->
+<!--#endif -->
+<!--#set var="OILS_THEME_BASE" value="${OILS_OPAC_CSS_HOST}/theme"-->
+<!--#set var="OILS_SKIN_BASE" value="${OILS_OPAC_CSS_HOST}/skin"-->
+<!--#set var="OILS_CSS_BASE" value="${OILS_OPAC_CSS_HOST}/common/css"-->
+
+
+<!--#if expr="!$locale || $locale=''"-->
+ <!--#set var="locale" value="en-US"-->
+<!--#endif-->