Yangman - add yang form - operational 96/39696/5
authorDaniel Malachovsky <dmalacho@cisco.com>
Thu, 14 Jul 2016 16:43:32 +0000 (18:43 +0200)
committerDaniel Malachovsky <dmalacho@cisco.com>
Mon, 18 Jul 2016 13:48:11 +0000 (15:48 +0200)
Change-Id: I76024a834fc93fb55254cf7c28595d3de44f087d
Signed-off-by: Daniel Kuzma -X (dakuzma - PANTHEON TECHNOLOGIES at Cisco) <dakuzma@cisco.com>
Signed-off-by: Daniel Malachovsky <dmalacho@cisco.com>
16 files changed:
modules/yangman-resources/src/main/resources/yangman/directives/yang-form-menu.directive.js
modules/yangman-resources/src/main/resources/yangman/views/directives/yang-form-menu.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/config/leaf-list.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/config/list.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/list-data-top.tpl.html [moved from modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/config/list-data-top.tpl.html with 81% similarity]
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/case.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/choice.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/container.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/input.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/leaf-list.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/leaf.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/list-data-top.tpl.html [deleted file]
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/list.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/output.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/rpc.tpl.html
modules/yangman-resources/src/main/resources/yangman/yangman.filters.js

index 718e8767bae6815b13d459be5e90360366e4b373..59d646ac3c93fd1e9f912f0e55126478b81ce610 100644 (file)
@@ -15,7 +15,8 @@ define(['angular'], function (angular) {
                 allowItems: '=',
                 isActionMenu: '&',
                 isNodeInfo: '&',
-                addListItem: '&',
+                addListItemFunc: '&',
+                addListItem: '=',
                 yangForm: '=',
                 yangList: '=',
             },
index ff7f6766fa59f7ee9e8e84bc46b62e6185c0d979..ec5ff3ea260f7d93eafbb285e11eb3e974eb17d2 100644 (file)
@@ -32,8 +32,8 @@
         </md-menu-item>
 
         <!-- add list item -->
-        <md-menu-item ng-if="yangList">
-            <md-button ng-click="addListItem()">
+        <md-menu-item ng-if="addListItem">
+            <md-button ng-click="addListItemFunc()">
                 <md-icon md-font-set="material-icons">library_add</md-icon>
                 <span md-menu-align-target>{{'YANGMAN_ADD_LIST_ITEM' | translate}}</span>
             </md-button>
index c2a3bf91c94a9e4b19e4a6c2f8e5416f0a2a14ff..1259b045e4383d8f8de330d5e518606f98a0246f 100644 (file)
@@ -20,8 +20,8 @@
         <yang-form-menu is-action-menu="yangLeafList.isActionMenu()"
                         augmentations="augmentations"
                         is-node-info="yangLeafList.isNodeInfo()"
-                        add-list-item="yangLeafList.addListElem()"
-                        is-add-list-item="true"
+                        add-list-item-func="yangLeafList.addListElem()"
+                        add-list-item="true"
                         node="node"></yang-form-menu>
     </div>
 
index 941fbc60758eac90ba89081cb7c56811de052bc8..41d513a2a0a9907f77e686df508ede7b1c6ad5e5 100644 (file)
@@ -22,7 +22,8 @@
         <yang-form-menu is-action-menu="yangList.isActionMenu()"
                         augmentations="augmentations"
                         is-node-info="yangList.isNodeInfo()"
-                        add-list-item="yangList.addListElem()"
+                        add-list-item-func="yangList.addListElem()"
+                        add-list-item="true"
                         yang-form="yangForm"
                         yang-list="yangList"
                         node="node"></yang-form-menu>
@@ -32,7 +33,7 @@
         <section layout="row"
                  layout-align="start center"
                  class="yangmanModule__right-panel__form__list__paginator"
-                 ng-include="yangForm.viewPath + '/config/list-data-top.tpl.html'"
+                 ng-include="yangForm.viewPath + '/list-data-top.tpl.html'"
                  ng-if="!(node.filteredListData && node.filteredListData.length)"></section>
 
         <div class="listItemWrapper"
similarity index 81%
rename from modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/config/list-data-top.tpl.html
rename to modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/list-data-top.tpl.html
index 1ac00eb92f06812f1b0d55d38545d8b6ac40f819..5837b36d6076ab9c1aa8964d48bd222fe9dca144 100644 (file)
@@ -1,7 +1,6 @@
 <!-- Previous button -->
-<button ng-click="yangList.shiftDisplayPrev()"
-        ng-show="yangList.showPrevButton()">
-    <md-icon class="material-icons">arrow_back</md-icon>
+<button ng-click="yangList.shiftDisplayPrev()">
+    <md-icon class="material-icons">{{yangList.showPrevButton() ? 'arrow_back' : ''}}</md-icon>
     <md-tooltip md-direction="top">{{ 'LIST_PREV_ITEM' | translate }}</md-tooltip>
 </button>
 
     <!-- remove button -->
     <md-icon md-font-set="material-icons"
              class="pointer"
-             ng-click="yangList.removeListElem(yangList.currentDisplayIndex + offset,false)">
+             ng-click="yangList.removeListElem(yangList.currentDisplayIndex + offset,false)"
+             ng-if="selectedDatastore.label === 'config'">
         <md-tooltip md-direction="top">{{ 'LIST_DELETE_ITEM' | translate }}</md-tooltip>
         remove_circle_outline
     </md-icon>
 
     <!-- duplicated key -->
-    <md-icon md-font-set="material-icons" ng-show="node.doubleKeyIndexes.indexOf(yangList.currentDisplayIndex + offset) > -1">
+    <md-icon md-font-set="material-icons"
+             ng-show="node.doubleKeyIndexes.indexOf(yangList.currentDisplayIndex + offset) > -1"
+             ng-if="selectedDatastore.label === 'config'">
         <md-tooltip md-direction="top">{{ 'LIST_INDEX_DUPLICATE' | translate }}</md-tooltip>
         error_outline
     </md-icon>
index 7ffd8e869734af0fbd4f770dcb1362a4adccdd0f..e36a08120be1d9a87d5ccf9fafa530330a8d4cb4 100644 (file)
@@ -1,7 +1,5 @@
-<div ng-controller="CaseCtrl" ng-show="case.isFilled() && !empty">
-    <!-- Augmentation control -->
-    <div ng-controller="AugmentationModalCtrl" ng-init="init(case)" class="modalWrapper" ng-if="case.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-    <span ng-if="case.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_CASE_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-    <!-- Augmentation control end -->
-    <div ng-repeat="node in case.getChildren(null,null,constants.NODE_UI_DISPLAY) | filter:filterNodes" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'" ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded"></div>
+<div ng-controller="CaseCtrl as yangCase" ng-show="case.isFilled() && yangCase.empty">
+    <!-- case's children -->
+    <div ng-repeat="node in case.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+         ng-include="yangForm.viewPath + '/operational/' + node.type + '.tpl.html'"></div>
 </div>
\ No newline at end of file
index a92023361ded985ca7890dfbdc7cdd27743a9837..cc94047670b210d9b22ce46bf98fd49963a35a07 100644 (file)
@@ -1,17 +1,37 @@
-<div ng-controller="ChoiceCtrl" class="customContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_ELEM' | translate }}" ng-click='toggleExpanded()'></button>
-        <span>{{yangForm.getNodeName(node.localeLabel, node.label)}}</span>
-        <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-        <!-- Augmentation control -->
-        <div class="modalWrapper" ng-if="node.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-        <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-        <!-- Augmentation control end -->
-        <span><strong>{{node.choice.label}}</strong></span>
-    </div>
+<div ng-controller="ChoiceCtrl as yangChoice"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- choice title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element" ng-click="yangChoice.toggleExpanded()">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
 
-    <div ng-repeat="case in node.getChildren(null,null,constants.NODE_UI_DISPLAY) | filter:filterNodes" ng-include="currentPath+'/operational/'+case.type+'.tpl.html'" ng-show="node.choice.id === case.id && node.expanded" ng-if="!(case.augmentationId && !augmentations.getAugmentation(case.parent, case.augmentationId).expanded)"></div>
+        <!-- Choice label -->
+        <p class="top-element" ng-click="yangChoice.toggleExpanded()"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangChoice.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangChoice.isNodeInfo()"
+                        node="node"></yang-form-menu>
+
+        <!-- Choice select -->
+        <md-input-container>
+            <input ng-model="node.choice.label" ng-disabled="true">
+        </md-input-container>
+    </div>
 
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
-<div>
\ No newline at end of file
+    <!-- choice's children -->
+    <div ng-repeat="case in node.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+         ng-include="yangForm.viewPath + '/operational/' + case.type +'.tpl.html'"
+         ng-show="node.choice.id === case.id && node.expanded"
+         ng-if="!(case.augmentationId && !augmentations.getAugmentation(case.parent, case.augmentationId).expanded)"></div>
+</div>
\ No newline at end of file
index 1b3daf6ed3b0c920a437e9ea1d825e6c1d956627..54385dfc169780d2cd28f1a0a07d820e3c99f5bd 100644 (file)
@@ -1,21 +1,36 @@
-<div ng-controller="ContainerCtrl" class="customContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-if="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_CON' | translate }}" ng-click='toggleExpanded()'></button>
-        <button class="btn-name btn-slim">
-            {{yangForm.getNodeName(node.localeLabel, node.label)}}
-        </button>
-        <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
+<div ng-controller="ContainerCtrl as yangContainer"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label"
+         ng-click="yangContainer.toggleExpanded()">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
+
+        <!-- Container label -->
+        <p class="top-element"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangContainer.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangContainer.isNodeInfo()"
+                        node="node"></yang-form-menu>
 
-        <!-- Augmentation control -->
-        <div class="modalWrapper" ng-if="node.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-        <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-        <!-- Augmentation control end -->
     </div>
 
+    <!-- container's children -->
     <div ng-if="node.expanded">
-        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY) | filter:filterNodes" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'" ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded"></div>
+        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+             ng-include="yangForm.viewPath + '/operational/' + node.type+'.tpl.html'"
+             ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
+        </div>
     </div>
