From ed64b5edff15e702493df21aa3230b81593e6133 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Fri, 9 Jun 2017 03:19:04 +0300 Subject: [SDC-29] catalog 1707 rebase commit. Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando --- .../properties/property-row-directive.ts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts (limited to 'catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts') diff --git a/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts new file mode 100644 index 0000000000..a9ff71cda5 --- /dev/null +++ b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts @@ -0,0 +1,42 @@ +/** + * Created by obarda on 1/8/2017. + */ +'use strict'; + +export interface IPropertyRowDirective extends ng.IScope { + onNameClicked:Function; + isClickable:boolean; +} + +export class PropertyRowDirective implements ng.IDirective { + + constructor() { + + } + + scope = { + property: '=', + instanceName: '=', + instanceId: '=', + instancePropertiesMap: '=', + onNameClicked: '&', + onCheckboxClicked: '&' + }; + + restrict = 'E'; + replace = true; + template = ():string => { + return require('./property-row-view.html'); + }; + + link = (scope:IPropertyRowDirective, element:any, $attr:any) => { + scope.isClickable = $attr.onNameClicked ? true : false; + }; + + public static factory = ()=> { + return new PropertyRowDirective(); + }; + +} + +PropertyRowDirective.factory.$inject = []; -- cgit 1.2.3-korg