Really, since the Alt Serial Control interfaces are built on AutoGrid,
all we have to do there is teach AutoGrid (and its constituent EditPane)
to try for reload_opac on write operations.
This may cause more reloads of the OPAC than are truly necessary, but
mainly in cases when nobody's looking because the OPAC is hidden away
in another tab. That's preferable to the alternative of littering the
codebase with dozens of instances of
try { xulG.reload_opac(); } catch (E) { }
which would just be ugly, bad and unmaintainable.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
new openils.PermaCrud()['eliminate'](fmObject, {oncomplete : function(r) { self.store.deleteItem(item) }});
}
);
+
+ try {
+ xulG.reload_opac();
+ } catch (E) {
+ (dump ? dump : console.log)(E);
+ }
},
_formatRowSelectInput : function(rowIdx) {
} else {
(new openils.PermaCrud())[this.mode](this.fmObject, opts);
}
+
+ /* If we happen to have been spawned by something that
+ * puts an reload_opac() function into our context, call it. */
+ try {
+ xulG.reload_opac();
+ } catch(E) {
+ (dump ? dump : console.log)(E);
+ }
}
}
);
location.href =
oilsBasePath + "/serial/subscription?id=" + r;
}
+
+ /* cloning doesn't clone holdings, so nothing changes at
+ * OPAC view just because of this, so no need to try
+ * reload_opac(). */
}
}
);
"authtime": ses("authtime"),
"show_nav_buttons": true,
"no_xulG": false,
- "show_print_button": false
+ "show_print_button": false,
+ "passthru_content_params": {
+ "reload_opac": xulG.reload_opac
+ }
};
["url_prefix", "new_tab", "set_tab", "close_tab", "new_patron_tab",
alert(E);
}
busy(false);
+ try {
+ xulG.reload_opac();
+ } catch(E) {
+ (dump ? dump : console.log)(E);
+ }
}
}
);