-
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
 </div>
\ No newline at end of file
index f0c343e179edaf57ebdacb0a143057c29c0ad554..09f071c5c19912db857f46454ed62aa2ba3beaf2 100644 (file)
@@ -1,22 +1,36 @@
-<div ng-controller="InputCtrl" class="customContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_ELEM' | translate }}" ng-click='toggleExpanded()'></button>
-        <span>
-            <b>{{yangForm.getNodeName(node.localeLabel, node.label)}}</b>
-            <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-            <!-- Augmentation control -->
-            <div class="modalWrapper" ng-if="node.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-            <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-            <!-- Augmentation control end -->
-        </span>
+<div ng-controller="InputCtrl as yangInput"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label"
+         ng-click="yangInput.toggleExpanded()">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
+
+        <!-- Container label -->
+        <p class="top-element"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangInput.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangInput.isNodeInfo()"
+                        node="node"></yang-form-menu>
+
     </div>
 
-    <div ng-show="node.expanded">
-        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'" ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
+    <!-- output's children -->
+    <div ng-if="node.expanded">
+        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+             ng-include="yangForm.viewPath + '/operational/' + node.type+'.tpl.html'"
+             ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
         </div>
     </div>
-
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
-
 </div>
\ No newline at end of file
index 097bd59075eb117a4bae6edff1c83fee715c116a..7b528c931c2ccf960f4e9c37655c25330f50e640 100644 (file)
@@ -1,17 +1,34 @@
-<div ng-controller="LeafListCtrl" class="customContainer leaflist  {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_ELEM' | translate }}" ng-click='toggleExpanded()'></button>
-        <button class="btn-name ng-scope btn-slim">
-            {{yangForm.getNodeName(node.localeLabel, node.label)}}
-        </button>
-        <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-        <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-    </div>
+<div ng-controller="LeafListCtrl as yangLeafList"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element" ng-click="yangLeafList.toggleExpanded()">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
 
