From: Mike Rylander Date: Wed, 21 Jul 2021 21:03:33 +0000 (-0400) Subject: LP#1932359 - Move Angular dynamic content to template-able area X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fmiker%2Flp-1932350-angular-dynamic-config;p=working%2FEvergreen.git LP#1932359 - Move Angular dynamic content to template-able area Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/eg2/src/app/core/config.ts b/Open-ILS/src/eg2/src/app/core/config.ts index 83555b1327..517882334e 100644 --- a/Open-ILS/src/eg2/src/app/core/config.ts +++ b/Open-ILS/src/eg2/src/app/core/config.ts @@ -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 { diff --git a/Open-ILS/src/eg2/src/index.html b/Open-ILS/src/eg2/src/index.html index aedc25be1e..a681877cb8 100644 --- a/Open-ILS/src/eg2/src/index.html +++ b/Open-ILS/src/eg2/src/index.html @@ -13,6 +13,6 @@ - + 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 index 0000000000..e087503073 --- /dev/null +++ b/Open-ILS/src/templates/eg2import/angular-config.js.tt2 @@ -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 index e087503073..0000000000 --- a/Open-ILS/web/js/angular-config.js +++ /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 - } - } -} -