[open-ils-commits] r11124 - in trunk/Open-ILS/web/opac: common/js skin/default/js skin/default/xml/myopac
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 10 17:38:44 EST 2008
Author: erickson
Date: 2008-11-10 17:38:39 -0500 (Mon, 10 Nov 2008)
New Revision: 11124
Modified:
trunk/Open-ILS/web/opac/common/js/config.js
trunk/Open-ILS/web/opac/skin/default/js/holds.js
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
Log:
fetching queue stats now in hold display. display needs work, though. also needs org setting to enable/disable queue details
Modified: trunk/Open-ILS/web/opac/common/js/config.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/config.js 2008-11-10 22:17:25 UTC (rev 11123)
+++ trunk/Open-ILS/web/opac/common/js/config.js 2008-11-10 22:38:39 UTC (rev 11124)
@@ -306,6 +306,7 @@
var UPDATE_USER_PREFS = "open-ils.actor:open-ils.actor.patron.settings.update";
var FETCH_COPY_STATUSES = "open-ils.search:open-ils.search.config.copy_status.retrieve.all";
var FETCH_COPY_COUNTS_SUMMARY = "open-ils.search:open-ils.search.biblio.copy_counts.summary.retrieve";
+//var FETCH_COPY_COUNTS_SUMMARY = "open-ils.search:open-ils.search.biblio.copy_counts.location.summary.retrieve";
var FETCH_MARC_HTML = "open-ils.search:open-ils.search.biblio.record.html";
var FETCH_CHECKED_OUT_SUM = "open-ils.actor:open-ils.actor.user.checked_out";
var FETCH_HOLDS = "open-ils.circ:open-ils.circ.holds.retrieve";
@@ -355,7 +356,8 @@
var FETCH_ITEM_TYPES = 'open-ils.search:open-ils.search.biblio.item_type_map.retrieve.all';
var FETCH_BIB_LEVELS = 'open-ils.search:open-ils.search.biblio.bib_level_map.retrieve.all';
var FETCH_AUDIENCES = 'open-ils.search:open-ils.search.biblio.audience_map.retrieve.all';
-var FETCH_HOLD_STATUS = 'open-ils.circ:open-ils.circ.hold.status.retrieve';
+//var FETCH_HOLD_STATUS = 'open-ils.circ:open-ils.circ.hold.status.retrieve';
+var FETCH_HOLD_STATUS = 'open-ils.circ:open-ils.circ.hold.queue_stats.retrieve';
var FETCH_NON_CAT_CIRCS = 'open-ils.circ:open-ils.circ.open_non_cataloged_circulation.user';
var FETCH_NON_CAT_CIRC = 'open-ils.circ:open-ils.circ.non_cataloged_circulation.retrieve';
var FETCH_NON_CAT_TYPES = "open-ils.circ:open-ils.circ.non_cat_types.retrieve.all";
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-11-10 22:17:25 UTC (rev 11123)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-11-10 22:38:39 UTC (rev 11124)
@@ -100,17 +100,17 @@
function _holdsUpdateEditHold() {
var hold = holdArgs.editHold;
- var status = holdArgs.status;
+ var qstats = holdArgs.status;
var orgsel = $('holds_org_selector');
var frozenbox = $('holds_frozen_chkbox');
setSelector(orgsel, hold.pickup_lib());
- if( hold.capture_time() || status > 2 ) {
+ if( hold.capture_time() || qstats.status > 2 ) {
frozenbox.disabled = true;
$('holds_frozen_thaw_input').disabled = true;
- if(status == 3) {
+ if(qstats.status == 3) {
// no pickup lib changes while in-transit
orgsel.disabled = true;
} else {
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-11-10 22:17:25 UTC (rev 11123)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-11-10 22:38:39 UTC (rev 11124)
@@ -404,21 +404,29 @@
function myOShowHoldStatus(r) {
var hold = r.hold;
- var status = r.getResultObject();
- holdStatusCache[hold.id()] = status;
+ var qstats = r.getResultObject();
+ holdStatusCache[hold.id()] = qstats;
var row = $("myopac_holds_row_" + r.hold.id());
- if( status < 3 )
- unHideMe($n(row, 'hold_status_waiting'));
-
- if( status == 3 )
- unHideMe($n(row, 'hold_status_transit'));
-
- if( status == 4 ) {
+ if( qstats.status == 4 ) {
unHideMe($n(row, 'hold_status_available'));
hideMe($n(row, 'myopac_holds_cancel_link'));
}
+
+ if(false) {
+ var node = $n(row, 'hold_qstats');
+ // XXX best way to display this info + dojo i18n
+ node.appendChild(text(qstats.queue_position+' of '+qstats.queue_position+' with '+qstats.potential_copies+' copies'));
+ unHideMe(node);
+
+ } else {
+ if( qstats.status < 3 )
+ unHideMe($n(row, 'hold_status_waiting'));
+
+ if( qstats.status == 3 )
+ unHideMe($n(row, 'hold_status_transit'));
+ }
}
@@ -1380,7 +1388,7 @@
var holds = [];
for(var i = 0; i < selectedRows.length; i++) {
hold = holdCache[myopacHoldIDFromRow(selectedRows[i])];
- var status = holdStatusCache[hold.id()];
+ var qstats = holdStatusCache[hold.id()];
switch(action) {
case 'cancel':
holds.push(hold);
@@ -1391,7 +1399,7 @@
holds.push(hold);
break;
case 'freeze':
- if(!isTrue(hold.frozen()) && status < 3)
+ if(!isTrue(hold.frozen()) && qstats.status < 3)
holds.push(hold);
break;
}
Modified: trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2008-11-10 22:17:25 UTC (rev 11123)
+++ trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2008-11-10 22:38:39 UTC (rev 11124)
@@ -86,6 +86,7 @@
<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>
More information about the open-ils-commits
mailing list