-    <div class="leafListValue" ng-repeat="elem in node.value" ng-show="node.expanded">
-        <span class="block"><strong>{{elem.value}}</strong></span>
+        <!-- Container label -->
+        <p class="top-element" ng-click="yangLeafList.toggleExpanded()"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangLeafList.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangLeafList.isNodeInfo()"
+                        node="node"></yang-form-menu>
     </div>
 
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
+    <div ng-repeat="elem in node.value" ng-show="node.expanded">
+        <!-- Leaf list values -->
+        <md-input-container md-no-float  class="input-icon-container">
+            <!-- input -->
+            <input ng-model="elem.value" ng-disabled="true">
+        </md-input-container>
+    </div>
 </div>
\ No newline at end of file
index bcd8106a70e0cab7e5ea41eb038a2de993c94c7b..4ea5b900467d50b7da9bdbb4dc023e5025b82378 100644 (file)
@@ -1,11 +1,22 @@
-<div class="leaf" ng-controller="LeafCtrl" ng-show='node.isFilled()'>
-    <span class="treeBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-    <span class="leaf-label col-md-2">
-        {{yangForm.getNodeName(node.localeLabel, node.label)}}
-        <i ng-if="node.isKey()" class="icon-key" tooltip="{{'key of '+node.parent.label+' list'}}"></i>
-        <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-        <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-    </span>
-    <span class="leaf-label col-md-9"><strong>{{node.value}}</strong></span>
-    <div class="clear"></div>
+<div ng-controller="LeafCtrl as yanfLeaf"
+     layout="row"
+     layout-align="start center"
+     class="yangmanModule__right-panel__form__leaf-container"
+     ng-show="node.isFilled()">
+
+    <!-- Container label -->
+    <p class="top-element"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+    <!-- Action menu -->
+    <yang-form-menu is-action-menu="yanfLeaf.isActionMenu()"
+                    augmentations="augmentations"
+                    is-node-info="yanfLeaf.isNodeInfo()"
+                    node="node"></yang-form-menu>
+
+    <!-- Empty placeholder for better look -->
+    <div class="menu-placeholder" ng-if="!yanfLeaf.isActionMenu() && !yanfLeaf.isNodeInfo()"></div>
+
+    <md-input-container>
+        <input ng-model="node.value" ng-disabled="true">
+    </md-input-container>
 </div>
