[open-ils-commits] r18800 - in trunk/Open-ILS: src/perlmods/OpenILS/Application src/perlmods/OpenILS/Application/Circ web/opac/skin/default/js (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 18 17:45:40 EST 2010
Author: senator
Date: 2010-11-18 17:45:34 -0500 (Thu, 18 Nov 2010)
New Revision: 18800
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
trunk/Open-ILS/web/opac/skin/default/js/holds.js
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Place holds on issuances from the OPAC. Not backporting yet as it might be too
ugly (visually)
Also a couple very minor API documentation fixes
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-11-18 20:32:32 UTC (rev 18799)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-11-18 22:45:34 UTC (rev 18800)
@@ -94,10 +94,11 @@
'exception is returned',
params => [
{ desc => 'Authentication token', type => 'string' },
- { desc => 'Hold object for hold to be created', type => 'object' }
+ { desc => 'Hold object for hold to be created',
+ type => 'object', class => 'ahr' }
],
return => {
- desc => 'Undef on success, -1 on missing arg, event (or ref to array of events) on error(s)',
+ desc => 'New ahr ID on success, -1 on missing arg, event (or ref to array of events) on error(s)',
},
}
);
@@ -110,11 +111,14 @@
desc => "If the recipient is not allowed to receive the requested hold, " .
"call this method to attempt the override",
params => [
- { desc => 'Authentication token', type => 'string' },
- { desc => 'Hold object for hold to be created', type => 'object' }
+ { desc => 'Authentication token', type => 'string' },
+ {
+ desc => 'Hold object for hold to be created',
+ type => 'object', class => 'ahr'
+ }
],
return => {
- desc => 'Undef on success, -1 on missing arg, event (or ref to array of events) on error(s)',
+ desc => 'New hold (ahr) ID on success, -1 on missing arg, event (or ref to array of events) on error(s)',
},
}
);
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-11-18 20:32:32 UTC (rev 18799)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-11-18 22:45:34 UTC (rev 18800)
@@ -436,7 +436,7 @@
global := If true, return only one representative version of a conceptual issuance regardless of the number of subscriptions, otherwise return all issuance objects meeting the requested criteria, including conceptual duplicates. Valid values are 0 (false) and 1 (true, default).
order := date_published sort direction, either "asc" (chronological, default) or "desc" (reverse chronological)
limit := Number of issuances to return. Useful for paging results, or finding the oldest or newest
- offest := Number of issuance to skip before returning results. Useful for paging.
+ offset := Number of issuance to skip before returning results. Useful for paging.
orgid := OU id used to scope retrieval, based on distribution.holding_lib
depth := OU depth used to range the scope of orgid
type := Holding type filter. Valid values are "basic", "supplement" and "index". Can be a scalar (one) or arrayref (one or more).
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2010-11-18 20:32:32 UTC (rev 18799)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2010-11-18 22:45:34 UTC (rev 18800)
@@ -589,7 +589,7 @@
function holdsSetFormatSelector() {
var type = holdArgs.type;
- if( type == 'C' || type == 'V' || holdArgs.editHold ) return;
+ if( type == 'C' || type == 'V' || type == "I" || holdArgs.editHold ) return;
var data = holdsGetFormats();
var avail_formats = data.avail_formats;
@@ -729,6 +729,7 @@
titleid : holdArgs.record,
mrid : holdArgs.metarecord,
volume_id : holdArgs.volume,
+ issuanceid : holdArgs.issuance,
copy_id : holdArgs.copy,
hold_type : holdArgs.type,
patronid : holdArgs.recipient.id(),
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-11-18 20:32:32 UTC (rev 18799)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-11-18 22:45:34 UTC (rev 18800)
@@ -1185,17 +1185,35 @@
"params": [bibid, {"offset": offsets[type], "limit": limit}],
"async": true,
"oncomplete": function(r) {
- if (r = openils.Util.readResponse(r)) {
- offsets[type] += r.length;
- dojo.forEach(
- r, function(sum) {
- dojo.create("span", {"innerHTML": sum.label()}, target);
- dojo.create("br", null, target);
- }
- );
- /* XXX i18n */
- if (r.length == limit)
- dojo.create("a", {"style": "margin-top: 6px;", "innerHTML": "[More]", "onclick": _load}, target);
+ try {
+ if (msg = r.recv().content()) { /* sic, assignment */
+ offsets[type] += msg.length;
+ dojo.forEach(
+ msg, function(iss) {
+ dojo.create(
+ "span", {
+ "innerHTML": iss.label(),
+ "style": "padding-right: 1em;"
+ }, target
+ );
+ dojo.create(
+ "a", {
+ "href":"#","onclick":function() {
+ holdsDrawEditor({
+ "type":"I","issuance":iss.id()
+ });
+ }, "innerHTML":"Place hold"/*XXX i18n*/
+ }, target
+ );
+ dojo.create("br", null, target);
+ }
+ );
+ /* XXX i18n */
+ if (r.length == limit)
+ dojo.create("a", {"style": "margin-top: 6px;", "innerHTML": "[More]", "onclick": _load}, target);
+ }
+ } catch (E) {
+ void(0);
}
}
}
More information about the open-ils-commits
mailing list