mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
refresh category tree when a category is removed
This commit is contained in:
@@ -91,7 +91,9 @@ function($scope, FeedService, CategoryService) {
|
||||
};
|
||||
|
||||
$scope.saveCategory = function() {
|
||||
CategoryService.add($scope.cat);
|
||||
CategoryService.add($scope.cat, function() {
|
||||
CategoryService.init();
|
||||
});
|
||||
$scope.closeCategory();
|
||||
};
|
||||
}]);
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
<div class="control-group" ng-class="{error : !categoryForm.category.$valid}">
|
||||
<label class="control-label">Parent</label>
|
||||
<div class="controls">
|
||||
<select name="category" ng-model="cat.parentId" class="input-block-level" required>
|
||||
<option ng-repeat="cat in CategoryService.flatCategories" value="{{cat.id}}">{{cat.name}}</option>
|
||||
<select name="category" ng-model="cat.parentId" class="input-block-level"
|
||||
ng-options="cat.id as cat.name for cat in CategoryService.flatCategories"required>
|
||||
</select>
|
||||
<span class="help-block" ng-show="!categoryForm.category.$valid">Required</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user