webstaff: add egJsonExporter directive
authorGalen Charlton <gmc@esilibrary.com>
Mon, 25 Jan 2016 23:30:48 +0000 (18:30 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 2 Feb 2016 01:36:55 +0000 (20:36 -0500)
commit7c328b3bff1757e1117aea5bd6789a58ba765519
tree86057e1af3d4a2e5c70a5cee94e9b89bc4a62c52
parentfad8e7b3ae46403a8173344caaf008a8aeea9fc9
webstaff: add egJsonExporter directive

This directive is used to allow a piece of JSON
to be saved to the user's filesystem.  For example:

<span eg-json-exporter container="foo" default-file-name="example.json">Export</span>

specifies a button that, when click, allows the user to save
the contents of the scope variable foo.  The dialog that
appears will use "example.json" as the default filename.

This also adds a new dependency, the MIT-licensed
 angular-file-saver service written by Philipp Alferov:

https://alferov.github.io/angular-file-saver/

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/web/js/ui/default/staff/Gruntfile.js
Open-ILS/web/js/ui/default/staff/bower.json
Open-ILS/web/js/ui/default/staff/services/core.js
Open-ILS/web/js/ui/default/staff/services/file.js