*/
var showDueTime = true;
+/* order status regular expression */
+var orderRE = new RegExp("order","gi");
+
+/* process status regular expression */
+var processRE = new RegExp("process","gi");
+
+/* url for process */
+var processURL = 'http://web4.uwindsor.ca/units/leddy/leddy.nsf/InProcessRequest?OpenForm';
+
function cpdBuild( contextTbody, contextRow, record, callnumber, orgid, depth, copy_location ) {
var i = cpdCheckExisting(contextRow);
if(i) return i;
function cpdDrawCopy(r) {
var copy = r.getResultObject();
var row = r.row;
+ var statusStr = copy.status().name();
- if (r.args.copy_location && copy.location().name() != r.args.copy_location) {
- hideMe(row);
- return;
- }
+ if (r.args.copy_location && copy.location().name() != r.args.copy_location) {
+ hideMe(row);
+ return;
+ }
$n(row, 'barcode').appendChild(text(copy.barcode()));
$n(row, 'location').appendChild(text(copy.location().name()));
- $n(row, 'status').appendChild(text(copy.status().name()));
+ //$n(row, 'status').appendChild(text(copy.status().name()));
+ //alert(copy.status().name());
+ if (processRE.test(statusStr)) {
+ var processLink = document.createElement('a');
+ processLink.setAttribute('href', processURL);
+ processLink.setAttribute('class', 'classic_link');
+ var tn = document.createTextNode(copy.status().name());
+ processLink.appendChild(tn);
+ $n(row, 'status').appendChild(processLink);
+ } else {
+ $n(row, 'status').appendChild(text(copy.status().name()));
+ }//if processRE
if(isXUL()) {
/* show the hold link */
var urlCheck = true; //whether to use a url check to mask legacy urls
var urlExpr = /webvoy|janus|resolver/i; //regular expression
+
+var orderStatus = 9;
+var processStatus = 5;
+var checkStatus = true;
/* assume 1 copy unless we look for more */
var cpCnt = 1;
);
RW.setAttribute('target', 'RefWorksMain');
+ RW.setAttribute('class', 'classic_link');
unHideMe($('rdetail_exp_refworks_span'));
}
for( var j in _statusPositions ) {
var stat = _statusPositions[j];
var val = statuses[stat.id()];
+ if (val && checkStatus) {
+ if (j == orderStatus || j == processStatus)
+ hideMe($('rdetail_place_hold'));
+ }//if
var nn = template.cloneNode(true);
if(val) nn.appendChild(text(val));
else nn.appendChild(text(0));