\ No newline at end of file
diff --git a/modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/list-data-top.tpl.html b/modules/yangman-resources/src/main/resources/yangman/views/rightpanel/form/operational/list-data-top.tpl.html
deleted file mode 100644 (file)
index 93e7c3d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<button ng-click="shiftDisplayPrev()" ng-show="showPrevButton()" tooltip="{{ 'LIST_PREV_ITEM' | translate }}" class="yangButton iconPrev"></button>
-<div class="listButtonWrapper" ng-repeat="offset in displayOffsets" ng-if="currentDisplayIndex + offset > -1 && node.listData.length > currentDisplayIndex + offset">
-    <button  class="btn btn-like-tab {{ (currentDisplayIndex + offset === node.actElemIndex ? 'btn-selected':'') }}" ng-click="node.changeActElementData(currentDisplayIndex + offset)" tooltip="{{getListName(offset, false).tooltip}}">
-        {{yangForm.getNodeName(node.localeLabel, node.label)}}&nbsp;{{ getListName(offset, false).name }}
-    </button>
-</div>
-<button ng-click="shiftDisplayNext('listData')"  ng-show="showNextButton('listData')" tooltip="{{ 'LIST_NEXT_ITEM' | translate }}" class="yangButton iconNext"></button>
\ No newline at end of file
index 818d7abf436024091726a1efd698e84ca4360501..bf4af2e95789817acf31c594ff9c2bd5ba2959a9 100644 (file)
@@ -1,54 +1,52 @@
-<div ng-controller="ListCtrl" class="customContainer listContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-if="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_LIST' | translate }}" ng-click='toggleExpanded()'></button>
-        <button class="btn-slim btn-name inlineBlock">
-            {{yangForm.getNodeName(node.localeLabel, node.label)}}&nbsp;{{ 'YANGUI_LIST_LABEL' | translate }}
-        </button>
-        <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-
-        <!-- Augmentation control -->
-        <div class="modalWrapper" ng-if="node.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-        <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-        <!-- Augmentation control end -->
-
-        <div class="modalWrapper">
-            <button ng-click="showModalWin()" ng-show="node.listData.length > 0  && !showModal" tooltip="{{ 'LIST_SHOW_ALL' | translate }}" class="yangButton iconList"></button>
-            <div class="listModal simpleContainer listFilterWindow" ng-if="showModal && node.listData.length > 0">
-                <button class="yangButton iconListBck inlineBlock iconFilterOver" ng-click="showModalWin()"></button>
-                <div class="leaf ng-scope">
-                    <span class="leaf-label list-title">{{ 'YANGUI_LIST_OF_NODES' | translate }}</span>
-                    <button class="yangButton icon-remove close" ng-click="showModalWin()"></button>
-                </div>
-                <div class="listWrapper">
-                    <ul>
-                        <li ng-repeat="_ in node.listData" class="pl30">
-                            <button class="yangButton iconView" ng-if="[currentDisplayIndex, currentDisplayIndex + 1, currentDisplayIndex - 1].indexOf($index) !== -1"></button>
-                            <button class="btn btn-like-tab {{ (node.actElemIndex === $index ? 'btn-selected':'') }} {{ ((node.doubleKeyIndexes.indexOf($index)>-1) ? 'btn-red':'') }}" style="margin-right: 5px" ng-click="node.changeActElementData($index)">
-                                {{yangForm.getNodeName(node.localeLabel, node.label)}}&nbsp;{{node.createListName($index)}}
-                            </button>
-                        </li>
-                    </ul>
-                </div>
-            </div>
-        </div>
-
-        <ng-include src="currentPath+'/filter.tpl.html'"></ng-include>
+<div ng-controller="ListCtrl as yangList"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="container-label">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element pointer" ng-click="yangList.toggleExpanded()">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
+
+        <!-- list label -->
+        <p class="top-element pointer list-label" ng-click="yangList.toggleExpanded()">
+            {{yangForm.getNodeName(node.localeLabel, node.label)}}
+        </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangList.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangList.isNodeInfo()"
+                        yang-form="yangForm"
+                        yang-list="yangList"
+                        node="node"></yang-form-menu>
+
+        <!--<ng-include src="currentPath+'/filter.tpl.html'"></ng-include>-->
+
+        <section layout="row"
+                 layout-align="start center"
+                 class="yangmanModule__right-panel__form__list__paginator"
+                 ng-include="yangForm.viewPath + '/list-data-top.tpl.html'"
+                 ng-if="!(node.filteredListData && node.filteredListData.length)"></section>
+
+        <div class="listItemWrapper"
+             ng-include="yangForm.viewPath + '/config/list-filtered-data-top.tpl.html'"
+             ng-if="(node.filteredListData && node.filteredListData.length)"></div>
 
