Commit f36a699d authored by Evren Kutar's avatar Evren Kutar

sidebar icons for menu items

parent 718a96bb
......@@ -32,12 +32,12 @@ app.directive('headerNotification', function ($http, $interval, RESTURL) {
restrict: 'E',
replace: true,
link: function ($scope) {
//$interval(function () {
// // todo: change url to backend
// $http.get(RESTURL.url+"notify").success(function (data) {
// $scope.notifications = data;
// });
//}, 15000);
$interval(function () {
// todo: change url to backend
$http.get(RESTURL.url+"notify").success(function (data) {
$scope.notifications = data;
});
}, 15000);
}
};
});
......@@ -146,7 +146,7 @@ app.directive('sidebar', ['$location', function () {
$('#side-menu').metisMenu();
$http.get(RESTURL.url + 'menu/').success(function (data) {
//$scope.allMenuItems = angular.copy(data.generic);
$scope.menuItems = {"generic": data.other};
$scope.menuItems = data;
// $scope.menuItems = []; // angular.copy($scope.allMenuItems);
// at start define breadcrumblinks for breadcrumb
......
......@@ -14,13 +14,16 @@
<li ng-repeat="(key, item) in menuItems" ng-class="{active: collapseVar == $index+1}">{{dropDown}}
<a href="" ng-click="check($index+1)">
<i class="fa fa-fw fa-cogs"
ng-class="{generic: 'fa fa-fw fa-wrench', ogrenci: 'fa fa-fw fa-book'}[key]"></i>
ng-class="{
'other': 'fa fa-fw fa-wrench',
'ogrenci': 'fa fa-fw fa-university',
'personel': 'fa fa-fw fa-users'}[key]"></i>
<span class="menu-text" ng-class="{hidden: $root.collapsed}">{{ key }}</span>
<span class="fa arrow" ng-class="{hidden: $root.collapsed}"></span>
</a>
<ul class="nav nav-second-level" ng-class="{hidden: $root.collapsed}">
<li ng-repeat="v in item">
<a ng-href="#{{v.url}}/?{{v.param}}={{$root.selectedUser.key}}"
<a ng-href="#{{v.url}}?{{v.param}}={{$root.selectedUser.key}}"
ng-click="breadcrumb([key, v.text])">{{v.text}}</a>
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment