summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/inputs-and-properties/properties
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /catalog-ui/src/app/directives/inputs-and-properties/properties
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/directives/inputs-and-properties/properties')
-rw-r--r--catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-directive.ts42
-rw-r--r--catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.html26
-rw-r--r--catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.less35
3 files changed, 103 insertions, 0 deletions
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 = [];
diff --git a/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.html b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.html
new file mode 100644
index 0000000000..ff82a8b685
--- /dev/null
+++ b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.html
@@ -0,0 +1,26 @@
+<div class="property-row flex-container">
+ <div class="flex-item text property-name-container">
+ <span class="title-blue-text property-name-text " data-ng-class="{'hand': isClickable}" data-tests-id="propertyName" data-ng-click="onNameClicked(property)" tooltips tooltip-content="{{property.name}}">{{property.name}}</span>
+ </div>
+ <div class="flex-item text property-name-container">
+ <span class="text instance-name-text" data-tests-id="instanceName" tooltips tooltip-content="{{instanceName}}">{{instanceName}}</span>
+ </div>
+ <div class="type-schema-container">
+ <div class="text">
+ <span tooltips tooltip-content="propertyName_{{property.type}}" data-tests-id="propertyType">{{property.type}}</span>
+ </div>
+ </div>
+ <div class="type-schema-container">
+ <div class="text">
+ <span tooltips tooltip-content="{{property.schema.property.type}}" data-tests-id="propertySchema">{{property.schema.property.type}} </span>
+ </div>
+ </div>
+ <sdc-checkbox ng-if="instancePropertiesMap"
+ class="property-check-box"
+ disabled="property.isAlreadySelected || isViewOnly"
+ sdc-checklist-model="instancePropertiesMap[instanceId]"
+ sdc-checklist-value="property"
+ sdc-checklist-change="onCheckboxClicked()"
+ data-tests-id="propertyCheckbox_{{property.name}}"
+ data-ng-click=" $event.stopPropagation()"></sdc-checkbox>
+</div>
diff --git a/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.less b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.less
new file mode 100644
index 0000000000..e25427bda2
--- /dev/null
+++ b/catalog-ui/src/app/directives/inputs-and-properties/properties/property-row-view.less
@@ -0,0 +1,35 @@
+.property-row {
+ border-bottom: 1px solid @border_color_d;
+ padding-left: 10px;
+ .property-name-container {
+ display: flex;
+ flex-grow: 3;
+ }
+
+ .type-schema-container {
+ flex-grow: 2;
+ border-left: 1px solid @border_color_d;
+ text-align: left;
+ line-height: 30px;
+ text-transform: capitalize;
+ width: 10px;
+ }
+
+ .property-check-box {
+ padding-right: 10px;
+ margin-top: 9px;
+ }
+}
+
+.property-row:hover {
+ background-color: @func_color_r;
+}
+
+&.expanded {
+ .flex-container {
+ .expand-collapse-inputs-table-icon {
+ transform: rotate(180deg);
+ left: 0px;
+ }
+ }
+}