-        <div class="listItemWrapper" ng-include="currentPath+'/operational/list-data-top.tpl.html'" ng-if="!(node.filteredListData && node.filteredListData.length)"></div>
-        <div class="listItemWrapper" ng-include="currentPath+'/operational/list-filtered-data-top.tpl.html'" ng-if="(node.filteredListData && node.filteredListData.length)"></div>
     </div>
 
-    <!-- <button ng-repeat="_ in node.listData" class="btn btn-orange {{ (node.actElemIndex === $index ? 'btn-selected':'') }} {{ ((node.doubleKeyIndexes.indexOf($index)>-1) ? 'btn-red':'') }} add-row ng-scope btn-slim" style="margin-right: 5px" ng-click="node.changeActElementData($index)">
-        {{node.localeLabel | translate}}&nbsp;{{node.createListName($index)}}
-    </button> -->
-
-    <div ng-if="node.actElemStructure" ng-show="node.expanded"><!-- class="simpleContainer"  -->
-        <div ng-repeat="node in node.actElemStructure.getChildren(null,null,constants.NODE_UI_DISPLAY) | filter:filterNodes" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'" ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded" >
-            <div class="clear"></div>
+    <!-- list's children -->
+    <div ng-if="node.actElemStructure" ng-show="node.expanded">
+        <div ng-repeat="node in node.actElemStructure.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+             ng-include="yangForm.viewPath + '/operational/' + node.type+'.tpl.html'"
+             ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
         </div>
     </div>
-
-
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
 </div>
