2 * ================================================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ================================================================================
\r
21 * Created by nnaffar on 1/28/16.
\r
25 constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {
\r
26 this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';
\r
27 this.restrict = 'AE';
\r
28 this.$rootScope = $rootScope;
\r
29 this.userbarUpdateService = userbarUpdateService;
\r
30 this.notificationService = notificationService;
\r
31 this.auditLogService= auditLogService;
\r
32 this.link = this._link.bind(this);
\r
39 scope.isOpen = true;
\r
44 scope.refreshOnlineUsers = () => {
\r
45 this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);
\r
48 scope.refreshNotification = () => {
\r
49 this.notificationService.setRefreshCount(this.notificationService.maxCount);
\r
52 scope.toggleSidebar = () => {
\r
53 scope.isOpen = !scope.isOpen;
\r
54 if(scope.isOpen==true)
\r
59 scope.auditLog =(name) => {
\r
60 this.auditLogService.storeAudit(1,'leftMenu',name);
\r
64 scope.isBrowserInternetExplorer = false;
\r
65 scope.browserName = bowser.name;
\r
67 if (bowser.msie || bowser.msedge) {
\r
68 scope.isBrowserInternetExplorer = true;
\r
70 scope.isBrowserInternetExplorer = false;
\r
74 this.$rootScope.$on('$stateChangeStart', () => {
\r
75 scope.isOpen = true;
\r
79 angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));
\r
82 function setContentPos(open) {
\r
83 // console.log("*******************************************");
\r
85 $("#page-content" ).css( "padding-left", "210px" );
\r
87 $("#page-content" ).css( "padding-left", "50px" );
\r