aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/graphs-v2/palette
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-07-29 16:13:45 +0300
committerMichael Lando <ml636r@att.com>2018-07-29 16:20:34 +0300
commit5b593496b8f1b8e8be8d7d2dbcc223332e65a49b (patch)
tree2f9dfc45191e723da69cf74be7829784e9741b94 /catalog-ui/src/app/directives/graphs-v2/palette
parent9200382f2ce7b4bb729aa287d0878004b2d2b4f9 (diff)
re base code
Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5 Issue-ID: SDC-1566 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/directives/graphs-v2/palette')
-rw-r--r--catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts8
-rw-r--r--catalog-ui/src/app/directives/graphs-v2/palette/palette.html2
2 files changed, 6 insertions, 4 deletions
diff --git a/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts b/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
index 9b9235248e..ebc52c241b 100644
--- a/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
+++ b/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
@@ -27,9 +27,10 @@ import {LeftPaletteLoaderService} from "../../../services/components/utils/compo
import {Resource} from "app/models/components/resource";
import {ComponentType} from "app/utils/constants";
import {LeftPaletteMetadataTypes} from "../../../models/components/displayComponent";
+import { IDirectiveLinkFn, IScope } from "angular";
-interface IPaletteScope {
+interface IPaletteScope extends IScope{
components:Array<LeftPaletteComponent>;
currentComponent:Component;
model:any;
@@ -88,7 +89,8 @@ export class Palette implements ng.IDirective {
restrict = 'E';
template = require('./palette.html');
- link = (scope:IPaletteScope, el:JQuery) => {
+ link:IDirectiveLinkFn = (scope:IPaletteScope, el:JQuery) => {
+ this.LeftPaletteLoaderService.loadLeftPanel(scope.currentComponent);
this.nodeHtmlSubstitute = $('<div class="node-substitute"><span></span><img /></div>');
el.append(this.nodeHtmlSubstitute);
this.registerEventListenerForLeftPalette(scope);
@@ -277,7 +279,7 @@ export class Palette implements ng.IDirective {
let filteredResources = [];
angular.forEach(subcategory, function (component:LeftPaletteComponent) {
- let resourceFilterTerm:string = component.searchFilterTerms;
+ let resourceFilterTerm:string = component.searchFilterTerms.toLowerCase();
if (resourceFilterTerm.indexOf(searchText.toLowerCase()) >= 0) {
filteredResources.push(component);
}
diff --git a/catalog-ui/src/app/directives/graphs-v2/palette/palette.html b/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
index a8139e3140..ee0c604ea9 100644
--- a/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
+++ b/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
@@ -26,7 +26,7 @@
data-ng-class="{'default-pointer': isViewOnly}"
data-ng-mouseover="!isViewOnly && onMouseOver(component, $event.currentTarget)"
data-ng-mouseleave="!isViewOnly && onMouseOut(component)"
- data-drag="!isViewOnly"
+ data-drag="!isViewOnly && component.isDraggable"
data-jqyoui-options="{revert: 'invalid', helper:setElementTemplate, appendTo:'body', cursorAt: {left:38, top: 38}, cursor:'move'}"
jqyoui-draggable="{index:{{$index}},animate:true,onStart:'dragStartCallback(component)',onStop:'dragStopCallback()', onDrag:'onDragCallback()'}"
data-ng-repeat="component in components | orderBy: 'displayName' track by $index"