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.openecomp.portalsdk.core.util.SystemProperties"%>
24 <%@ page import="org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiProperties"%>
25 <%@ page import="org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiConstants"%>
26 <%@ page import="org.openecomp.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 <link rel="stylesheet" type="text/css" href="app/fusion/external/ionicons-2.0.1/css/ionicons.css" />
33 <script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
34 <script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
35 <script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
36 <script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
37 <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
38 <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
39 <script src="static/js/jquery-1.10.2.js"></script>
40 <script src="app/fusion/scripts/modalService.js"></script>
41 <script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
42 <script src="static/js/jquery-ui.js" type="text/javascript"></script>
43 <script src="app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
44 <script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
45 <script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
46 <script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
47 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script>
48 <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
49 <script src="app/fusion/scripts/services/userInfoService.js"></script>
50 <script src="app/fusion/scripts/services/leftMenuService.js"></script>
53 <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('/')) + "/processSingleSignOn";
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%>" />
69 z-index:997 !important;
72 .secondaryMenuContainer{
75 .megamenu-tabs .megamenu__item {
78 .megamenu-tabs .megamenu__item span {
85 .submenu-tabs .sub__menu{
89 .top-megamenu .megamenu-tabs ul{
95 <%@include file="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" %>
97 <div style="position: relative; z-index: 999;">
98 <div ng-controller="headerController">
100 <div class="headerContainer" id="headerContainer" ng-cloak ng-show="{{showHeader}}">
101 <div id="megaMenuContainer" class="megaMenuContainer" style="margin-top: 0; overflow: visible;">
104 <!-- Mega Menu parent-tab directive with three models menu-items, active-sub-menu, active-menu -->
105 <div id="topMenu" class="top-megamenu" ng-mouseleave="activeClickSubMenu.x.active=false; activeClickMenu.x.active=false">
106 <div style="float:left;width:100%;"parent-tab menu-items="megaMenuDataObject" active-sub-menu='activeClickSubMenu.x' active-menu='activeClickMenu.x'>
107 <div parentmenu-tabs mega-menu="true" menu-items="megaMenuDataObject" style="height:55px;">
108 <div style="float:left">
109 <li class="megamenu__item" style="line-height:55px;" onclick="returnToPortal()">
111 <!-- <a id='returnPortal' class="primaryMenuOptionLink" style="font-weight: 400 !important; font-family: Arial !important; font-size: 18px;">ECOMP</a>
112 --> <strong style="font-weight: 400 !important; font-family: Arial !important; font-size: 18px;" id='returnPortal' >ECOMP Portal</strong>
114 <div menu-tabs mega-menu="true" tab-name="item.text" menu-item="item" active-menu="activeClickMenu.x"
115 ng-repeat="item in megaMenuDataObject" style="font-size: 18px;" ng-mousedown="loadFavorites()" >
116 <div parentmenu-tabs sub-menu="true" ng-show="activeClickMenu.x.active && item.active" menu-items="activeClickMenu.x.children">
117 <!-- Second level menu -->
119 <div menu-tabs sub-menu="true" tab-name="subItem.text"
120 tab-url="subItem.url" menu-item="subItem"
121 ng-repeat="subItem in activeClickMenu.x.children | orderBy : 'column'" active-menu="activeClickSubMenu.x"
122 sub-item-active="{{subItem.active}}" style="float:left;" aria-label="{{subItem.text}}"
123 ng-mouseenter="submenuLevelAction(subItem.text,subItem.column)"
124 ng-mouseleave="submenuLevelAction(subItem.text,subItem.column)"
125 ng-click="submenuLevelAction(subItem.text,subItem.column)" >
126 <i ng-if="subItem.text=='Favorites'" id="favorite-star"
127 class="icon-star favorites-icon-active">
131 <div class="sub__menu" ng-mouseleave="activeClickSubMenu.x.active=false" >
132 <ul ng-show="activeClickSubMenu.x.active" role="menubar" class="columns">
133 <!-- Third level menu -->
134 <div menu-tabs menu-item="subItem"
136 ng-repeat="subItem in activeClickSubMenu.x.children | orderBy : 'column'"
137 ng-show="activeClickSubMenu.x.active">
139 <i id="favorite-selector-third-level"
140 ng-show="isUrlFavorite(subItem.menuId)==false"
141 class="icon-star favorites-icon-inactive"
142 ng-if="subItem.url.length > 1">
144 <i id="favorite-selector-third-level"
145 ng-show="isUrlFavorite(subItem.menuId)"
146 class="icon-star favorites-icon-active"
147 ng-if="subItem.url.length > 1">
149 <span class="title" aria-label="{{subItem.text}}"
150 ng-click="goToUrl(subItem)">{{subItem.text}}</span>
151 <!-- Fourth level menus -->
152 <div att-links-list="">
153 <i id="favorite-selector-fourth-level"
154 class="icon-star favorites-icon-inactive"
155 ng-show="isUrlFavorite(tabValue.menuId)==false"
156 ng-if="tabValue.url.length > 1">
159 <i id="favorite-selector-fourth-level"
160 class="icon-star favorites-icon-active"
161 ng-show="isUrlFavorite(tabValue.menuId)"
162 ng-if="tabValue.url.length > 1">
165 <span role="menuitem" att-links-list-item=""
166 ng-repeat="tabValue in subItem.children"
167 ng-click="goToUrl(tabValue)"
168 att-accessibility-click="13,32"
169 ng-class="{'disabled': tabValue.disabled}">{{tabValue.text}}</span>
171 <hr ng-show="!$last"/>
175 <!-- Favorites level menu -->
176 <div class="favorites-window" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()">
177 <div id="favorites-menu-items" ng-show="showFavorites">
178 <div ng-repeat="subItem in favoritesMenuItems" att-links-list="" style='display: inline'>
179 <i id="favorite-selector-favorites-list" class="icon-star favorites-icon-active">
181 <a id="favorites-list" aria-label="{{subItem.text}}"
182 ng-click="goToUrl(subItem)"
183 style="margin-left: 3px; margin-right: 20px; text-decoration: none; color: #666666;">
189 <p style='font-weight: 400; font-family: Arial !important;
190 font-size: 18px; text-align: center; background-color: lightgray;
191 width: 400px; margin-left: 25%; margin-right: 25%;'>
192 Manage favorites on ECOMP Portal.
196 <!-- Favorites when empty -->
197 <div id="favorites-empty" ng-show='favoritesWindow' ng-show="emptyFavorites">
198 <div id="favorites-empty" ng-show="emptyFavorites" class="favorites-window-empty">
200 <img src="app/fusion/external/ebz/images/no_favorites_star.png">
201 <p class='favoritesLargeText'>No Favorites</p>
202 <p class='favoritesNormalText'>Manage favorites on ECOMP Portal.</p>
212 <li class="megamenu__item" style="line-height:55px;" ng-if="loadMenufail">
213 <strong style="font-weight: 400 !important; font-family: Arial !important; font-size: 18px;" >Unable to load menus</strong>
215 <!-- <li class="megamenu__item" style="width: 20%;"> </li>
217 <!-- Login Snippet-->
218 <div style="float:right">
219 <li id="bcLoginSnippet" class="megamenu__item" style="width: 140px;" >
220 <div popover="loginSnippet.html" aria-label="Login Snippet" referby="loginSnippet" att-accessibility-click="13,32" popover-style="\" popover-placement="below" style="width: 200px;">
221 <div class="ion-android-person login-snippet-icon" style="display:inline-block"></div>
222 <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>
225 <li class="megamenu__item" style="width:120px;"> </li>
230 <div style="clear: both"></div>
236 <div style="position: relative; color: black; top: 70px;">
238 <span ng-style="adjustHLeftMenu('burgerIcon')" style="z-index:998; position:fixed; left:0%; font-size:35px; margin-left:10px;text-decoration:none;">
239 <a ng-click="toggleDrawer();isOpen = !isOpen" href="javascript:void(0);" class="arrow-icon-left" >
240 <span class="ion-navicon-round"></span></a>
241 <span ng-init="isOpen = true" ng-show="isOpen" style="font-size:16px; position:relative; top:-8px; left:-15px;">    {{app_name}}</span>
243 <div att-drawer drawer-slide="left" drawer-custom-top="{{drawer_custom_top}}px" drawer-size="200px" drawer-open="drawerOpen" drawer-custom-height="100%" >
244 <div ng-style="adjustHLeftMenu('leftMenu')">
245 <div class="attDrawer" style="margin-top:{{drawer_margin_top}}px;">
246 <div style="margin-left:10px; margin-right:10px;">
247 <accordion close-others="true" css="att-accordion--no-box">
248 <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">
249 <div ng-repeat="subMenu in parent.childItemList" style="font-size:12px; margin-left:10px;">
250 <a href="{{subMenu.action}}" style="font-size:12px; color:#666666;" >{{subMenu.label}}</a>
263 function returnToPortal(){
264 window.location.href = "<c:out value='${returnPortalUrl}'/>";
266 detectScrollEvent = function() {
267 var footerOff = $('#footerContainer').offset().top;
268 var headOff = $('#headerContainer').offset().top;
269 var winHeight = $(window).height();
270 if ((footerOff - headOff) <= winHeight) {
271 $('.att-drawer').css({
272 "height" : footerOff - headOff - 55
275 $('.att-drawer').css({
280 $(window).scroll(function() {
281 if ($('.att-drawer').is(':visible')) {
285 app.controller("headerController", function($scope, $timeout, $log, $http, UserInfoService, $window, $cookies,LeftMenuService) {
286 $log.debug('HeaderController started');
287 $scope.jsonMenuData = [];
288 $scope.loadMenufail=false;
289 $scope.app_name = "";
290 $scope.app_name_full = "";
291 $scope.megaMenuDataObject =[];
292 $scope.activeClickSubMenu = {
295 $scope.activeClickMenu = {
298 $scope.favoritesMenuItems = [];
299 $scope.favoriteItemsCount = 0;
300 $scope.showFavorites = false;
301 $scope.emptyFavorites = false;
302 $scope.favoritesWindow = false;
309 /*Put user info into fields*/
310 $scope.inputUserInfo = function(userInfo){
311 if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
312 if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
313 $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
314 if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
315 $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
316 if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
317 $scope.userProfile.email = userInfo.USER_EMAIL;
320 /*getting user info from session*/
321 $scope.getUserNameFromSession = function(){
322 UserInfoService.getFunctionalMenuStaticDetailSession()
323 .then(function (res) {
324 $scope.userProfile.firstName = res.firstName;
325 $scope.redirectUrl = res.portalUrl;
328 $scope.getTopMenuStaticInfo=function() {
329 var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
332 if(res==null || res==''){
333 $log.info('failed getting static User information');
334 $scope.getUserNameFromSession();
336 $log.info('Received static User information');
338 $scope.inputUserInfo(resData);
339 $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
343 $log.info('failed getting static User information');
348 var unflatten = function( array, parent, tree ){
349 tree = typeof tree !== 'undefined' ? tree : [];
350 parent = typeof parent !== 'undefined' ? parent : { menuId: null };
351 var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
353 if( !_.isEmpty( children ) ){
354 if( parent.menuId === null ){
357 parent['children'] = children
359 _.each( children, function( child ){ unflatten( array, child ) } );
365 var menuStructureConvert = function(menuItems) {
366 var megaMenuDataObjectTemp = [
375 url:"<c:out value='${contactUsLink}'/>"
379 url:"<c:out value='${getAccessLink}'/>"
383 return megaMenuDataObjectTemp;
388 LeftMenuService.getAppName().then(function(response){
391 if(j && j !== "null" && j!== "undefined"){
392 console.log("app name is " + $scope.app_name);
393 $scope.app_name_full = j.data;
394 var processed_app_name = j.data;
395 var n = processed_app_name.length;
399 $scope.app_name = processed_app_name.substr(0, n);
401 throw "Get app_name respsone is not an object/is empty";
404 console.log("error happened while trying to get app name "+e);
408 console.log("error happened while calling getAppName "+error);
411 $scope.getTopMenuStaticInfo();
412 $scope.getMenu=function() {
416 url: 'get_functional_menu',
417 // TIMEOUT USED FOR LOCAL TESTING ONLY
419 }).success(function (response) {
420 if(response == '101: Timeout') {
421 $log.error('Timeout attempting to get_functional_menu');
422 // TIMEOUT USED FOR LOCAL TESTING ONLY
423 // $scope.createErrorMenu();
424 $scope.megaMenuDataObject = menuStructureConvert('');
426 $log.debug('get_functional_menu success: ' + response);
427 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
428 // createErrorMenu() USED FOR LOCAL TESTING ONLY
429 // $scope.createErrorMenu();
430 $scope.megaMenuDataObject = menuStructureConvert('');
431 // $scope.loadMenufail=true;
433 $scope.jsonMenuData = unflatten( response );
434 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
437 }).error(function (response){
438 // createErrorMenu() USED FOR LOCAL TESTING ONLY
439 // $scope.createErrorMenu();
441 //$scope.loadMenufail=true;
442 $scope.megaMenuDataObject = menuStructureConvert('');
443 $log.debug('REST API failed get_functional_menu...'+ response);
446 $scope.adjustHLeftMenu = function (type){
447 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
449 if($scope.showHeader == true) {
450 $scope.drawer_margin_top = 60;
451 $scope.drawer_custom_top = 54;
452 $scope.toggle_drawer_top = 55;
456 $scope.drawer_margin_top = 50;
457 $scope.drawer_custom_top = 0;
458 $scope.toggle_drawer_top = 10;
460 if(type=='burgerIcon'){
461 return { "top": $scope.toggle_drawer_top+"px"};
462 }else if(type=='leftMenu'){
463 return { "margin-top": $scope.drawer_margin_top+"px"};
467 $scope.adjustHeader=function() {
468 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
470 if($scope.showHeader == true) {
471 $scope.drawer_margin_top = 50;
472 $scope.drawer_custom_top = 54;
473 $scope.toggle_drawer_top = 55;
477 $scope.drawer_margin_top = 40;
478 $scope.drawer_custom_top = 0;
479 $scope.toggle_drawer_top = 10;
487 $scope.adjustHeader();
490 /* **************************************************************************/
491 /* Logic for the favorite menus is here */
493 $scope.loadFavorites = function () {
494 $log.debug('loadFavorites has happened.');
495 if ($scope.favoritesMenuItems == '') {
496 $scope.generateFavoriteItems();
497 $log.debug('loadFavorites is calling generateFavoriteItems()');
499 $log.debug('loadFavorites is NOT calling generateFavoriteItems()');
503 $scope.goToUrl = function (item) {
504 $log.info("goToUrl called")
508 var restrictedApp = item.restrictedApp;
509 $log.debug('Restricted app status is: ' + restrictedApp);
511 $log.info('No url found for this application, doing nothing..');
515 $window.open(url, '_blank');
517 $window.open(url, '_self');
522 $scope.submenuLevelAction = function(index, column) {
523 if ($scope.favoritesMenuItems == '') {
524 $scope.generateFavoriteItems();
525 $log.debug('submenuLevelAction is calling generateFavoriteItems()');
527 $log.debug('item hovered/clicked: ' + index + '; column = ' + column);
528 if (column == 2) { // 2 is Design
529 $scope.favoritesWindow = false;
530 $scope.showFavorites = false;
531 $scope.emptyFavorites = false;
533 if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
534 $log.debug('Showing Favorites window');
535 $scope.favoritesWindow = true;
536 $scope.showFavorites = true;
537 $scope.emptyFavorites = false;
539 if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
540 $log.debug('Hiding Favorites window in favor of No Favorites Window');
541 $scope.favoritesWindow = true;
542 $scope.showFavorites = false;
543 $scope.emptyFavorites = true;
546 $scope.favoritesWindow = false;
547 $scope.showFavorites = false;
548 $scope.emptyFavorites = false;
552 $scope.hideFavoritesWindow = function() {
553 $log.debug('$scope.hideFavoritesWindow has been called');
554 $scope.showFavorites = false;
555 $scope.emptyFavorites = false;
558 $scope.isUrlFavorite = function (menuId) {
559 // $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
560 var jsonMenu = JSON.stringify($scope.favoritesMenuItems);
561 var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId);
562 if (isMenuFavorite==-1) {
570 $scope.generateFavoriteItems = function() {
573 url: 'get_favorites',
574 // TIMEOUT USED FOR LOCAL TESTING ONLY
576 }).success(function (response) {
577 if (response == '101: Timeout') {
578 $log.error('Timeout attempting to get_favorites_menu');
580 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
581 $log.error('REST API failed get_favorites' + response);
583 $log.debug('get_favorites = ' + JSON.stringify(response));
584 $scope.favoritesMenuItems = response;
585 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
586 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
589 }).error(function (response){
590 $log.error('REST API failed get_favorites' + response);
595 $scope.createFavoriteErrorMenu=function() {
596 $scope.favoritesMenuItems = [
599 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
600 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
603 /* end of Favorite Menu code */
604 /* **************************************************************************/
607 /* **************************************************************************/
608 // THIS IS USED FOR LOCAL TESTING ONLY
609 /* **************************************************************************/
611 $scope.createErrorMenu=function() {
612 $scope.jsonMenuData = [
617 "parentMenuId": null,
623 "text": "Infrastructure Ordering",
624 "parentMenuId": null,
630 "text": "Service Creation",
631 "parentMenuId": null,
637 "text": "Service Mgmt",
638 "parentMenuId": null,
646 "url": "http://google.com"
651 "text": "Mike Little's Coffee Cup",
653 "url": "http://coffee.com"
658 "text": "Andy and his Astrophotgraphy",
660 "url": "http://nightskypix.com"
667 "url": "http://http://jsonlint.com"
679 "text": "4th Level App4a R16",
686 "text": "3rd Level App1c R200",
688 "url": "http://app1c.com"
693 "text": "3rd Level App4b R16",
695 "url": "http://app4b.com"
700 "text": "3rd Level App2b R16",
702 "url": "http://app2b.com"
708 "parentMenuId": null,
712 $scope.jsonMenuData = unflatten( $scope.jsonMenuData );
713 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
714 // $log.debug(JSON.stringify($scope.jsonMenuData));
716 var childItemList="";
719 childItemList = ${menu.childItemList};
720 parentList = ${menu.parentList};
722 console.log("error while getting left menu");
725 var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
727 $scope.menuItems = [];
728 for (var i = 0; i < parentList.length; i++) {
729 $scope.openCurrentMenu = false;
730 if(pageUrl==parentList[i].action)
731 $scope.openCurrentMenu = true;
732 $scope.childItemList = childItemList[i];
733 for(chIndex in $scope.childItemList){
734 if($scope.childItemList.length>0)
735 if($scope.childItemList[chIndex].action!=null){
736 if($scope.childItemList[chIndex].action==pageUrl)
737 $scope.openCurrentMenu = true;
741 parentLabel : parentList[i].label,
742 parentAction : parentList[i].action,
743 parentImageSrc : parentList[i].imageSrc,
744 open:$scope.openCurrentMenu,
745 childItemList : $scope.childItemList
747 $scope.menuItems.push($scope.item);
749 $scope.arrowShow = true;
750 $scope.drawerOpen = false;
751 $scope.subMenuContent = false;
752 $scope.toggleSubMenu = function() {
753 $scope.subMenuContent = !$scope.subMenuContent;
756 var drawerOpen = 'open';
757 if (drawerOpen == 'open') {
758 $scope.drawerOpen = true;
759 $scope.arrowShow = true;
761 $scope.arrowShow = false;
763 $scope.arrowShow = true;
764 $scope.drawerOpen = false;
765 $scope.toggleDrawer = function() {
766 $scope.drawerOpen = !($scope.drawerOpen);
767 if ($scope.drawerOpen) {
768 $scope.arrowShow = true;
769 if (document.getElementById('mContent')!=null)
770 document.getElementById('mContent').style.marginLeft = "210px";
772 $scope.arrowShow = false;
773 if (document.getElementById('mContent')!=null)
774 document.getElementById('mContent').style.marginLeft = "50px";
777 //var drawerOpen = getCookie('drawerOpen');
778 if (drawerOpen == 'open') {
779 $scope.drawerOpen = true;
780 $scope.arrowShow = true;
782 $scope.arrowShow = false;
784 $timeout(function() {
790 app.filter("ellipsis", function(){
791 return function(text, length){
793 var ellipsis = text.length > length ? "..." : "";
794 return text.slice(0, length) + ellipsis;