+
index 287dc896384bd5783c4281d28f72ca27d678d029..13e3ac48e2b6efcd5ef17c9c5fb2d57e3572856d 100644 (file)
@@ -1,22 +1,36 @@
-<div ng-controller="OutputCtrl" class="customContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet containerBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_ELEM' | translate }}" ng-click='toggleExpanded()'></button>
-        <span>
-            <b>{{yangForm.getNodeName(node.localeLabel, node.label)}}</b>
-            <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-            <!-- Augmentation control -->
-            <div class="modalWrapper" ng-if="node.augmentionGroups.length" ng-include src="currentPath + 'modal/augmentation-modal.tpl.html'"></div>
-            <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-            <!-- Augmentation control end -->
-        </span>
+<div ng-controller="OutputCtrl as yangOutput"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label"
+         ng-click="yangOutput.toggleExpanded()">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
+
+        <!-- Container label -->
+        <p class="top-element"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangOutput.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangOutput.isNodeInfo()"
+                        node="node"></yang-form-menu>
+
     </div>
 
-    <div ng-show="node.expanded">
-        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'" ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
+    <!-- output's children -->
+    <div ng-if="node.expanded">
+        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+             ng-include="yangForm.viewPath + '/operational/' + node.type+'.tpl.html'"
+             ng-hide="node.augmentationId && !augmentations.getAugmentation(node.parent, node.augmentationId).expanded">
         </div>
     </div>
-
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
-
 </div>
\ No newline at end of file
index 472b4e4ff1bdc1cc55cdf980301dd50388be7265..3ba957df7db7c7d1a1371f9db49cc5ba4b197e64 100644 (file)
@@ -1,18 +1,34 @@
-<div ng-controller="RpcCtrl" class="customContainer {{ node.expanded ? '' : 'withoutBorder' }}" ng-show='node.isFilled()'>
-    <div class="topContainerPart">
-        <span class="treeBullet" ng-show="node !== selSubApi.node">&#8226;</span>
-        <button class="yangButton {{ node.expanded ? 'iconArrowDown' : 'iconArrowRight' }} inlineBlock" tooltip="{{ 'SHOW_HIDE_ELEM' | translate }}" ng-click='toggleExpanded()'></button>
-        <span>
-            <b>{{yangForm.getNodeName(node.localeLabel, node.label)}}</b>
-            <button ng-if="node.getChildren('description', null, null, 'label').length > 0" class="yangButton iconQuestion inlineBlock" tooltip="{{node.getChildren('description', null, null, 'label')[0]}}" ></button>
-            <span ng-if="node.augmentationId" class="augmentIcon reversed" tooltip="{{ 'YANGUI_IS_AUGMENT' | translate }} {{ node.augmentationId }}">A</span>
-        </span>
-    </div>
+<div ng-controller="RpcCtrl as yangRpc"
+     class="yangmanModule__right-panel__form__element-container"
+     ng-class="{'expanded' : node.expanded}"
+     ng-show="node.isFilled()">
+
+    <!-- container title -->
+    <div layout="row"
+         layout-align="start center"
+         class="pointer container-label"
+         ng-click="yangRpc.toggleExpanded()">
+
+        <!-- Expand Icon -->
+        <md-icon md-font-set="material-icons" class="top-icon top-element">
+            <md-tooltip md-direction="left">{{ 'SHOW_HIDE_CON' | translate }}</md-tooltip>
+            {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
+        </md-icon>
+
+        <!-- Container label -->
+        <p class="top-element"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
+
+        <!-- Action menu -->
+        <yang-form-menu is-action-menu="yangRpc.isActionMenu()"
+                        augmentations="augmentations"
+                        is-node-info="yangRpc.isNodeInfo()"
+                        node="node"></yang-form-menu>
 
-    <div ng-show="node.expanded">
-        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)" ng-include="currentPath+'/operational/'+node.type+'.tpl.html'">
-        </div>
     </div>
 
-    <i class="icon-caret-down borderArrow" ng-show="node.expanded"></i>
+    <!-- Rpc's children -->
+    <div ng-if="node.expanded">
+        <div ng-repeat="node in node.getChildren(null,null,constants.NODE_UI_DISPLAY)"
+             ng-include="yangForm.viewPath + '/operational/' + node.type + '.tpl.html'"></div>
+    </div>
 </div>
\ No newline at end of file
index 65f916fe9c2aae387c4b4b5f36bd6911a1f6eb3d..f19e9787c8ef2c29eb0c8b0aa52fb54f3c26652e 100644 (file)
@@ -1,4 +1,4 @@
-define([], function (yangman) {
+define([], function () {
     'use strict';
 
     angular.module('app.yangman').filter('ymOnlyConfigElem', YmOnlyConfigElemFilter);