JSAN module autoloader for "add-ons"
This adds a "Server Add-ons" menu entry under Admin -> Workstation
Administration in the staff client. Choosing this allows you to edit or set a
list of identifiers that correspond to JSAN-style modules found in
/server/addons/, and is meant mainly for activating 3rd party modules within the
staff client on a per-workstation basis. You need the
ADMIN_SERVER_ADDON_FOR_WORKSTATION permission to use it.
Configuration options for activated add-ons may also show up in this interface.
More technical details:
This Server Add-ons list is stored as a JSON array in the Mozilla preference
'oils.addon.autoload.list'.
We also add an addon.autoloader module that gets called in most XUL interfaces
via the util_overlay file. This autoloader will loop through the modules
specified in 'oils.addon.autoload.list' and instantiate each, storing a
reference to each of the newly created objects in a data structure in
window.oils_autoloaded.
So, as an example, let's say there is a module: /xul/server/addon/uber_scan.js
And we have the identifier 'uber_scan' in our Server Add-ons list. Then, on
every page load of a XUL interface using the stock util overlay, we will
effectively call:
new addon.uber_scan();
Causing the code in the module to execute. It is up to the module to determine
whether it needs to do anything within a given interface.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Conflicts [permission numbering]:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
12 files changed: