1 <script src="./app/fusion/external/angular-1.5/angular.min.js"></script>
2 <script src="./app/fusion/external/angular-1.5/angular-messages.js"></script>
3 <script src="./app/fusion/external/angular-1.5/angular-touch.js"></script>
4 <script src="./app/fusion/external/angular-1.5/angular-sanitize.js"></script>
5 <script src="./app/fusion/external/angular-1.5/angular-route.min.js"></script>
6 <script src="./app/fusion/external/angular-1.5/angular-cookies.min.js"></script>
7 <script src="./app/fusion/external/ds2/js/b2b-angular/b2b-library.min.js"></script>
8 <script src="./app/fusion/external/ds2/js/digital-ng-library/digital-design-library.js"></script>
9 <script src="./app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
10 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/b2b-angular/b2b-angular.css">
11 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/b2b-angular/b2b-angular.css">
12 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-accordion.css">
13 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-bootstrap-datepicker.css">
14 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-cc-input-field.css">
15 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-tooltip.css">
16 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/extras/x-tabs-pills.css">
17 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-accordion.css">
18 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-bootstrap-datepicker.css">
19 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-c2c.css">
20 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-cc-input-field.css">
21 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-filmstrip.css">
22 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-filters.css">
23 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-legacynav-fix.css">
24 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-marquee.css">
25 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-pagination.css">
26 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-popover.css">
27 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-progressbar.css">
28 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ds2-tooltip.css">
29 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/global.css">
30 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/digital-design-library.css">
32 <link rel="stylesheet" type="text/css" href="./app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
33 <link rel="stylesheet" type="text/css" href="./app/fusion/styles/ecomp.css">
35 angular.module('att.abs.helper', []);
36 angular.module('quantum', []);
37 var appDS2=angular.module("abs", ["ngRoute", 'ngAnimate', 'ngTouch', 'ui.bootstrap', 'ngMessages', 'ngCookies', 'b2b.att.tpls', 'ddh.att.tpls', 'ddh.att.switches', 'b2b.att.footer', 'b2b.att.header', 'btorfs.multiselect']);
40 <script src="./app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
43 appDS2.controller("leftMenuController", ['$scope', '$filter','$http','$timeout','$cookies','LeftMenuServiceDS2', function ($scope, $filter, $http, $timeout, $cookies, LeftMenuServiceDS2) {
45 $scope.leftChildData=[];
46 $scope.leftParentData=[];
47 $scope.leftMenuItems = [];
50 LeftMenuServiceDS2.getLeftMenu().then(function(response){
53 if(j && j !== "null" && j!== "undefined"){
54 $scope.leftParentData = JSON.parse(j.data);
55 $scope.leftChildData = JSON.parse(j.data2);
57 throw "Get Left Menu respsone is not an object/is empty";
60 var leftChildItemList = $scope.leftChildData;
61 var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
62 var leftParentList =$scope.leftParentData;
64 for (var i = 0; i < leftParentList.length; i++) {
66 parentItem.name = leftParentList[i].label;
67 if(parentItem.name == 'Home'){
68 parentItem.imageSrc = /*"icon-location-pinpoint"*/ "icon-building-home";
69 } else if(parentItem.name == 'Sample Pages'){
70 parentItem.imageSrc = "icon-documents-book";
71 } else if(parentItem.name == 'Reports'){
72 parentItem.imageSrc = "icon-misc-piechart";
73 } else if(parentItem.name == 'Profile'){
74 parentItem.imageSrc = "icon-people-oneperson";
75 } else if(parentItem.name == 'Admin'){
76 parentItem.imageSrc = "icon-content-star";
77 } else if(parentItem.name == 'Sample Pages'){
78 parentItem.imageSrc = "icon-content-searchchannels";
80 parentItem.imageSrc = "icon-building-door";
82 parentItem.menuItems = [];
83 for (var j = 0; j < leftChildItemList[i].length; j++) {
84 if(leftChildItemList[i][j].label != null && leftChildItemList[i][j].label.length > 0) {
86 childItem.name = leftChildItemList[i][j].label;
87 childItem.href = leftChildItemList[i][j].action;
88 parentItem.menuItems.push(childItem)
91 $scope.menuData.push(parentItem);
96 $scope.menuData[0].href = leftParentList[0].action;
98 for (var i = 0; i < leftParentList.length; i++) {
100 parentLabel : leftParentList[i].label,
101 parentAction : leftParentList[i].action,
102 parentImageSrc : leftParentList[i].imageSrc,
103 open:pageUrl==leftParentList[i].action?true:false,
104 childItemList : leftChildItemList[i]
108 console.log("error happened while trying to set left menu structure"+err);
111 console.log("error happened while trying to get left menu items"+e);
116 console.log("error happened while calling getLeftMenu"+error);
119 LeftMenuServiceDS2.getAppName().then(function(response){
122 if(j && j !== "null" && j!== "undefined"){
123 console.log("app name is " + $scope.app_name);
124 $scope.app_name_full = j.data;
125 var processed_app_name = j.data;
126 var n = processed_app_name.length;
130 $scope.app_name = processed_app_name.substr(0, n);
132 throw "Get app_name respsone is not an object/is empty";
135 console.log("error happened while trying to get app name "+e);
139 console.log("error happened while calling getAppName "+error);
142 $scope.adjustHeader=function() {
143 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
145 if($scope.showHeader == true) {
146 $scope.drawer_margin_top = 50;
147 $scope.drawer_custom_top = 54;
148 $scope.toggle_drawer_top = 55;
152 $scope.drawer_margin_ top = 40;
153 $scope.drawer_custom_top = 0;
154 $scope.toggle_drawer_top = 10;
160 $scope.adjustHLeftMenu = function (type){
161 $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
163 if($scope.showHeader == true) {
164 $scope.drawer_margin_top = 60;
165 $scope.drawer_custom_top = 54;
166 $scope.toggle_drawer_top = 55;
170 $scope.drawer_margin_top = 50;
171 $scope.drawer_custom_top = 0;
172 $scope.toggle_drawer_top = 10;
174 if(type=='burgerIcon'){
175 return { "top": $scope.toggle_drawer_top+"px"};
176 }else if(type=='leftMenu'){
177 return { "margin-top": $scope.drawer_margin_top+"px"};
181 $scope.adjustHeader();
182 $scope.drawerOpen = true;
184 $scope.toggleDrawer = function() {
185 $scope.drawerOpen = !($scope.drawerOpen);
186 if ($scope.drawerOpen) {
187 // setCookie('drawerOpen','open',30);
188 $scope.arrowShow = true;
191 if (document.getElementById('fnMenueContent')!=null)
192 document.getElementById('fnMenueContent').style.marginLeft = "0px";
194 if (document.getElementById('rightContentAdmin')!=null)
195 document.getElementById('rightContentAdmin').style.marginLeft = "210px";
197 else if (document.getElementById('rightContentProfile')!=null)
198 document.getElementById('rightContentProfile').style.marginLeft = "210px";
201 $scope.arrowShow = false;
203 if (document.getElementById('fnMenueContent')!=null)
204 document.getElementById('fnMenueContent').style.marginLeft = "-150px";
206 if (document.getElementById('rightContentAdmin')!=null) {
207 document.getElementById('rightContentAdmin').style.marginLeft = "50px";
210 else if (document.getElementById('rightContentProfile')!=null)
211 document.getElementById('rightContentProfile').style.marginLeft = "50px";
215 $timeout(function() {
216 //detectScrollEvent();
226 #page-content td, th {
232 <div ng-controller = "leftMenuController">
233 <ddh-left-navigation menu-data="menuData"></ddh-left-navigation>