Commit dee87179 authored by Evren Kutar's avatar Evren Kutar

v0.0.3.1

breadcrumb fix
parent 9bd2ef29
...@@ -49,18 +49,11 @@ app.directive('headerSubMenu', function () { ...@@ -49,18 +49,11 @@ app.directive('headerSubMenu', function () {
} }
}); });
app.directive('headerBreadcrumb', function ($location) { app.directive('headerBreadcrumb', function () {
return { return {
templateUrl: 'shared/templates/directives/header-breadcrumb.html', templateUrl: 'shared/templates/directives/header-breadcrumb.html',
restrict: 'E', restrict: 'E',
replace: true, replace: true
link: function($scope, $rootScope){
//$scope.$watch('$routeUpdate', function(){
// todo: create actual links
//$scope.links = $location.path().split('/');
//$scope.links = $rootScope.links;
//});
}
} }
}); });
...@@ -80,6 +73,8 @@ app.directive('sidebar', ['$location', function () { ...@@ -80,6 +73,8 @@ app.directive('sidebar', ['$location', function () {
angular.forEach(value[1], function (v, k) { angular.forEach(value[1], function (v, k) {
if(v[1] == $location.path().split('/')[1]){ if(v[1] == $location.path().split('/')[1]){
$rootScope.breadcrumblinks = [value[0], v[0]]; $rootScope.breadcrumblinks = [value[0], v[0]];
} else {
$rootScope.breadcrumblinks = ['Panel'];
} }
}); });
}); });
...@@ -93,7 +88,7 @@ app.directive('sidebar', ['$location', function () { ...@@ -93,7 +88,7 @@ app.directive('sidebar', ['$location', function () {
}, 2000); }, 2000);
$scope.selectedMenu = $location.path(); $scope.selectedMenu = $location.path();
$scope.collapseVar = 0; $scope.collapseVar = 1;
$scope.multiCollapseVar = 0; $scope.multiCollapseVar = 0;
$scope.check = function (x) { $scope.check = function (x) {
...@@ -117,9 +112,7 @@ app.directive('sidebar', ['$location', function () { ...@@ -117,9 +112,7 @@ app.directive('sidebar', ['$location', function () {
else else
$scope.multiCollapseVar = y; $scope.multiCollapseVar = y;
}; };
},
link: function(){
$('#side-menu').metisMenu();
} }
} }
}]); }]);
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<ul class="nav in sidebarscroll" id="side-menu" ng-class="{hidden: $root.loggedInUser != true}"> <ul class="nav in sidebarscroll" id="side-menu" ng-class="{hidden: $root.loggedInUser != true}">
<!--<sidebar-search></sidebar-search>--> <!--<sidebar-search></sidebar-search>-->
<li ui-sref-active="active"> <li ui-sref-active="active">
<a href="#/dashboard"><i class="fa fa-dashboard fa-fw"></i> Panel</a> <a href="#/dashboard" ng-click="breadcrumb(['Panel'])"><i class="fa fa-dashboard fa-fw"></i>
Panel</a>
</li> </li>
<li ng-repeat="(key, item) in menuItems" ng-class="{active: collapseVar == $index+1}">{{dropDown}} <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-wrench fa-fw"></i> {{ item[0] }}<span <a href="" ng-click="check($index+1)"><i class="fa fa-wrench fa-fw"></i> {{ item[0] }}<span
......
This diff is collapsed.
...@@ -942,7 +942,8 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa ...@@ -942,7 +942,8 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
" <ul class=\"nav in sidebarscroll\" id=\"side-menu\" ng-class=\"{hidden: $root.loggedInUser != true}\">\n" + " <ul class=\"nav in sidebarscroll\" id=\"side-menu\" ng-class=\"{hidden: $root.loggedInUser != true}\">\n" +
" <!--<sidebar-search></sidebar-search>-->\n" + " <!--<sidebar-search></sidebar-search>-->\n" +
" <li ui-sref-active=\"active\">\n" + " <li ui-sref-active=\"active\">\n" +
" <a href=\"#/dashboard\"><i class=\"fa fa-dashboard fa-fw\"></i> Panel</a>\n" + " <a href=\"#/dashboard\" ng-click=\"breadcrumb(['Panel'])\"><i class=\"fa fa-dashboard fa-fw\"></i>\n" +
" Panel</a>\n" +
" </li>\n" + " </li>\n" +
" <li ng-repeat=\"(key, item) in menuItems\" ng-class=\"{active: collapseVar == $index+1}\">{{dropDown}}\n" + " <li ng-repeat=\"(key, item) in menuItems\" ng-class=\"{active: collapseVar == $index+1}\">{{dropDown}}\n" +
" <a href=\"\" ng-click=\"check($index+1)\"><i class=\"fa fa-wrench fa-fw\"></i> {{ item[0] }}<span\n" + " <a href=\"\" ng-click=\"check($index+1)\"><i class=\"fa fa-wrench fa-fw\"></i> {{ item[0] }}<span\n" +
......
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