[open-ils-commits] r1063 - conifer/branches/rel_1_6_1/web/opac/skin/uwin/js (artunit)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 11 23:32:49 EST 2010
Author: artunit
Date: 2010-11-11 23:32:46 -0500 (Thu, 11 Nov 2010)
New Revision: 1063
Modified:
conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/copy_details.js
conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/rdetail.js
Log:
suppress hold messages for on order and in process items, add in process link
Modified: conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/copy_details.js
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/copy_details.js 2010-11-09 20:42:52 UTC (rev 1062)
+++ conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/copy_details.js 2010-11-12 04:32:46 UTC (rev 1063)
@@ -9,6 +9,15 @@
*/
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;
@@ -210,15 +219,27 @@
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 */
Modified: conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/rdetail.js
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/rdetail.js 2010-11-09 20:42:52 UTC (rev 1062)
+++ conifer/branches/rel_1_6_1/web/opac/skin/uwin/js/rdetail.js 2010-11-12 04:32:46 UTC (rev 1063)
@@ -18,6 +18,10 @@
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;
@@ -501,6 +505,7 @@
);
RW.setAttribute('target', 'RefWorksMain');
+ RW.setAttribute('class', 'classic_link');
unHideMe($('rdetail_exp_refworks_span'));
}
@@ -1295,6 +1300,10 @@
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));
More information about the open-ils-commits
mailing list