2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
21 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
22 <%@ page isELIgnored="false"%>
23 <%@ page import="org.onap.portalsdk.core.util.SystemProperties"%>
24 <%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%>
25 <%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%>
26 <%@ page import="org.onap.portalsdk.core.domain.MenuData"%>
27 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css">
28 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
29 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
32 <!-- <script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
33 <script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
34 <script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
35 <script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
36 <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
37 <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
38 <script src="static/js/jquery-1.10.2.js"></script>
39 <script src="app/fusion/scripts/modalService.js"></script>
40 <script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
41 <script src="static/js/jquery-ui.js" type="text/javascript"></script>
42 <script src="app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
43 <script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
44 <script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
45 <script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
46 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script>
47 <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
48 <script src="app/fusion/scripts/services/userInfoService.js"></script>
49 <script src="app/fusion/scripts/services/leftMenuService.js"></script> -->
52 <jsp:include page="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" ></jsp:include>
55 <c:set var="UserName" value="<%= session.getAttribute(\"fullName\")%>" />
56 <c:set var="UserFirstName" value="<%= session.getAttribute(\"first_name\")%>" />
59 String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK);
60 String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
61 String portalUrl = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/process_csp";
62 String getAccessLink = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/get_access";
64 <c:set var="returnPortalUrl" value="<%=portalUrl%>" />
65 <c:set var="contactUsLink" value="<%=contactUsLink%>" />
66 <c:set var="getAccessLink" value="<%=getAccessLink%>" />
71 <%@include file="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" %>
73 <div style="position: relative; z-index: 999;">
74 <div ng-controller="headerController">
76 <div class="headerContainer" id="headerContainer" ng-cloak ng-show="{{showHeader}}">
77 <div id="megaMenuContainer" class="megaMenuContainer" style="margin-top: 0; overflow: visible;">
80 <!-- Mega Menu parent-tab directive with three models menu-items, active-sub-menu, active-menu -->
81 <div id="topMenu" class="top-megamenu" ng-mouseleave="activeClickSubMenu.x.active=false; activeClickMenu.x.active=false">
82 <div style="float:left;width:100%;"parent-tab menu-items="megaMenuDataObject" active-sub-menu='activeClickSubMenu.x' active-menu='activeClickMenu.x'>
83 <div parentmenu-tabs mega-menu="true" menu-items="megaMenuDataObject" style="height:55px;">
84 <div style="float:left">
85 <li class="megamenu__item" style="line-height:55px;" onclick="returnToPortal()">
86 <img src="app/fusion/external/ebz/images/att_logo.png" class="ATTLogo" ></span>
87 <!-- <a id='returnPortal' class="primaryMenuOptionLink" style="font-weight: 400 !important; font-family: clearview_att_bold !important; font-size: 18px;">ECOMP</a>
88 --> <strong style="font-weight: 400 !important; font-family: clearview_att_bold !important; font-size: 18px;" id='returnPortal' >ECOMP Portal</strong>
90 <div menu-tabs mega-menu="true" tab-name="item.text" menu-item="item" active-menu="activeClickMenu.x"
91 ng-repeat="item in megaMenuDataObject" style="font-size: 18px;" ng-mousedown="loadFavorites()" >
92 <div parentmenu-tabs sub-menu="true" ng-show="activeClickMenu.x.active && item.active" menu-items="activeClickMenu.x.children">
93 <!-- Second level menu -->
95 <div menu-tabs sub-menu="true" tab-name="subItem.text"
96 tab-url="subItem.url" menu-item="subItem"
97 ng-repeat="subItem in activeClickMenu.x.children | orderBy : 'column'" active-menu="activeClickSubMenu.x"
98 sub-item-active="{{subItem.active}}" style="float:left;" aria-label="{{subItem.text}}"
99 ng-mouseenter="submenuLevelAction(subItem.text,subItem.column)"
100 ng-mouseleave="submenuLevelAction(subItem.text,subItem.column)"
101 ng-click="submenuLevelAction(subItem.text,subItem.column)" >
102 <i ng-if="subItem.text=='Favorites'" id="favorite-star"
103 class="icon-star favorites-icon-active">
107 <div class="sub__menu" ng-mouseleave="activeClickSubMenu.x.active=false" >
108 <ul ng-show="activeClickSubMenu.x.active" role="menubar" class="columns">
109 <!-- Third level menu -->
110 <div menu-tabs menu-item="subItem"
112 ng-repeat="subItem in activeClickSubMenu.x.children | orderBy : 'column'"
113 ng-show="activeClickSubMenu.x.active">
115 <i id="favorite-selector-third-level"
116 ng-show="isUrlFavorite(subItem.menuId)==false"
117 class="icon-star favorites-icon-inactive"
118 ng-if="subItem.url.length > 1">
120 <i id="favorite-selector-third-level"
121 ng-show="isUrlFavorite(subItem.menuId)"
122 class="icon-star favorites-icon-active"
123 ng-if="subItem.url.length > 1">
125 <span class="title" aria-label="{{subItem.text}}"
126 ng-click="goToUrl(subItem)">{{subItem.text}}</span>
127 <!-- Fourth level menus -->
128 <div att-links-list="">
129 <i id="favorite-selector-fourth-level"
130 class="icon-star favorites-icon-inactive"
131 ng-show="isUrlFavorite(tabValue.menuId)==false"
132 ng-if="tabValue.url.length > 1">
135 <i id="favorite-selector-fourth-level"
136 class="icon-star favorites-icon-active"
137 ng-show="isUrlFavorite(tabValue.menuId)"
138 ng-if="tabValue.url.length > 1">
141 <span role="menuitem" att-links-list-item=""
142 ng-repeat="tabValue in subItem.children"
143 ng-click="goToUrl(tabValue)"
144 att-accessibility-click="13,32"
145 ng-class="{'disabled': tabValue.disabled}">{{tabValue.text}}</span>
147 <hr ng-show="!$last"/>
151 <!-- Favorites level menu -->
152 <div class="favorites-window" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()">
153 <div id="favorites-menu-items" ng-show="showFavorites">
154 <div ng-repeat="subItem in favoritesMenuItems" att-links-list="" style='display: inline'>
155 <i id="favorite-selector-favorites-list" class="icon-star favorites-icon-active">
157 <a id="favorites-list" aria-label="{{subItem.text}}"
158 ng-click="goToUrl(subItem)"
159 style="margin-left: 3px; margin-right: 20px; text-decoration: none; color: #666666;">
165 <p style='font-weight: 400; font-family: clearview_att_bold !important;
166 font-size: 18px; text-align: center; background-color: lightgray;
167 width: 400px; margin-left: 25%; margin-right: 25%;'>
168 Manage favorites on ECOMP Portal.
172 <!-- Favorites when empty -->
173 <div id="favorites-empty" ng-show='favoritesWindow' ng-show="emptyFavorites">
174 <div id="favorites-empty" ng-show="emptyFavorites" class="favorites-window-empty">
176 <img src="app/fusion/external/ebz/images/no_favorites_star.png">
177 <p class='favoritesLargeText'>No Favorites</p>
178 <p class='favoritesNormalText'>Manage favorites on ECOMP Portal.</p>
188 <li class="megamenu__item" style="line-height:55px;" ng-if="loadMenufail">
189 <strong style="font-weight: 400 !important; font-family: clearview_att_bold !important; font-size: 18px;" >Unable to load menus</strong>
191 <!-- <li class="megamenu__item" style="width: 20%;"> </li>
193 <!-- Login Snippet-->
194 <div style="float:right">
195 <li id="bcLoginSnippet" class="megamenu__item" style="width: 140px;" >
196 <div popover="loginSnippet.html" aria-label="Login Snippet" referby="loginSnippet" att-accessibility-click="13,32" popover-style="\" popover-placement="below" style="width: 200px;">
197 <div class="icon-user-small login-snippet-icon"></div>
198 <div class="login-snippet-text" style="display: inline-block; font-size:12px; margin-left:5px;overflow: hidden; max-height: 31px; max-width:120px; padding-top: 0px; margin-top: 0px; white-space: nowrap;" ng-bind="userProfile.firstName"></div>
201 <li class="megamenu__item" style="width:120px;"> </li>
206 <div style="clear: both"></div>
211 <div class="license-notification" id="license-notification">
212 <a href="javascript:void(0)" style="background-color:#bbb;" class="button button--small" tooltip="Please contact ECOMP Portal team to get the license" tooltip-placement="below" tooltip-style="light" tooltip-popup-delay="500" >
213 <span style="">{{app_name_full}}</span>
216 <div style="position: relative; color: black; top: 70px;">
218 <span ng-style="adjustHLeftMenu('burgerIcon')" style="z-index:998; position:fixed; left:0%; font-size:35px; margin-left:10px;text-decoration:none;">
219 <a ng-click="toggleDrawer();isOpen = !isOpen" href="javascript:void(0);" class="arrow-icon-left" >
220 <span class="icon-hamburger"></span></a>
221 <span ng-init="isOpen = true" ng-show="isOpen" style="font-size:16px; position:relative; top:-8px; left:-15px;">    {{app_name}}</span>
223 <div att-drawer drawer-slide="left" drawer-custom-top="{{drawer_custom_top}}px" drawer-size="200px" drawer-open="drawerOpen" drawer-custom-height="100%" >
224 <div ng-style="adjustHLeftMenu('leftMenu')">
225 <div class="attDrawer" style="margin-top:{{drawer_margin_top}}px;">
226 <div style="margin-left:10px; margin-right:10px;">
227 <accordion close-others="true" css="att-accordion--no-box">
228 <accordion-group ng-repeat="parent in menuItems" heading="{{parent.parentLabel}}" child="{{parent.parentAction}}" parent-link="{{parent.parentAction}}" image-source="{{parent.parentImageSrc}}" child-length="{{parent.childItemList.length}}" is-open="parent.open">
229 <div ng-repeat="subMenu in parent.childItemList" style="font-size:12px; margin-left:10px;">
230 <a href="{{subMenu.action}}" style="font-size:12px; color:#666666;" >{{subMenu.label}}</a>
244 function returnToPortal(){
245 window.location.href = "<c:out value='${returnPortalUrl}'/>";
247 detectScrollEvent = function() {
248 var footerOff = $('#footerContainer').offset().top;
249 var headOff = $('#headerContainer').offset().top;
250 var winHeight = $(window).height();
251 if ((footerOff - headOff) <= winHeight) {
252 $('.att-drawer').css({
253 "height" : footerOff - headOff - 55
256 $('.att-drawer').css({
261 $(window).scroll(function() {
262 if ($('.att-drawer').is(':visible')) {
266 app.controller("headerController", function($scope, $timeout, $log, $http, UserInfoService, $window, $cookies,LeftMenuService) {
267 // $log.debug('HeaderController started');
268 $scope.jsonMenuData = [];
269 $scope.loadMenufail=false;
270 $scope.app_name = "";
271 $scope.app_name_full = "";
272 $scope.megaMenuDataObject =[];
273 $scope.activeClickSubMenu = {
276 $scope.activeClickMenu = {
279 $scope.favoritesMenuItems = [];
280 $scope.favoriteItemsCount = 0;
281 $scope.showFavorites = false;
282 $scope.emptyFavorites = false;
283 $scope.favoritesWindow = false;
290 /*Put user info into fields*/
291 $scope.inputUserInfo = function(userInfo){
292 if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
293 if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
294 $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
295 if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
296 $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
297 if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
298 $scope.userProfile.email = userInfo.USER_EMAIL;
301 /*getting user info from session*/
302 $scope.getUserNameFromSession = function(){
303 UserInfoService.getFunctionalMenuStaticDetailSession()
304 .then(function (res) {
305 $scope.userProfile.firstName = res.firstName;
306 $scope.redirectUrl = res.portalUrl;
309 $scope.getTopMenuStaticInfo=function() {
310 var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
313 if(res==null || res==''){
314 $log.info('failed getting static User information');
315 $scope.getUserNameFromSession();
317 $log.info('Received static User information');
319 $scope.inputUserInfo(resData);
320 $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
324 $log.info('failed getting static User information');
329 var unflatten = function( array, parent, tree ){
330 tree = typeof tree !== 'undefined' ? tree : [];
331 parent = typeof parent !== 'undefined' ? parent : { menuId: null };
332 var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
334 if( !_.isEmpty( children ) ){
335 if( parent.menuId === null ){
338 parent['children'] = children
340 _.each( children, function( child ){ unflatten( array, child ) } );
346 var menuStructureConvert = function(menuItems) {
347 var megaMenuDataObjectTemp = [
356 url:"<c:out value='${contactUsLink}'/>"
360 url:"<c:out value='${getAccessLink}'/>"
364 return megaMenuDataObjectTemp;
369 LeftMenuService.getAppName().then(function(response){
372 if(j && j !== "null" && j!== "undefined"){
373 // console.log("app name is " + $scope.app_name);
374 $scope.app_name_full = j.data;
375 var processed_app_name = j.data;
376 if(processed_app_name.indexOf("[")<=-1) {
377 if (document.getElementById('license-notification')!=null)
378 document.getElementById('license-notification').style.display = "none";
380 var n = processed_app_name.length;
384 $scope.app_name = processed_app_name.substr(0, n);
386 throw "Get app_name response is not an object/is empty";
389 console.log("error happened while trying to get app name "+e);
393 console.log('getAppName failed', error);
396 $scope.getTopMenuStaticInfo();
397 $scope.getMenu=function() {
401 url: 'get_functional_menu',
402 // TIMEOUT USED FOR LOCAL TESTING ONLY
404 }).success(function (response) {
405 if(response == '101: Timeout') {
406 $log.error('Timeout attempting to get_functional_menu');
407 // TIMEOUT USED FOR LOCAL TESTING ONLY
408 // $scope.createErrorMenu();
409 $scope.megaMenuDataObject = menuStructureConvert('');
411 $log.debug('get_functional_menu success: ' + response);
412 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
413 // createErrorMenu() USED FOR LOCAL TESTING ONLY
414 // $scope.createErrorMenu();
415 $scope.megaMenuDataObject = menuStructureConvert('');
416 // $scope.loadMenufail=true;
418 $scope.jsonMenuData = unflatten( response );
419 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
422 }).error(function (response){
423 // createErrorMenu() USED FOR LOCAL TESTING ONLY
424 // $scope.createErrorMenu();
426 //$scope.loadMenufail=true;
427 $scope.megaMenuDataObject = menuStructureConvert('');
428 $log.debug('REST API failed get_functional_menu...'+ response);
431 $scope.adjustHLeftMenu = function (type){
432 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
434 if($scope.showHeader == true) {
435 $scope.drawer_margin_top = 60;
436 $scope.drawer_custom_top = 54;
437 $scope.toggle_drawer_top = 55;
441 $scope.drawer_margin_top = 50;
442 $scope.drawer_custom_top = 0;
443 $scope.toggle_drawer_top = 10;
445 if(type=='burgerIcon'){
446 return { "top": $scope.toggle_drawer_top+"px"};
447 }else if(type=='leftMenu'){
448 return { "margin-top": $scope.drawer_margin_top+"px"};
452 $scope.adjustHeader=function() {
453 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
455 if($scope.showHeader == true) {
456 $scope.drawer_margin_top = 50;
457 $scope.drawer_custom_top = 54;
458 $scope.toggle_drawer_top = 55;
462 $scope.drawer_margin_top = 40;
463 $scope.drawer_custom_top = 0;
464 $scope.toggle_drawer_top = 10;
472 $scope.adjustHeader();
475 /* **************************************************************************/
476 /* Logic for the favorite menus is here */
478 $scope.loadFavorites = function () {
479 $log.debug('loadFavorites has happened.');
480 if ($scope.favoritesMenuItems == '') {
481 $scope.generateFavoriteItems();
482 $log.debug('loadFavorites is calling generateFavoriteItems()');
484 $log.debug('loadFavorites is NOT calling generateFavoriteItems()');
488 $scope.goToUrl = function (item) {
489 $log.info("goToUrl called")
493 var restrictedApp = item.restrictedApp;
494 $log.debug('Restricted app status is: ' + restrictedApp);
496 $log.info('No url found for this application, doing nothing..');
500 $window.open(url, '_blank');
502 $window.open(url, '_self');
507 $scope.submenuLevelAction = function(index, column) {
508 if ($scope.favoritesMenuItems == '') {
509 $scope.generateFavoriteItems();
510 $log.debug('submenuLevelAction is calling generateFavoriteItems()');
512 $log.debug('item hovered/clicked: ' + index + '; column = ' + column);
513 if (column == 2) { // 2 is Design
514 $scope.favoritesWindow = false;
515 $scope.showFavorites = false;
516 $scope.emptyFavorites = false;
518 if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
519 $log.debug('Showing Favorites window');
520 $scope.favoritesWindow = true;
521 $scope.showFavorites = true;
522 $scope.emptyFavorites = false;
524 if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
525 $log.debug('Hiding Favorites window in favor of No Favorites Window');
526 $scope.favoritesWindow = true;
527 $scope.showFavorites = false;
528 $scope.emptyFavorites = true;
531 $scope.favoritesWindow = false;
532 $scope.showFavorites = false;
533 $scope.emptyFavorites = false;
537 $scope.hideFavoritesWindow = function() {
538 $log.debug('$scope.hideFavoritesWindow has been called');
539 $scope.showFavorites = false;
540 $scope.emptyFavorites = false;
543 $scope.isUrlFavorite = function (menuId) {
544 // $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
545 var jsonMenu = JSON.stringify($scope.favoritesMenuItems);
546 var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId);
547 if (isMenuFavorite==-1) {
555 $scope.generateFavoriteItems = function() {
558 url: 'get_favorites',
559 // TIMEOUT USED FOR LOCAL TESTING ONLY
561 }).success(function (response) {
562 if (response == '101: Timeout') {
563 $log.error('Timeout attempting to get_favorites_menu');
565 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
566 $log.error('REST API failed get_favorites' + response);
568 $log.debug('get_favorites = ' + JSON.stringify(response));
569 $scope.favoritesMenuItems = response;
570 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
571 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
574 }).error(function (response){
575 $log.error('REST API failed get_favorites' + response);
576 //createFavoriteErrorMenu() USED FOR LOCAL TESTING ONLY
577 // $scope.createFavoriteErrorMenu();
581 $scope.createFavoriteErrorMenu=function() {
582 $scope.favoritesMenuItems = [];
583 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
584 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
587 /* end of Favorite Menu code */
588 /* **************************************************************************/
591 /* **************************************************************************/
592 // THIS IS USED FOR LOCAL TESTING ONLY
593 /* **************************************************************************/
595 $scope.createErrorMenu=function() {
596 $scope.jsonMenuData = [
601 "parentMenuId": null,
607 "text": "Infrastructure Ordering",
608 "parentMenuId": null,
614 "text": "Service Creation",
615 "parentMenuId": null,
621 "text": "Service Mgmt",
622 "parentMenuId": null,
630 "url": "http://google.com"
635 "text": "Mike Little's Coffee Cup",
637 "url": "http://coffee.com"
642 "text": "Andy and his Astrophotgraphy",
644 "url": "http://nightskypix.com"
651 "url": "http://http://jsonlint.com"
656 "text": "3rd Level App1c R200",
658 "url": "http://app1c.com"
663 "text": "3rd Level App4b R16",
665 "url": "http://app4b.com"
670 "text": "3rd Level App2b R16",
672 "url": "http://app2b.com"
678 "parentMenuId": null,
682 $scope.jsonMenuData = unflatten( $scope.jsonMenuData );
683 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
684 // $log.debug(JSON.stringify($scope.jsonMenuData));
686 var childItemList="";
689 childItemList = ${menu.childItemList};
690 parentList = ${menu.parentList};
692 console.log("ebz_header: failed to get child/parent lists", err);
695 var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
697 $scope.menuItems = [];
698 for (var i = 0; i < parentList.length; i++) {
699 $scope.openCurrentMenu = false;
700 if(pageUrl==parentList[i].action)
701 $scope.openCurrentMenu = true;
702 $scope.childItemList = childItemList[i];
703 for(chIndex in $scope.childItemList){
704 if($scope.childItemList.length>0)
705 if($scope.childItemList[chIndex].action!=null){
706 if($scope.childItemList[chIndex].action==pageUrl)
707 $scope.openCurrentMenu = true;
711 parentLabel : parentList[i].label,
712 parentAction : parentList[i].action,
713 parentImageSrc : parentList[i].imageSrc,
714 open:$scope.openCurrentMenu,
715 childItemList : $scope.childItemList
717 $scope.menuItems.push($scope.item);
719 $scope.arrowShow = true;
720 $scope.drawerOpen = false;
721 $scope.subMenuContent = false;
722 $scope.toggleSubMenu = function() {
723 $scope.subMenuContent = !$scope.subMenuContent;
726 var drawerOpen = 'open';
727 if (drawerOpen == 'open') {
728 $scope.drawerOpen = true;
729 $scope.arrowShow = true;
731 $scope.arrowShow = false;
733 $scope.arrowShow = true;
734 $scope.drawerOpen = false;
735 $scope.toggleDrawer = function() {
736 $scope.drawerOpen = !($scope.drawerOpen);
737 if ($scope.drawerOpen) {
738 $scope.arrowShow = true;
739 if (document.getElementById('mContent')!=null)
740 document.getElementById('mContent').style.marginLeft = "0px";
742 $scope.arrowShow = false;
743 if (document.getElementById('mContent')!=null)
744 document.getElementById('mContent').style.marginLeft = "-150px";
747 //var drawerOpen = getCookie('drawerOpen');
748 if (drawerOpen == 'open') {
749 $scope.drawerOpen = true;
750 $scope.arrowShow = true;
752 $scope.arrowShow = false;
754 $timeout(function() {
760 app.filter("ellipsis", function(){
761 return function(text, length){
763 var ellipsis = text.length > length ? "..." : "";
764 return text.slice(0, length) + ellipsis;