Repository: brooklyn-ui Updated Branches: refs/heads/master bf3477bfd -> 43c154c39
Apply naming convention for templates used with $templateCache This is using the following: <module-id>/(component|view)/<component-id>/<template-id>.html Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/fd169a7b Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/fd169a7b Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/fd169a7b Branch: refs/heads/master Commit: fd169a7bea1c9ac9b35f9e9f6cdc4a7b6f9a15d3 Parents: bf3477b Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Authored: Wed Nov 7 09:39:34 2018 +0000 Committer: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Committed: Wed Nov 7 11:38:53 2018 +0000 ---------------------------------------------------------------------- .../catalog-selector.directive.js | 8 ++----- .../catalog-selector.template.html | 4 ++-- .../spec-editor/spec-editor.template.html | 24 ++++++++++---------- 3 files changed, 16 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/fd169a7b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js ---------------------------------------------------------------------- diff --git a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js index b8b3bc6..9e8774b 100644 --- a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js +++ b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js @@ -411,12 +411,8 @@ function controller($scope, $element, $timeout, $q, $uibModal, $log, $templateCa // it is used by catalogSelectorFiltersFilter; $scope.filterPaletteItemsForMode = (items) => items; - // downstream can override this to insert lines below the header - $scope.customSubHeadTemplateName = 'composer-palette-empty-sub-head'; - $templateCache.put($scope.customSubHeadTemplateName, ''); - - $scope.customFooterTemplateName = 'composer-palette-default-footer'; - $templateCache.put($scope.customFooterTemplateName, footerTemplate); + $templateCache.put('blueprint-composer/component/catalog-selector/subhead.html', ''); + $templateCache.put('blueprint-composer/component/catalog-selector/footer.html', footerTemplate); // allow downstream to configure this controller and/or scope (composerOverrides.configurePaletteController || function() {})(this, $scope, $element); http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/fd169a7b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.template.html ---------------------------------------------------------------------- diff --git a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.template.html b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.template.html index 3b6eaa3..5b4ddb9 100644 --- a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.template.html +++ b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.template.html @@ -92,7 +92,7 @@ </ul> </span> </div> - <ng-include src="customSubHeadTemplateName"/> + <ng-include src="blueprint-composer/component/catalog-selector/subhead.html"/> </div> </div> @@ -146,7 +146,7 @@ <div class="catalog-palette-footer"> <div uib-pagination total-items="searchedItems.length" items-per-page="pagination.itemsPerPage" ng-model="pagination.page" boundary-link-numbers="true" rotate="false" max-size="4" ng-show="searchedItems.length > pagination.itemsPerPage" class="pagination-sm pull-right"></div> - <ng-include src="customFooterTemplateName"/> + <ng-include src="blueprint-composer/component/catalog-selector/footer.html"/> </div> </div> </div> http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/fd169a7b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html ---------------------------------------------------------------------- diff --git a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html index 937bbaa..8dec82b 100644 --- a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html +++ b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html @@ -309,7 +309,7 @@ class="open-entity-spec" title="Open in spec editor" ng-focus="specEditor.recordFocus(item)"></a> - <ng-include src="'AdjunctTemplate.html'"></ng-include> + <ng-include src="'blueprint-composer/component/spec-editor/adjunct.html'"></ng-include> </div> <a ng-if="!config[item.name][REPLACED_DSL_ENTITYSPEC]" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'spec', configKey: item.name})" class="no-spec"> (no spec set) @@ -341,8 +341,8 @@ </br-collapsible> <!-- ENTITY LOCATION --> -<ng-include src="'SpecEditorLocationSection.html'"></ng-include> -<script type="text/ng-template" id="SpecEditorLocationSection.html"> +<ng-include src="'blueprint-composer/component/spec-editor/section-locations.html'"></ng-include> +<script type="text/ng-template" id="blueprint-composer/component/spec-editor/section-locations.html"> <br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.location.open"> <heading> Location @@ -371,8 +371,8 @@ </script> <!-- ENTITY POLICIES --> -<ng-include src="'SpecEditorPoliciesSection.html'"></ng-include> -<script type="text/ng-template" id="SpecEditorPoliciesSection.html"> +<ng-include src="'blueprint-composer/component/spec-editor/section-policies.html'"></ng-include> +<script type="text/ng-template" id="blueprint-composer/component/spec-editor/section-policies.html"> <br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.policy.open"> <heading> Policies @@ -400,15 +400,15 @@ <div ng-repeat="adjunct in filteredPolicies = (model.getPoliciesAsArray() | specEditorType:state.policy.search) track by adjunct._id" class="spec-policy spec-adjunct"> <a ui-sref="main.graphical.edit.policy({entityId: model._id, policyId: adjunct._id})"></a> - <ng-include src="'AdjunctTemplate.html'"></ng-include> + <ng-include src="'blueprint-composer/component/spec-editor/adjunct.html'"></ng-include> </div> </div> </br-collapsible> </script> <!-- ENTITY ENRICHERS --> -<ng-include src="'SpecEditorEnrichersSection.html'"></ng-include> -<script type="text/ng-template" id="SpecEditorEnrichersSection.html"> +<ng-include src="'blueprint-composer/component/spec-editor/section-enrichers.html'"></ng-include> +<script type="text/ng-template" id="blueprint-composer/component/spec-editor/section-enrichers.html"> <br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.enricher.open"> <heading> Enrichers @@ -436,14 +436,14 @@ <div ng-repeat="adjunct in filteredEnrichers = (model.getEnrichersAsArray() | specEditorType:state.enricher.search) track by adjunct._id" class="spec-enricher spec-adjunct"> <a ui-sref="main.graphical.edit.enricher({entityId: model._id, enricherId: adjunct._id})"></a> - <ng-include src="'AdjunctTemplate.html'"></ng-include> + <ng-include src="'blueprint-composer/component/spec-editor/adjunct.html'"></ng-include> </div> </div> </br-collapsible> </script> -<ng-include src="'SpecEditorOtherSections.html'"></ng-include> -<script type="text/ng-template" id="SpecEditorOtherSections.html"> +<ng-include src="'blueprint-composer/component/spec-editor/section-others.html'"></ng-include> +<script type="text/ng-template" id="blueprint-composer/component/spec-editor/section-others.html"> </script> @@ -494,7 +494,7 @@ <!--TYPEAHEAD TEMPLATE :: END--> <!--ADJUNCT TEMPLATE :: START--> -<script type="text/ng-template" id="AdjunctTemplate.html"> +<script type="text/ng-template" id="blueprint-composer/component/spec-editor/adjunct.html"> <div class="media" ng-class="{'has-issues': adjunct.hasIssues()}"> <div class="media-left media-middle"> <img ng-src="{{adjunct.icon}}" alt="{{adjunct | entityName}} logo" class="media-object" />