save settings on read mode change

This commit is contained in:
Athou
2013-03-23 23:14:14 +01:00
parent f0ac0d1722
commit 0b1241ebf9
11 changed files with 91 additions and 36 deletions

View File

@@ -23,4 +23,21 @@ module.directive('category', function($compile) {
$compile(ul.contents())(scope);
}
};
});
module.directive('toolbar', function(SettingsService) {
return {
scope : {},
restrict : 'E',
replace : true,
templateUrl : 'directives/toolbar.html',
controller : function($scope, SettingsService) {
$scope.settings = SettingsService.settings;
},
link : function($scope, element) {
element.find('button').bind('click', function() {
SettingsService.save();
});
}
};
});