LP#1932359 - Move Angular dynamic content to template-able area user/miker/lp-1932350-angular-dynamic-config
authorMike Rylander <mrylander@gmail.com>
Wed, 21 Jul 2021 21:03:33 +0000 (17:03 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 21 Jul 2021 21:03:33 +0000 (17:03 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/eg2/src/app/core/config.ts
Open-ILS/src/eg2/src/index.html
Open-ILS/src/templates/eg2import/angular-config.js.tt2 [new file with mode: 0644]
Open-ILS/web/js/angular-config.js [deleted file]

index 83555b1..5178823 100644 (file)
@@ -1,9 +1,10 @@
-/* Reads content from /js/angular-config.js to make it available as
- * dynamic content to pre-compiled angular components.
+/* Reads content from Open-ILS/src/templates/eg2import/angular-config.js.tt2
+ * and published at https://example.com/eg/eg2import/angular-config.js
+ * to make it available as dynamic content to pre-compiled angular components.
  * Note this is not an Angular Service, since it may need to be
  * accessed before a service-loading class can instantiate its services.
  */
-declare var ANGULAR_CONFIG; // defined in /js/angular-config.js
+declare var ANGULAR_CONFIG; // defined at URL /eg/eg2import/angular-config.js
 
 export class AngularConfig {
 
index aedc25b..a681877 100644 (file)
@@ -13,6 +13,6 @@
   <script src="/js/dojo/opensrf/JSON_v1.js"></script>
   <script src="/js/dojo/opensrf/opensrf.js"></script>
   <script src="/js/dojo/opensrf/opensrf_ws.js"></script>
-  <script src="/js/angular-config.js"></script>
+  <script src="/eg/eg2import/angular-config.js"></script>
 </body>
 </html>
diff --git a/Open-ILS/src/templates/eg2import/angular-config.js.tt2 b/Open-ILS/src/templates/eg2import/angular-config.js.tt2
new file mode 100644 (file)
index 0000000..e087503
--- /dev/null
@@ -0,0 +1,16 @@
+
+const ANGULAR_CONFIG = {
+    catalog: {
+        facets: {
+            display: [
+                {facetClass : 'author',  facetOrder : ['personal', 'corporate']},
+                {facetClass : 'subject', facetOrder : ['topic']},
+                {facetClass : 'identifier', facetOrder : ['genre']},
+                {facetClass : 'series',  facetOrder : ['seriestitle']},
+                {facetClass : 'subject', facetOrder : ['name', 'geographic']}
+            ],
+            displayCount : 5
+        }
+    }
+}
+
diff --git a/Open-ILS/web/js/angular-config.js b/Open-ILS/web/js/angular-config.js
deleted file mode 100644 (file)
index e087503..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-const ANGULAR_CONFIG = {
-    catalog: {
-        facets: {
-            display: [
-                {facetClass : 'author',  facetOrder : ['personal', 'corporate']},
-                {facetClass : 'subject', facetOrder : ['topic']},
-                {facetClass : 'identifier', facetOrder : ['genre']},
-                {facetClass : 'series',  facetOrder : ['seriestitle']},
-                {facetClass : 'subject', facetOrder : ['name', 'geographic']}
-            ],
-            displayCount : 5
-        }
-    }
-}
-