summaryrefslogtreecommitdiffstats
path: root/portal-FE-common
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-07-31 02:43:49 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-31 02:43:49 +0000
commite7a0c4cec1827c7e925c73a120495dc0cf5e2562 (patch)
treea6dfc3952a3dd9ecbfbac7f94329d2739b547e05 /portal-FE-common
parent5c78f3ea73a0a8f2ad1904ebe79aa3ef9e936e4c (diff)
parent2b783041f85d9b0a29f2b6983c1466b2f7057914 (diff)
Merge "Edit Functional Menu is not working"
Diffstat (limited to 'portal-FE-common')
-rw-r--r--portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html4
-rw-r--r--portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts73
2 files changed, 38 insertions, 39 deletions
diff --git a/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html b/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html
index d898563b..54df2d12 100644
--- a/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html
+++ b/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html
@@ -40,7 +40,7 @@
<h1 class="heading-page">Edit Functional Menu</h1>
</div>
<div id="jqTree"></div>
- <div class="functional-admin-button-container">
+ <!-- <div class="functional-admin-button-container">
<button id="regenrate-functionalmenu-btn"
class="btn btn-alt btn-small"
(click)="regenerateFunctionalMenuAncestors()">Regenerate Menu
@@ -48,5 +48,5 @@
<div class="regenerate-functionalmenu-btn-txt">
<span class="n16r">Click when you are done with your changes.</span>
</div>
- </div>
+ </div> -->
</div>
diff --git a/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts b/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts
index d3b5a164..c231061d 100644
--- a/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts
+++ b/portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts
@@ -151,43 +151,42 @@ export class FunctionalMenuComponent implements OnInit {
* @param ngbModal
*/
buildTree(treedataarray,ngbModal: NgbModal , _self){
- //console.log("treedataarray>>>>",treedataarray);
- // $(function() {
- // $('#jqTree').tree('loadData', treedataarray);
- // $('#jqTree').tree({
- // data: treedataarray,
- // autoOpen: false,
- // dragAndDrop: true,
- // onCreateLi: function(node, $li) {
- // ////console.log("node >>",node);
- // }
- // }).on(
- // 'tree.contextmenu',
- // function(event:any) {
- // // The clicked node is 'event.node'
- // var node = event.node;
- // openMenuDetailsModal(node, "view");
- // }
- // );
+ console.log("treedataarray>>>>",treedataarray);
+ $(function() {
+ (<any>$('#jqTree')).tree('loadData', treedataarray);
+ (<any>$('#jqTree')).tree({
+ data: treedataarray,
+ autoOpen: false,
+ dragAndDrop: true,
+ onCreateLi: function(node, $li) {
+ ////console.log("node >>",node);
+ }
+ }).on(
+ 'tree.contextmenu',
+ function(event:any) {
+ // The clicked node is 'event.node'
+ var node = event.node;
+ openMenuDetailsModal(node, "view");
+ }
+ );
- // var openMenuDetailsModal = function(node: any, actionName: string ){
- // const modalRef = ngbModal.open(FunctionalMenuDialogComponent, { size: 'lg' });
- // modalRef.componentInstance.title = 'Functional Menu ',actionName;
- // if(node != 'undefined' && node){
- // modalRef.componentInstance.nodedata = node;
- // modalRef.componentInstance.operationName = actionName;
- // }else{
- // modalRef.componentInstance.nodedata = {};
- // }
- // modalRef.componentInstance.passEntry.subscribe((receivedEntry: any) => {
- // //console.log("receivedEntry>>>>",receivedEntry);
- // ngbModal.dismissAll();
- // if(receivedEntry.httpStatusCode===200){
- // _self.getFunctionalMenu();
- // }
- // });
- // }
- // });
- // }
+ var openMenuDetailsModal = function(node: any, actionName: string ){
+ const modalRef = ngbModal.open(FunctionalMenuDialogComponent, { size: 'lg' });
+ modalRef.componentInstance.title = 'Functional Menu ',actionName;
+ if(node != 'undefined' && node){
+ modalRef.componentInstance.nodedata = node;
+ modalRef.componentInstance.operationName = actionName;
+ }else{
+ modalRef.componentInstance.nodedata = {};
+ }
+ modalRef.componentInstance.passEntry.subscribe((receivedEntry: any) => {
+ //console.log("receivedEntry>>>>",receivedEntry);
+ ngbModal.dismissAll();
+ if(receivedEntry.httpStatusCode===200){
+ _self.getFunctionalMenu();
+ }
+ });
+ }
+ });
}
}