offline: add two more files to Grunt and UpUp for offline SW caching
authorMike Rylander <mrylander@gmail.com>
Tue, 27 Jun 2017 21:22:31 +0000 (17:22 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 27 Jun 2017 21:22:31 +0000 (17:22 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/src/templates/staff/config.tt2
Open-ILS/web/js/ui/default/staff/Gruntfile.js

index 30a34ca..cde8b27 100644 (file)
@@ -35,6 +35,7 @@ UpUp.start({
     '[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-tablesort.js',
     '[% ctx.media_prefix %]/js/ui/default/staff/build/js/lovefield.min.js',
     '[% ctx.media_prefix %]/js/ui/default/staff/build/fonts/glyphicons-halflings-regular.woff',
+    '[% ctx.media_prefix %]/js/ui/default/staff/build/fonts/glyphicons-halflings-regular.woff2',
     '[% ctx.media_prefix %]/js/dojo/opensrf/JSON_v1.js',
     '[% ctx.media_prefix %]/js/dojo/opensrf/opensrf.js',
     '[% ctx.media_prefix %]/js/dojo/opensrf/opensrf_ws.js',
@@ -59,6 +60,7 @@ UpUp.start({
     '[% ctx.media_prefix %]/js/ui/default/staff/services/date.js',
     '[% ctx.media_prefix %]/js/ui/default/staff/services/op_change.js',
     '[% ctx.media_prefix %]/js/ui/default/staff/services/lovefield.js',
+    '[% ctx.media_prefix %]/js/ui/default/staff/services/file.js',
     '[% ctx.media_prefix %]/js/ui/default/staff/offline.js',
     '[% ctx.base_path %]/staff/share/t_alert_dialog',
     '[% ctx.base_path %]/staff/share/t_confirm_dialog',
index c563d7a..5d8b172 100644 (file)
@@ -7,7 +7,7 @@ EVERGREEN_VERSION='0.0.1'
 # compressed build files.  Use this for development and debugging.
 EXPAND_WEB_IMPORTS = 1; 
 
-# path to build files (js, css, fonts)
-WEB_BUILD_PATH = ctx.media_prefix _ '/js/ui/default/staff/build/';
+# path to build files (js, css, fonts). No / at end, because the user supplies it
+WEB_BUILD_PATH = ctx.media_prefix _ '/js/ui/default/staff/build';
 
 %]
index db8590b..099515b 100644 (file)
@@ -57,7 +57,7 @@ module.exports = function(grunt) {
             'node_modules/ngtoast/dist/ngToast-animations.min.css',
             'node_modules/angular-tree-control/css/tree-control.css',
             'node_modules/angular-tree-control/css/tree-control-attribute.css',
-            'node_modules/angular-tablesort/tablesort.css',
+            'node_modules/angular-tablesort/tablesort.css'
           ]
         }]
       },
@@ -72,7 +72,8 @@ module.exports = function(grunt) {
             'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot',
             'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg',
             'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf',
-            'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff'
+            'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff',
+            'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2'
           ]
         }]
       },
@@ -110,7 +111,7 @@ module.exports = function(grunt) {
             'build/css/ngToast.min.css',
             'build/css/ngToast-animations.min.css',
             'build/css/tree-control.css',
-            'build/css/tree-control-attribute.css',
+            'build/css/tree-control-attribute.css'
           ]
         }
       }
@@ -130,7 +131,7 @@ module.exports = function(grunt) {
           rename: function (dst, src) {
             return src.replace('.js', '.min.js');
           }
-        }],
+        }]
       },
       build: {
         src: [
@@ -170,6 +171,7 @@ module.exports = function(grunt) {
             'services/ui.js',
             'services/date.js',
             'services/op_change.js',
+            'services/file.js'
         ],
         dest: 'build/js/<%= pkg.name %>.<%= pkg.version %>.min.js'
       },
@@ -179,7 +181,7 @@ module.exports = function(grunt) {
     // to more easily detect if concat order is incorrect
     concat: {
       options: {
-       separator: ';',
+       separator: ';'
       }
     },
 
@@ -188,19 +190,19 @@ module.exports = function(grunt) {
       // Generate test/data/IDL2js.js for unit tests.
       // note: the output of this script is *not* part of the final build.
       idl2js : {
-        command : 'cd test/data && perl idl2js.pl',
+        command : 'cd test/data && perl idl2js.pl'
       },
 
       // Remove the unit test IDL2js.js file.  We don't need it after testing
       rmidl2js : {
-        command : 'rm test/data/IDL2js.js',
+        command : 'rm test/data/IDL2js.js'
       }
     },
 
     // unit tests configuration
     karma : {
       unit: {
-        configFile: 'test/karma.conf.js',
+        configFile: 'test/karma.conf.js'
         //background: true  // for now, visually babysit unit tests
       }
     }