diff options
author | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-07-30 17:12:48 +0530 |
---|---|---|
committer | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-07-30 18:41:29 +0530 |
commit | 2b783041f85d9b0a29f2b6983c1466b2f7057914 (patch) | |
tree | 36f78c62fed51213681598db3fc9fe88eb5ebb9a /portal-FE-common/src/app | |
parent | d863bf15aec15ec1c5cdfe5592f475b0fe41d5e5 (diff) |
Edit Functional Menu is not working
Edit Functional Menu is not working-[PORTAL-973]
Issue-ID: PORTAL-973
Change-Id: I27edcf7fbd0524e234e6cca8ab400784937b1d73
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'portal-FE-common/src/app')
-rw-r--r-- | portal-FE-common/src/app/pages/functional-menu/functional-menu.component.html | 4 | ||||
-rw-r--r-- | portal-FE-common/src/app/pages/functional-menu/functional-menu.component.ts | 73 |
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(); + } + }); + } + }); } } |