2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the “License”);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
21 Unless otherwise specified, all documentation contained herein is licensed
22 under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23 you may not use this documentation except in compliance with the License.
24 You may obtain a copy of the License at
26 https://creativecommons.org/licenses/by/4.0/
28 Unless required by applicable law or agreed to in writing, documentation
29 distributed under the License is distributed on an "AS IS" BASIS,
30 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 See the License for the specific language governing permissions and
32 limitations under the License.
34 ============LICENSE_END============================================
38 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
39 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
40 <%@ page isELIgnored="false"%>
41 <%@ page import="org.onap.portalsdk.core.util.SystemProperties"%>
42 <%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%>
43 <%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%>
44 <%@ page import="org.onap.portalsdk.core.domain.MenuData"%>
45 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css">
46 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
47 <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
50 <jsp:include page="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" ></jsp:include>
53 <c:set var="UserName" value="<%= session.getAttribute(\"fullName\")%>" />
54 <c:set var="UserFirstName" value="<%= session.getAttribute(\"first_name\")%>" />
57 String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK);
58 String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
59 String portalUrl = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/process_csp";
60 String getAccessLink = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/get_access";
62 <c:set var="returnPortalUrl" value="<%=portalUrl%>" />
63 <c:set var="contactUsLink" value="<%=contactUsLink%>" />
64 <c:set var="getAccessLink" value="<%=getAccessLink%>" />
69 <%@include file="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" %>
71 <div style="position: relative; z-index: 999;">
72 <div ng-controller="headerController">
74 <div class="headerContainer" id="headerContainer" ng-cloak ng-show="{{showHeader}}">
75 <div id="megaMenuContainer" class="megaMenuContainer" style="margin-top: 0; overflow: visible;">
78 <!-- Mega Menu parent-tab directive with three models menu-items, active-sub-menu, active-menu -->
79 <div id="topMenu" class="top-megamenu" ng-mouseleave="activeClickSubMenu.x.active=false; activeClickMenu.x.active=false">
80 <div style="float:left;width:100%;"parent-tab menu-items="megaMenuDataObject" active-sub-menu='activeClickSubMenu.x' active-menu='activeClickMenu.x'>
81 <div parentmenu-tabs mega-menu="true" menu-items="megaMenuDataObject" style="height:55px;">
82 <div style="float:left">
83 <li class="megamenu__item" style="line-height:55px;" onclick="returnToPortal()">
84 <div ng-include src="'app/fusion/scripts/DS2-view-models/header-logo.html'"></div>
86 <div menu-tabs mega-menu="true" tab-name="item.text" menu-item="item" active-menu="activeClickMenu.x"
87 ng-repeat="item in megaMenuDataObject" style="font-size: 18px;" ng-mousedown="loadFavorites()" >
88 <div parentmenu-tabs sub-menu="true" ng-show="activeClickMenu.x.active && item.active" menu-items="activeClickMenu.x.children">
89 <!-- Second level menu -->
91 <div menu-tabs sub-menu="true" tab-name="subItem.text"
92 tab-url="subItem.url" menu-item="subItem"
93 ng-repeat="subItem in activeClickMenu.x.children | orderBy : 'column'" active-menu="activeClickSubMenu.x"
94 sub-item-active="{{subItem.active}}" style="float:left;" aria-label="{{subItem.text}}"
95 ng-mouseenter="submenuLevelAction(subItem.text,subItem.column)"
96 ng-mouseleave="submenuLevelAction(subItem.text,subItem.column)"
97 ng-click="submenuLevelAction(subItem.text,subItem.column)" >
98 <i ng-if="subItem.text=='Favorites'" id="favorite-star"
99 class="icon-star favorites-icon-active">
103 <div class="sub__menu" ng-mouseleave="activeClickSubMenu.x.active=false" >
104 <ul ng-show="activeClickSubMenu.x.active" role="menubar" class="columns">
105 <!-- Third level menu -->
106 <div menu-tabs menu-item="subItem"
108 ng-repeat="subItem in activeClickSubMenu.x.children | orderBy : 'column'"
109 ng-show="activeClickSubMenu.x.active">
111 <i id="favorite-selector-third-level"
112 ng-show="isUrlFavorite(subItem.menuId)==false"
113 class="icon-star favorites-icon-inactive"
114 ng-if="subItem.url.length > 1">
116 <i id="favorite-selector-third-level"
117 ng-show="isUrlFavorite(subItem.menuId)"
118 class="icon-star favorites-icon-active"
119 ng-if="subItem.url.length > 1">
121 <span class="title" aria-label="{{subItem.text}}"
122 ng-click="goToUrl(subItem)">{{subItem.text}}</span>
123 <!-- Fourth level menus -->
124 <div att-links-list="">
125 <i id="favorite-selector-fourth-level"
126 class="icon-star favorites-icon-inactive"
127 ng-show="isUrlFavorite(tabValue.menuId)==false"
128 ng-if="tabValue.url.length > 1">
131 <i id="favorite-selector-fourth-level"
132 class="icon-star favorites-icon-active"
133 ng-show="isUrlFavorite(tabValue.menuId)"
134 ng-if="tabValue.url.length > 1">
137 <span role="menuitem" att-links-list-item=""
138 ng-repeat="tabValue in subItem.children"
139 ng-click="goToUrl(tabValue)"
140 att-accessibility-click="13,32"
141 ng-class="{'disabled': tabValue.disabled}">{{tabValue.text}}</span>
143 <hr ng-show="!$last"/>
147 <!-- Favorites level menu -->
148 <div class="favorites-window" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()">
149 <div id="favorites-menu-items" ng-show="showFavorites">
150 <div ng-repeat="subItem in favoritesMenuItems" att-links-list="" style='display: inline'>
151 <i id="favorite-selector-favorites-list" class="icon-star favorites-icon-active">
153 <a id="favorites-list" aria-label="{{subItem.text}}"
154 ng-click="goToUrl(subItem)"
155 style="margin-left: 3px; margin-right: 20px; text-decoration: none; color: #666666;">
161 <p style='font-weight: 400; font-family: "Omnes-ECOMP-W02", Arial !important;
162 font-size: 18px; text-align: center; background-color: lightgray;
163 width: 400px; margin-left: 25%; margin-right: 25%;'>
164 Manage favorites on ECOMP Portal.
168 <!-- Favorites when empty -->
169 <div id="favorites-empty" ng-show='favoritesWindow' ng-show="emptyFavorites">
170 <div id="favorites-empty" ng-show="emptyFavorites" class="favorites-window-empty">
172 <img src="app/fusion/external/ebz/images/no_favorites_star.png">
173 <p class='favoritesLargeText'>No Favorites</p>
174 <p class='favoritesNormalText'>Manage favorites on ECOMP Portal.</p>
184 <li class="megamenu__item" style="line-height:55px;" ng-if="loadMenufail">
185 <strong style="font-weight: 400 !important; font-family: "Omnes-ECOMP-W02", Arial !important; font-size: 18px;" >Unable to load menus</strong>
187 <!-- <li class="megamenu__item" style="width: 20%;"> </li>
189 <!-- Login Snippet-->
190 <div style="float:right">
191 <li id="bcLoginSnippet" class="megamenu__item" style="width: 140px;" >
192 <div popover="loginSnippet.html" aria-label="Login Snippet" referby="loginSnippet" att-accessibility-click="13,32" popover-style="\" popover-placement="below" style="width: 200px;">
193 <div class="icon-user-small login-snippet-icon"></div>
194 <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>
197 <li class="megamenu__item" style="width:120px;"> </li>
202 <div style="clear: both"></div>
207 <div class="license-notification" id="license-notification">
208 <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" >
209 <span style="">{{app_name_full}}</span>
212 <div style="position: relative; color: black; top: 70px;">
214 <span ng-style="adjustHLeftMenu('burgerIcon')" style="z-index:998; position:fixed; left:0%; font-size:35px; margin-left:10px;text-decoration:none;">
215 <a ng-click="toggleDrawer();isOpen = !isOpen" href="javascript:void(0);" class="arrow-icon-left" >
216 <span class="icon-hamburger"></span></a>
217 <span ng-init="isOpen = true" ng-show="isOpen" style="font-size:16px; position:relative; top:-8px; left:-15px;">    {{app_name}}</span>
219 <div att-drawer drawer-slide="left" drawer-custom-top="{{drawer_custom_top}}px" drawer-size="200px" drawer-open="drawerOpen" drawer-custom-height="100%" >
220 <div ng-style="adjustHLeftMenu('leftMenu')">
221 <div class="attDrawer" style="margin-top:{{drawer_margin_top}}px;">
222 <div style="margin-left:10px; margin-right:10px;">
223 <accordion close-others="true" css="att-accordion--no-box">
224 <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">
225 <div ng-repeat="subMenu in parent.childItemList" style="font-size:12px; margin-left:10px;">
226 <a href="{{subMenu.action}}" style="font-size:12px; color:#666666;" >{{subMenu.label}}</a>
240 function returnToPortal(){
241 window.location.href = "<c:out value='${returnPortalUrl}'/>";
243 detectScrollEvent = function() {
244 var footerOff = $('#footerContainer').offset().top;
245 var headOff = $('#headerContainer').offset().top;
246 var winHeight = $(window).height();
247 if ((footerOff - headOff) <= winHeight) {
248 $('.att-drawer').css({
249 "height" : footerOff - headOff - 55
252 $('.att-drawer').css({
257 $(window).scroll(function() {
258 if ($('.att-drawer').is(':visible')) {
262 app.controller("headerController", function($scope, $timeout, $log, $http, UserInfoService, $window, $cookies,LeftMenuService) {
263 // $log.debug('HeaderController started');
264 $scope.jsonMenuData = [];
265 $scope.loadMenufail=false;
266 $scope.app_name = "";
267 $scope.app_name_full = "";
268 $scope.megaMenuDataObject =[];
269 $scope.activeClickSubMenu = {
272 $scope.activeClickMenu = {
275 $scope.favoritesMenuItems = [];
276 $scope.favoriteItemsCount = 0;
277 $scope.showFavorites = false;
278 $scope.emptyFavorites = false;
279 $scope.favoritesWindow = false;
286 /*Put user info into fields*/
287 $scope.inputUserInfo = function(userInfo){
288 if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
289 if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
290 $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
291 if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
292 $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
293 if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
294 $scope.userProfile.email = userInfo.USER_EMAIL;
297 /*getting user info from session*/
298 $scope.getUserNameFromSession = function(){
299 UserInfoService.getFunctionalMenuStaticDetailSession()
300 .then(function (res) {
301 $scope.userProfile.firstName = res.firstName;
302 $scope.userProfile.lastName = res.lastName;
303 $scope.userProfile.email = res.email;
304 $scope.userProfile.fullName = res.userName;
305 $scope.redirectUrl = res.portalUrl;
308 $scope.getTopMenuStaticInfo=function() {
309 var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
312 if(res==null || res==''){
313 $log.info('failed getting static User information');
314 $scope.getUserNameFromSession();
316 $log.info('Received static User information');
318 $scope.inputUserInfo(resData);
319 $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
323 $log.info('failed getting static User information');
328 var unflatten = function( array, parent, tree ){
329 tree = typeof tree !== 'undefined' ? tree : [];
330 parent = typeof parent !== 'undefined' ? parent : { menuId: null };
331 var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
333 if( !_.isEmpty( children ) ){
334 if( parent.menuId === null ){
337 parent['children'] = children
339 _.each( children, function( child ){ unflatten( array, child ) } );
345 var menuStructureConvert = function(menuItems) {
346 var megaMenuDataObjectTemp = [
355 url:"<c:out value='${contactUsLink}'/>"
359 url:"<c:out value='${getAccessLink}'/>"
363 return megaMenuDataObjectTemp;
368 LeftMenuService.getAppName().then(function(response){
371 if(j && j !== "null" && j!== "undefined"){
372 // console.log("app name is " + $scope.app_name);
373 $scope.app_name_full = j.data;
374 var processed_app_name = j.data;
375 if(processed_app_name.indexOf("[")<=-1) {
376 if (document.getElementById('license-notification')!=null)
377 document.getElementById('license-notification').style.display = "none";
379 var n = processed_app_name.length;
383 $scope.app_name = processed_app_name.substr(0, n);
385 throw "Get app_name response is not an object/is empty";
388 console.log("error happened while trying to get app name "+e);
392 console.log('getAppName failed', error);
395 $scope.getUserNameFromSession();
396 $scope.getMenu=function() {
400 url: 'get_functional_menu',
401 // TIMEOUT USED FOR LOCAL TESTING ONLY
403 }).success(function (response) {
404 if(response == '101: Timeout') {
405 $log.error('Timeout attempting to get_functional_menu');
406 // TIMEOUT USED FOR LOCAL TESTING ONLY
407 // $scope.createErrorMenu();
408 $scope.megaMenuDataObject = menuStructureConvert('');
410 $log.debug('get_functional_menu success: ' + response);
411 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
412 // createErrorMenu() USED FOR LOCAL TESTING ONLY
413 // $scope.createErrorMenu();
414 $scope.megaMenuDataObject = menuStructureConvert('');
415 // $scope.loadMenufail=true;
417 $scope.jsonMenuData = unflatten( response );
418 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
421 }).error(function (response){
422 // createErrorMenu() USED FOR LOCAL TESTING ONLY
423 // $scope.createErrorMenu();
425 //$scope.loadMenufail=true;
426 $scope.megaMenuDataObject = menuStructureConvert('');
427 $log.debug('REST API failed get_functional_menu...'+ response);
430 $scope.adjustHLeftMenu = function (type){
431 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
433 if($scope.showHeader == true) {
434 $scope.drawer_margin_top = 60;
435 $scope.drawer_custom_top = 54;
436 $scope.toggle_drawer_top = 55;
440 $scope.drawer_margin_top = 50;
441 $scope.drawer_custom_top = 0;
442 $scope.toggle_drawer_top = 10;
444 if(type=='burgerIcon'){
445 return { "top": $scope.toggle_drawer_top+"px"};
446 }else if(type=='leftMenu'){
447 return { "margin-top": $scope.drawer_margin_top+"px"};
451 $scope.adjustHeader=function() {
452 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
454 if($scope.showHeader == true) {
455 $scope.drawer_margin_top = 50;
456 $scope.drawer_custom_top = 54;
457 $scope.toggle_drawer_top = 55;
461 $scope.drawer_margin_top = 40;
462 $scope.drawer_custom_top = 0;
463 $scope.toggle_drawer_top = 10;
471 $scope.adjustHeader();
474 /* **************************************************************************/
475 /* Logic for the favorite menus is here */
477 $scope.loadFavorites = function () {
478 $log.debug('loadFavorites has happened.');
479 if ($scope.favoritesMenuItems == '') {
480 $scope.generateFavoriteItems();
481 $log.debug('loadFavorites is calling generateFavoriteItems()');
483 $log.debug('loadFavorites is NOT calling generateFavoriteItems()');
487 $scope.goToUrl = function (item) {
488 $log.info("goToUrl called")
492 var restrictedApp = item.restrictedApp;
493 $log.debug('Restricted app status is: ' + restrictedApp);
495 $log.info('No url found for this application, doing nothing..');
499 $window.open(url, '_blank');
501 $window.open(url, '_self');
506 $scope.submenuLevelAction = function(index, column) {
507 if ($scope.favoritesMenuItems == '') {
508 $scope.generateFavoriteItems();
509 $log.debug('submenuLevelAction is calling generateFavoriteItems()');
511 $log.debug('item hovered/clicked: ' + index + '; column = ' + column);
512 if (column == 2) { // 2 is Design
513 $scope.favoritesWindow = false;
514 $scope.showFavorites = false;
515 $scope.emptyFavorites = false;
517 if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
518 $log.debug('Showing Favorites window');
519 $scope.favoritesWindow = true;
520 $scope.showFavorites = true;
521 $scope.emptyFavorites = false;
523 if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
524 $log.debug('Hiding Favorites window in favor of No Favorites Window');
525 $scope.favoritesWindow = true;
526 $scope.showFavorites = false;
527 $scope.emptyFavorites = true;
530 $scope.favoritesWindow = false;
531 $scope.showFavorites = false;
532 $scope.emptyFavorites = false;
536 $scope.hideFavoritesWindow = function() {
537 $log.debug('$scope.hideFavoritesWindow has been called');
538 $scope.showFavorites = false;
539 $scope.emptyFavorites = false;
542 $scope.isUrlFavorite = function (menuId) {
543 // $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
544 var jsonMenu = JSON.stringify($scope.favoritesMenuItems);
545 var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId);
546 if (isMenuFavorite==-1) {
554 $scope.generateFavoriteItems = function() {
557 url: 'get_favorites',
558 // TIMEOUT USED FOR LOCAL TESTING ONLY
560 }).success(function (response) {
561 if (response == '101: Timeout') {
562 $log.error('Timeout attempting to get_favorites_menu');
564 if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
565 $log.error('REST API failed get_favorites' + response);
567 $log.debug('get_favorites = ' + JSON.stringify(response));
568 $scope.favoritesMenuItems = response;
569 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
570 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
573 }).error(function (response){
574 $log.error('REST API failed get_favorites' + response);
575 //createFavoriteErrorMenu() USED FOR LOCAL TESTING ONLY
576 // $scope.createFavoriteErrorMenu();
580 $scope.createFavoriteErrorMenu=function() {
581 $scope.favoritesMenuItems = [
584 $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
585 $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
588 /* end of Favorite Menu code */
589 /* **************************************************************************/
592 /* **************************************************************************/
593 // THIS IS USED FOR LOCAL TESTING ONLY
594 /* **************************************************************************/
596 $scope.createErrorMenu=function() {
597 $scope.jsonMenuData = [
602 "parentMenuId": null,
608 "text": "Infrastructure Ordering",
609 "parentMenuId": null,
615 "text": "Service Creation",
616 "parentMenuId": null,
622 "text": "Service Mgmt",
623 "parentMenuId": null,
631 "url": "http://google.com"
636 "text": "Mike Little's Coffee Cup",
638 "url": "http://coffee.com"
643 "text": "Andy and his Astrophotgraphy",
645 "url": "http://nightskypix.com"
652 "url": "http://http://jsonlint.com"
659 "url": "http://ebiz.sbc.com/hronestop"
665 "text": "3rd Level App1c R200",
667 "url": "http://app1c.com"
672 "text": "3rd Level App4b R16",
674 "url": "http://app4b.com"
679 "text": "3rd Level App2b R16",
681 "url": "http://app2b.com"
687 "parentMenuId": null,
691 $scope.jsonMenuData = unflatten( $scope.jsonMenuData );
692 $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
693 // $log.debug(JSON.stringify($scope.jsonMenuData));
695 var childItemList="";
698 childItemList = ${menu.childItemList};
699 parentList = ${menu.parentList};
701 console.log("ebz_header: failed to get child/parent lists", err);
704 var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
706 $scope.menuItems = [];
707 for (var i = 0; i < parentList.length; i++) {
708 $scope.openCurrentMenu = false;
709 if(pageUrl==parentList[i].action)
710 $scope.openCurrentMenu = true;
711 $scope.childItemList = childItemList[i];
712 for(chIndex in $scope.childItemList){
713 if($scope.childItemList.length>0)
714 if($scope.childItemList[chIndex].action!=null){
715 if($scope.childItemList[chIndex].action==pageUrl)
716 $scope.openCurrentMenu = true;
720 parentLabel : parentList[i].label,
721 parentAction : parentList[i].action,
722 parentImageSrc : parentList[i].imageSrc,
723 open:$scope.openCurrentMenu,
724 childItemList : $scope.childItemList
726 $scope.menuItems.push($scope.item);
728 $scope.arrowShow = true;
729 $scope.drawerOpen = false;
730 $scope.subMenuContent = false;
731 $scope.toggleSubMenu = function() {
732 $scope.subMenuContent = !$scope.subMenuContent;
735 var drawerOpen = 'open';
736 if (drawerOpen == 'open') {
737 $scope.drawerOpen = true;
738 $scope.arrowShow = true;
740 $scope.arrowShow = false;
742 $scope.arrowShow = true;
743 $scope.drawerOpen = false;
744 $scope.toggleDrawer = function() {
745 $scope.drawerOpen = !($scope.drawerOpen);
746 if ($scope.drawerOpen) {
747 $scope.arrowShow = true;
748 if (document.getElementById('mContent')!=null)
749 document.getElementById('mContent').style.marginLeft = "0px";
751 $scope.arrowShow = false;
752 if (document.getElementById('mContent')!=null)
753 document.getElementById('mContent').style.marginLeft = "-150px";
756 //var drawerOpen = getCookie('drawerOpen');
757 if (drawerOpen == 'open') {
758 $scope.drawerOpen = true;
759 $scope.arrowShow = true;
761 $scope.arrowShow = false;
763 $timeout(function() {
769 app.filter("ellipsis", function(){
770 return function(text, length){
772 var ellipsis = text.length > length ? "..." : "";
773 return text.slice(0, length) + ellipsis;