By passing through get_barcode_and_settings (and get_barcode, why not).
Once there we can, on load of place hold screens, load the target user's
preferences instead of having to teach TPac to do so in the background.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
staff_hold_usr_barcode_changed();
}
var cur_hold_barcode = undefined;
-function staff_hold_usr_barcode_changed() {
+function staff_hold_usr_barcode_changed(isload) {
if(typeof xulG != 'undefined' && xulG.get_barcode_and_settings) {
var barcode = document.getElementById('staff_barcode').value;
var only_settings = true;
if(!document.getElementById('hold_usr_is_requestor').checked) {
barcode = document.getElementById('hold_usr_input').value;
- only_settings = false;
+ if(!isload)
+ only_settings = false;
if(barcode && barcode != '' && !document.getElementById('hold_usr_is_requestor_not').checked)
document.getElementById('hold_usr_is_requestor_not').checked = 'checked';
}
runEvt('rdetail', 'recordRetrieved', rec[1]);
runEvt('rdetail', 'MFHDDrawn');
}
+ if(location.href.match(/place_hold/)) {
+ staff_hold_usr_barcode_changed(true);
+ }
}
function rdetail_next_prev_actions(index, count, prev, next, start, end, results) {
'url_prefix' : function(url,secure) { return xulG.url_prefix(url,secure); },
'get_new_session' : function(a) { return xulG.get_new_session(a); },
'new_tab' : function(a,b,c) { return xulG.new_tab(a,b,c); },
- 'new_patron_tab' : function(a,b) { return xulG.new_patron_tab(a,b); }
+ 'new_patron_tab' : function(a,b) { return xulG.new_patron_tab(a,b); },
+ 'get_barcode' : function(a,b,c) { return xulG.get_barcode(a,b,c); },
+ 'get_barcode_and_settings' : function(a,b,c) { return xulG.get_barcode_and_settings(a,b,c); }
}
);
} catch(E) {
obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(): ',E);
}
},
+ 'get_barcode' : xulG.get_barcode,
+ 'get_barcode_and_settings' : xulG.get_barcode_and_settings,
'patron_barcode' : obj.patron_barcode
},
'url_prefix' : xulG.url_prefix,