}
+
/** args:
* record, volume, copy (ids)
* request, recipient, editHold (objects)
*/
+
function holdsDrawEditor(args) {
holdArgs = (args) ? args : holdArgs;
return;
}
- if(holdArgs.editHold) /* flesh the args with the existing hold */
+ if(holdArgs.editHold) // flesh the args with the existing hold
holdArgsFromHold(holdArgs.editHold, holdArgs);
holdsDrawWindow();
-
- if(holdArgs.editHold) {
- hideMe($('holds_submit'));
- unHideMe($('holds_update'));
- var req = new Request(FETCH_HOLD_STATUS,
- G.user.session, holdArgs.editHold.id());
- req.send(true);
- holdArgs.status = req.result();
- _holdsUpdateEditHold();
- }
-
}
-/* updates the edit window with the existing hold's data */
+// updates the edit window with the existing hold's data
function _holdsUpdateEditHold() {
var hold = holdArgs.editHold;
function _h_set_rec_descriptors(args, doneCallback) {
- /* grab the list of record desciptors attached to this records metarecord */
+ // grab the list of record desciptors attached to this records metarecord
if( ! args.recordDescriptors ) {
var params = { record: args.record };
-
function holdsDrawWindow() {
swapCanvas($('holds_box'));
$('holds_cancel').onclick = function(){ runEvt('common', 'holdUpdateCanceled'), showCanvas() };
$('holds_submit').onclick = function(){holdsPlaceHold(holdsBuildHoldFromWindow())};
$('holds_update').onclick = function(){holdsPlaceHold(holdsBuildHoldFromWindow())};
- holdFetchObjects(null, function(){__holdsDrawWindow();});
+ holdFetchObjects(null,
+ function(){
+ __holdsDrawWindow();
+
+ if(holdArgs.editHold) {
+ hideMe($('holds_submit'));
+ unHideMe($('holds_update'));
+ var req = new Request(FETCH_HOLD_STATUS,
+ G.user.session, holdArgs.editHold.id());
+ req.send(true);
+ holdArgs.status = req.result();
+ _holdsUpdateEditHold();
+ }
+ }
+ );
}
function __holdsDrawWindow() {
formats : formats,
mods_formats : mods_formats,
lang : data[2],
- largeprint : data[1],
- }
+ largeprint : data[1]
+ };
}
var lang;
var formats = [];
- var sformats = []; /* selected formats */
+ var sformats = []; // selected formats
var type = holdArgs.type;
var desc = holdArgs.recordDescriptors;
return {
lang : lang,
avail_formats : formats,
- sel_formats : sformats,
- }
+ sel_formats : sformats
+ };
}
if(vals.length == 0) return;
- /*
- if( holdArgs.type == 'T' )
- vals.push(holdArgs.myFormat);
- */
-
var fstring = "";
if( contains(vals, 'at-d') ) {
hold.target(target);
hold.hold_type(holdArgs.type);
- /* check for alternate hold formats */
+ //check for alternate hold formats
var fstring = holdsSetSelectedFormats();
if(fstring) {
hold.hold_type('M');
if(!user) user = G.user;
var req = new Request(UPDATE_HOLD, user.session, hold);
req.send(true);
- var x = req.result(); /* cause an exception if there is one */
+ var x = req.result(); // cause an exception if there is one
runEvt('common', 'holdUpdated');
}
-
-