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 * ================================================================================
21 * Created by nnaffar on 1/28/16.
25 constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {
26 this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';
28 this.$rootScope = $rootScope;
29 this.userbarUpdateService = userbarUpdateService;
30 this.notificationService = notificationService;
31 this.auditLogService= auditLogService;
32 this.link = this._link.bind(this);
44 scope.refreshOnlineUsers = () => {
45 this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);
48 scope.refreshNotification = () => {
49 this.notificationService.setRefreshCount(this.notificationService.maxCount);
52 scope.toggleSidebar = () => {
53 scope.isOpen = !scope.isOpen;
54 if(scope.isOpen==true)
59 scope.auditLog =(name) => {
60 this.auditLogService.storeAudit(1,'leftMenu',name);
64 scope.isBrowserInternetExplorer = false;
65 scope.browserName = bowser.name;
67 if (bowser.msie || bowser.msedge) {
68 scope.isBrowserInternetExplorer = true;
70 scope.isBrowserInternetExplorer = false;
74 this.$rootScope.$on('$stateChangeStart', () => {
79 angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));
82 function setContentPos(open) {
83 // console.log("*******************************************");
85 $("#page-content" ).css( "padding-left", "210px" );
87 $("#page-content" ).css( "padding-left", "50px" );