.box_title {
text-align: center;
width: 98%;
- background: #C99;
+ /*background: #C99;*/
+ /*background: #445533;*/
+ background: #556644;
padding: 2px;
+ color: #EFF;
}
.box_caption {
text-align: center;
width: 98%;
- background: #99C;
+ background: #556644;
padding: 2px;
font-size: 95%;
}
.box_content {
- border: 2px dashed #99C;
+ border: 2px dashed #556644;
width: 98%;
background: #FFF;
}
#my_opac_nav_bar {
width: 100%;
text-align: center;
+ color: #EFF;
}
#my_opac_nav_table {
- background: #CCF;
+ /*background: #CCF;*/
+ background: #556644;
+ color: #EFF;
width: 60%;
}
.my_opac_link_cell {
text-align: center;
+ color: #FFF;
+}
+
+.my_opac_link_cell a {
+ color: #EFF;
+}
+
+.my_opac_link_cell a:visited {
+ color: #EFF;
+}
+
+.my_opac_link_cell a:active {
+ color: #EFF;
}
.my_opac_link_cell a:hover {
}
.my_opac_link_cell_active {
- background: #CFF;
+ background: #CCCC66;
+}
+
+.my_opac_link_cell_active a {
+ color: #000;
}
#my_opac_info_pane {
}
.my_opac_info_table_header {
+ /*
background: #CCF;
color: green;
- border: 1px solid blue;
+ */
+ background: #556644;
+ color: #EFF;
+ border: 1px solid #CCCC66;
+
padding: 3px;
}
.my_opac_profile_cell {
padding: 7px;
- border: 1px solid blue;
+ /*border: 1px solid blue;*/
+ border: 1px solid #CCCC66;
}
.my_opac_update_table {
border-bottom: 1px solid lightgrey;
}
-.my_opac_update_table td {
- padding-left: 12px;
-}
+.my_opac_update_table td { padding-left: 12px; }
+
+.my_opac_addr_table { width: 100%; }
#progress_bar_location {
z-index: -10;
position: absolute;
- background: #CCF;
+ /*background: #CCF;*/
+ /*background: #CC6;*/
+ background: #f0b42e;
width: 98%;
height: 32px;
border-collapse: collapse;
.progress_bar_done {
height: 100%;
width: 100%;
- background: #CCF;
+ /*background: #CCF;*/
+ /*background: #CC6;*/
+ background: #ffb42e;
border-collapse: collapse;
white-space:nowrap;
}
.progress_bar_chunk_active {
height: 100%;
float: left;
- background: #CCF;
+ /*background: #CCF;*/
+ /*background: #CCCC66;*/
+ background: #ffb42e;
border-collapse: collapse;
}
.copy_tree_div {
- border-top: 1px solid blue;
+ /*border-top: 1px solid blue;*/
+ /*border: 1px solid #CCCC66;*/
margin-top: 15px;
}
.detail_header_cell {
- background: #CCF;
- color: green;
+
+ /*background: #CCF;
border: 1px solid blue;
+ color: green; */
padding: 3px;
+
+ border: 1px solid #CCCC66;
+ background: #556644;
+ color: #FFF;
}
.detail_item_label {
.relevance_box {
- border: 1px solid lightgreen;
+ border: 1px solid #556644;
float: right;
+ /*
background: lightgreen;
+ */
+ background: #445533;
height: 36px;
width: 4px;
}
.relevance {
width: 100%;
font-size: .1em;
- background: #EFE;
+ /*background: #EFE;*/
+ background: #EFF;
}
.record_image {
# if a true value is provided, we generate the web (light) version of the fieldmapper
my $web = $ARGV[0];
# List of classes needed by the opac
-my @web_hints = ("ex", "mvr", "au", "aou",
- "aout", "asv", "asva", "asvr", "asvq",
- "circ", "acp", "acpl", "acn", "ccs",
- "perm_ex", "ahn", "ahr", "aua", "ac", "actscecm");
+my @web_hints = qw/ex mvr au aou aout asv asva asvr asvq
+ circ acp acpl acn ccs perm_ex ahn ahr aua ac
+ actscecm crcd crmf crrf/;
print <<JS;
AbstractRecordResultPage.prototype.buildRecordImage = function(pic_cell, record, page_id, title) {
debug("Building record image for " + page_id);
+
+ /*
var isbn = record.isbn();
- if(isbn) isbn = isbn.replace(/\s+/,"");
- else isbn = "";
+ if(isbn) {
+ isbn = isbn.replace(/^\s+/,"");
+ var idx = isbn.indexOf(" ");
+ if(idx > -1) {
+ isbn = isbn.substring(0, idx);
+ }
+
+ } else isbn = "";
+ */
pic_cell.setAttribute("rowspan","3");
pic_cell.rowSpan = 3;
}
/* use amazon for now */
- var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg";
+ //var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg";
+ //var img_src = "http://www.thecontentserver.com/bin/cntsvr.dll?GetImage&SysID=Content&CustID=Cafe&Return=1&Type=S&Key=" + isbn ;
+
+ var img_src = buildISBNSrc(cleanISBN(record.isbn()));
var big_div = createAppElement("div");
add_css_class(big_div, "record_image_big hide_me");
/* formats is a string of format characters, org is the
org unit used for delivery */
HoldsWindow.prototype.sendHoldsRequest = function(formats, org, email, phone) {
+
+ if(isXUL()) { /* staff member entered barcode, now fetch the user */
+ var recip_barcode = getById("recipient_barcode").value;
+ if(!recip_barcode || recip_barcode == "") {
+ alert("Please enter the user's barcode");
+ }
+ try {
+ this.recipient = grabUserByBarcode(recip_barcode);
+ } catch(E) { alert(E.err_msg()); }
+ }
+
var hold = new ahr();
hold.pickup_lib(org.id());
hold.requestor(this.requestor.id());
hold.hold_type(this.type);
hold.email_notify(email);
hold.phone_notify(phone);
+
if(this.type == "M") hold.holdable_formats(formats);
hold.target(this.record);
var id = this.record;
var usr = this.recipient;
- if(!usr) {
- var obj = this;
- var func = function(usr) {
- obj.recipient = usr.userObject;
- obj.requestor = usr.userObject;
- obj.session = usr.session_id;
- obj.toggle();
+ var barcodebox = null;
+
+ if(isXUL()) {
+ /* used by xul to enter the recipient barcode */
+ barcodebox = elem("input",{type:"text",id:"recipient_barcode"});
+ } else {
+
+ if(!usr) {
+ var obj = this;
+ var func = function(usr) {
+ obj.recipient = usr.userObject;
+ obj.requestor = usr.userObject;
+ obj.session = usr.session_id;
+ obj.toggle();
+ }
+ var diag = new LoginDialog(func);
+ diag.display(node);
+ return false;
}
- var diag = new LoginDialog(func);
- diag.display(node);
- return false;
}
+
+
var org = usr.home_ou();
d.appendChild(this.buildPickuplibSelector(org));
if(this.type == "M")
d.appendChild(this.buildResourceSelector());
+
+ if(barcodebox)
+ d.appendChild(barcodebox);
+
d.appendChild(this.buildSubmit());
this.div.appendChild(d);
return true;
}
+
+
/*
HoldsWindow.prototype.buildHoldsWindowCallback = function(type) {
var obj = this;
if( (this.treeBox && this.treeBox.firstChild &&
this.treeBox.firstChild.nodeType == 3) ||
- (!this.treeBox.firstChild)) {
+ (this.treeBox && !this.treeBox.firstChild)) {
debug("location tree has not been rendered... rendering..");
//setTimeout(function() { renderTree(obj); }, 5 );
debug("Method: " + method);
+ if(isNaN(this.searchDepth)) this.searchDepth = 0;
+ if(isNaN(this.searchLocation)) this.searchLocation = 1;
+
var creq = new RemoteRequest(
"open-ils.search", method,
this.stype, this.string, this.searchLocation, this.searchDepth );
circRow = obj.infoTable.insertRow(obj.infoTable.rows.length);
- //var due = new Date(parseInt(circ.due_date() + "000")).toLocaleString();
var due = circ.due_date();
-
- /* chop the 'time' portion of the date */
+ //due = due.substring(0,10) + "T" + due.substring(12,due.length);
due = due.replace(/[0-9][0-9]:.*$/,"");
+ /*
+ var year = parseInt(due.substring(0,4)) - 1900;
+ var month = parseInt(due.substring(5,7)) - 1;
+ var day = parseInt(due.substring(8,10));
+
+ //alert(parseInt(due.substring(0,4)) + " " + parseInt(due.substring(5,7)) + " " + parseInt(due.substring(8,10)));
+
+ //alert(year + " " + month + " " + day);
+
+ var date = new Date(year, month, day, 0, 0, 0);
+ due = date.toString();
+ //due = due.replace(/[0-9][0-9]:.*$/,"");
+ */
+
+ //alert(date);
+ /*
+ alert(due);
+ due = new Date(due);
+ alert(due);
+ */
+
+ /*
+ alert(circ.due_date());
+ alert(new Date(circ.due_date()));
+ */
+
var title_href = createAppElement("a");
title_href.setAttribute("href","?sub_frame=1&target=record_detail&record=" + record.doc_id() );
title_href.setAttribute("target","_top"); /* escape to the outermost frame */
title_href.appendChild(mktext(record.title()));
+ /*
var renewbox = elem("input",
{type:"checkbox", id:"renew_checkbox_" + record.doc_id()});
+ */
+
+ var renewboxlink = mktext("N/A");
+ if(parseInt(circ.renewal_remaining()) > 0)
+ renewboxlink = buildRenewBoxLink(circ);
/* grab circ lib name */
var org = obj._getOrgUnit(copy.circ_lib());
barcodeCell.appendChild(mktext(copy.barcode()));
circLibCell.appendChild(mktext(org));
renewRemainCell.appendChild(mktext(circ.renewal_remaining()));
- renewCell.appendChild(renewbox);
+ renewCell.appendChild(renewboxlink);
}
}
+function buildRenewBoxLink(circ) {
+
+ var a = elem("a",
+ {href:"javascript:void(0);",style:"text-decoration:underline"}, null, "Renew");
+ var but = elem("input",{type:"submit",value:"Renew Circulation"});
+ var can = elem("input",{type:"submit",value:"Cancel"});
+
+ var box = new PopupBox(a);
+ a.onclick = function(){box.show();}
+ can.onclick = function(){box.hide();}
+ but.onclick = function(){renewCheckout(circ);box.hide();};
+ box.title("Renew Circulation");
+ box.addText("Are you sure you want to renew the circulation?");
+ box.makeGroup([but, can]);
+ return a;
+}
+
+function renewCheckout(circ) {
+ var req = new RemoteRequest(
+ "open-ils.circ", "open-ils.circ.renew",
+ globalmyopac.user.session_id, circ );
+ req.send(true);
+
+ try{var ret = req.getResultObject();}catch(E){return;}
+
+ //alert(js2JSON(ret));
+ alert("Renewal completed successfully");
+ globalmyopac.draw("checked");
+}
+
MyOPACSPage.prototype.getCheckedOut = function(callback) {
bcell2.appendChild(bbold);
bcell3.appendChild(mktext(" "));
+ /*
var addrTable = elem("table");
add_css_class(addrTable, "my_opac_addr_table");
+
var row = addrTable.insertRow(0);
var mailing = row.insertCell(0);
var space = row.insertCell(1);
var billing = row.insertCell(2);
+ */
+ /*
space.setAttribute("style","width: 30px");
space.appendChild(mktext(" "));
+ appendChild(this.mkAddrTable(addrTable, this.userObject.addresses()[a]));
+
var addr = this.user.userObject.mailing_address();
mailing.appendChild(this.mkAddrTable("Mailing Address", addr));
billing.appendChild(this.mkAddrTable("Billing Address", addr));
this.infoPane.appendChild(elem("br"));
- /*
+ */
+
+
this.infoPane.appendChild(elem("hr"));
this.infoPane.appendChild(elem("br"));
- this.infoPane.appendChild(addrTable);
- */
+ this.infoPane.appendChild(this.mkAddrTable(this.user.userObject.addresses()));
+
+}
+
+MyOPACSPage.prototype.mkAddrTable = function(addresses) {
+
+ var table = elem("table");
+ add_css_class(table, "my_opac_addr_table");
+
+ var row = table.insertRow(table.rows.length);
+ var cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("Address Type"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("Street"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("City"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("County"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("State"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("Zip Code"));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_info_table_header");
+ cell.appendChild(mktext("Valid"));
+
+ for( var a in addresses ) {
+ var addr = addresses[a];
+ var row = table.insertRow(table.rows.length);
+ var cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(addr.address_type()));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ var st = addr.street1();
+ if(addr.street2()) st += ", " + addr.street2();
+ cell.appendChild(mktext(st));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(addr.city()));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(addr.county()));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(addr.state()));
+
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(addr.post_code()));
+
+ var v = "Yes";
+ if(addr.valid() != "1") v = "No";
+ cell = row.insertCell(row.cells.length);
+ add_css_class(cell, "my_opac_profile_cell");
+ cell.appendChild(mktext(v));
+
+ }
+
+ return table;
}
-MyOPACSPage.prototype.mkAddrTable = function(type, addr) {
+
+
+MyOPACSPage.prototype.__mkAddrTable = function(type, addr) {
var table = elem("table");
var header_row = table.insertRow(table.rows.length);
var due = new Date(parseInt(circ.due_date() + "000")).toLocaleString();
- /* chop the 'time' portion of the date */
due = due.replace(/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/,"");
var title_href = createAppElement("a");
/* for each circulation, build a small table of data */
var table = createAppElement("table");
this._mkCircRow(table, "Title", title_href);
+ //this._mkCircRow(table, "Due Date", mktext(due));
this._mkCircRow(table, "Due Date", mktext(due));
this._mkCircRow(table, "Duration", mktext(circ.duration()));
this._mkCircRow(table, "Barcode", mktext(copy.barcode()));
RecordDetailPage.prototype.setViewMarc = function(record) {
var marcb = elem( "a",
- {
- href:"javascript:void(0)",
- style: "text-decoration:underline"
- },
+ { href:"javascript:void(0)",
+ style: "text-decoration:underline;color:#EFF;" },
{}, "View MARC" );
debug(".ou_type()Setting up view marc callback with record " + record.doc_id());
var holds = elem( "a",
{
href:"javascript:void(0)",
- style: "text-decoration:underline"
+ style: "text-decoration:underline;color:#EFF;"
},
{}, "Place Hold" );
RecordDetailPage.prototype.mkImage = function(record) {
var isbn = record.isbn();
+ /*
if(isbn) isbn = isbn.replace(/\s+/,"");
else isbn = "";
+ */
var big_pic = elem("a", {
- href : "http://images.amazon.com/images/P/" +isbn + ".01.LZZZZZZZ.jpg",
+ href : "http://images.amazon.com/images/P/" + cleanISBN(isbn) + ".01.LZZZZZZZ.jpg",
title : "Click for larger image" } );
- var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg";
+ var img_src = buildISBNSrc(cleanISBN(record.isbn()));
+ //var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg";
var pic = elem ( "img", { src : img_src }, { border : "0px none" });
big_pic.appendChild(pic);
}
+function cleanISBN(isbn) {
+ if(isbn) {
+ isbn = isbn.replace(/^\s+/,"");
+ var idx = isbn.indexOf(" ");
+ if(idx > -1) {
+ isbn = isbn.substring(0, idx);
+ }
+
+ } else isbn = "";
+ return isbn
+
+}
+
+
+function grabUserByBarcode(barcode) {
+ if(!barcode) return null;
+ var req = new RemoteRequest(
+ "open-ils.actor",
+ "open-ils.actor.user.fleshed.retrieve_by_barcode",
+ barcode );
+
+ return req.send(true).getResultObject();
+}
+
option(value='keyword', content=tm.keyword);
option(value='series', content="Series");
END;
+
+ WRAPPER html/select name='format' id='mr_search_format';
+ option(value='all', selected='selected', content="All Formats");
+ option(value='audiobooks', content="Audiobooks");
+ option(value='', content="...");
+ END;
+
space(1);
END; # - table
END; # - center
+
+ %]
+
+
+ <!--
+ <table border=0 cellspacing=5 cellpadding=0>
+ <tr><td>
+ <iframe src="http://www.siteprocentral.com/cgi-bin/feed/feedload.cgi?id=feed" width="762" height="406" frameborder="0" scrolling="no"></iframe>
+ </td></tr>
+ <tr>
+ <td align=center style="font: 10px Arial, Helvetica, sans-serif">
+ <hr width="760" size="1" noshade>
+ Place this <a href="http://www.siteprocentral.com/html_color_code.html">HTML Color Code</a> tool on your website free. | Professional <a href="http://www.turnkey-websites-opportunity.com"> Turnkey Websites</a>
+ </td></tr></table>
+ -->
+
+ [%
+
+
+
END; # - body
END; # - html
link(rel="stylesheet", href="/css/box.css" type="text/css");
link(rel="stylesheet", href="/css/opac_main.css" type="text/css");
- js( src='/js/opac/Page.js' );
- js( src='/js/opac/MyOPACSPage.js' );
- js( src='/js/util/RemoteRequest.js' );
- js( src='/js/util/webutils.js' );
- js( src='/js/util/ils_utils.js' );
- js( src='/js/util/UserSession.js' );
- js( src='/js/util/Cookie.js' );
- js( src='/js/util/ex.js' );
- js( src='/js/widgets/Box.js' );
- js( src='/js/util/JSON.js' );
- js( src='/js/util/web_fieldmapper.js' );
- js( src='/js/util/browser.js' );
- js( src='/js/widgets/PopupBox.js' );
+ js( src='http://gapines.org/js/util/JSON.js' );
+ js( src='http://gapines.org/js/opac/Page.js' );
+ js( src='http://gapines.org/js/opac/MyOPACSPage.js' );
+ js( src='http://gapines.org/js/util/RemoteRequest.js' );
+ js( src='http://gapines.org/js/util/webutils.js' );
+ js( src='http://gapines.org/js/util/ils_utils.js' );
+ js( src='http://gapines.org/js/util/UserSession.js' );
+ js( src='http://gapines.org/js/util/Cookie.js' );
+ js( src='http://gapines.org/js/util/ex.js' );
+ js( src='http://gapines.org/js/widgets/Box.js' );
+ js( src='http://gapines.org/js/util/web_fieldmapper.js' );
+ js( src='http://gapines.org/js/util/browser.js' );
+ js( src='http://gapines.org/js/widgets/PopupBox.js' );
WRAPPER html/js;
'
WRAPPER html/div id='front_search_form';
- "Now searching ";
- lines(2);
span(id='now_searching_cell', class='front_now_searching');
lines(3);
input(id='mr_search_query', name='mr_search_query',
type='textarea', size='54');
- space(1);
+ #space(1);
+ lines(2);
PROCESS stype_selector;
-
+ space(2);
+ PROCESS location_input;
+ space(2);
+ PROCESS search_range;
lines(2);
input(type='submit', id='mr_search_button',
space(3);
- PROCESS location_input;
space(3);
- PROCESS search_range;
lines(3);
anchor( id='login_link', href='?target=my_opac', text = "My OPAC" );
option(value='keyword', content='Keyword');
option(value='series', content='Series');
END;
+
+ space(2);
+ WRAPPER html/select name='format' id='mr_search_format';
+ option(value='all', selected='selected', content="All Formats");
+ option(value='audiobooks', content="Audiobooks");
+ option(value='', content="...");
+ END;
+
END;
+
# ---------------------------------------------------------------------------
# location button
# ---------------------------------------------------------------------------
box(id='record_detail_copy_info');
+ INCLUDE opac/pages/chunks/org_tree.ttk;
END; # body
END; # html
IF type == ex_types.UNKNOWN_USER;
ret("User is not recognized"); END;
+ IF type == ex_types.MAX_RENEWALS_REACHED;
+ ret("The maximun number of renewals has been reached"); END;
+
ret("Unknown exception occured");
-%]