Hopefully to prevent people from moving away before saving.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
function applyCardChanges() {
var cardrows = dojo.query('[cardid]', allCardsDialog.domNode);
+ var changed = false;
dojo.forEach(cardrows,
function(row) {
if(cardPerms['UPDATE_PATRON_ACTIVE_CARD']) {
if(row.card.active() != active) {
row.card.active(active);
row.card.ischanged(1);
+ changed = true;
}
}
if(cardPerms['UPDATE_PATRON_PRIMARY_CARD']) {
if(row.primary_radiobutton.checked && row.card.id() != patron.card().id()) {
patron.card(row.card);
+ changed = true;
}
}
}
);
+ if(changed && lock_ready && xulG && typeof xulG.lock_tab == 'function' && !already_locked) {
+ xulG.lock_tab();
+ already_locked = true;
+ }
allCardsDialog.hide();
}