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>
Mon, 25 Jan 2016 23:30:48 +0000 (18:30 -0500)
commitf532e8e68cb75638a8de450df4f181a03e8e1a23
treec4a862bb3b6e9fce380cb71f94539c5b5347704f
parent5a597e257da15b2712a12687229370568e7cfab9
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