add categories

This commit is contained in:
Athou
2013-03-31 08:17:28 +02:00
parent 5a4d11c4de
commit 89c7a00ebf
8 changed files with 137 additions and 13 deletions

View File

@@ -88,6 +88,22 @@ module.directive('subscribe', function(SubscriptionService) {
SubscriptionService.init();
$scope.closeImport();
};
$scope.cat = {};
$scope.openCategory= function(){
$scope.isOpenCategory = true;
$scope.cat = {};
};
$scope.closeCategory= function(){
$scope.isOpenCategory = false;
};
$scope.saveCategory = function() {
SubscriptionService.addCategory($scope.cat);
$scope.closeCategory();
};
}
};
});
@@ -147,7 +163,7 @@ module.directive('category', function($compile) {
});
module.directive('toolbar', function($stateParams, $route, $location,
SettingsService, EntryService, SubscriptionService) {
SettingsService, EntryService, SubscriptionService, SessionService) {
return {
scope : {},
restrict : 'E',
@@ -158,6 +174,8 @@ module.directive('toolbar', function($stateParams, $route, $location,
function totalActiveAjaxRequests() {
return ($http.pendingRequests.length + $.active);
}
$scope.session = SessionService.get();
$scope.loading = true;
$scope.$watch(totalActiveAjaxRequests, function() {