forked from Archives/Athou_commafeed
cleanup
This commit is contained in:
@@ -152,13 +152,6 @@ module.controller('CategoryTreeCtrl', ['$scope', '$timeout', '$stateParams', '$w
|
|||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
$scope.toTag = function(tag) {
|
|
||||||
$state.transitionTo('feeds.view', {
|
|
||||||
_type : 'tag',
|
|
||||||
_id : tag
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.$on('$stateChangeSuccess', function() {
|
$scope.$on('$stateChangeSuccess', function() {
|
||||||
$scope.selectedType = $stateParams._type;
|
$scope.selectedType = $stateParams._type;
|
||||||
$scope.selectedId = $stateParams._id;
|
$scope.selectedId = $stateParams._id;
|
||||||
@@ -459,50 +452,6 @@ module.controller('TagDetailsCtrl', ['$scope', '$state', '$stateParams', 'FeedSe
|
|||||||
_type : 'tag'
|
_type : 'tag'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.deleteTag = function() {
|
|
||||||
var category = $scope.category;
|
|
||||||
var title = 'Delete tag';
|
|
||||||
var msg = 'Delete tag ' + tag + ' ?';
|
|
||||||
var btns = [{
|
|
||||||
result : 'cancel',
|
|
||||||
label : 'Cancel'
|
|
||||||
}, {
|
|
||||||
result : 'ok',
|
|
||||||
label : 'OK',
|
|
||||||
cssClass : 'btn-primary'
|
|
||||||
}];
|
|
||||||
|
|
||||||
$dialog.messageBox(title, msg, btns).open().then(function(result) {
|
|
||||||
if (result == 'ok') {
|
|
||||||
CategoryService.remove({
|
|
||||||
id : category.id
|
|
||||||
}, function() {
|
|
||||||
CategoryService.init();
|
|
||||||
});
|
|
||||||
$state.transitionTo('feeds.view', {
|
|
||||||
_id : 'all',
|
|
||||||
_type : 'category'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.save = function() {
|
|
||||||
var cat = $scope.category;
|
|
||||||
CategoryService.modify({
|
|
||||||
id : cat.id,
|
|
||||||
name : cat.name,
|
|
||||||
position : cat.position,
|
|
||||||
parentId : cat.parentId
|
|
||||||
}, function() {
|
|
||||||
CategoryService.init();
|
|
||||||
$state.transitionTo('feeds.view', {
|
|
||||||
_id : 'all',
|
|
||||||
_type : 'category'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
module.controller('ToolbarCtrl', [
|
module.controller('ToolbarCtrl', [
|
||||||
|
|||||||
Reference in New Issue
Block a user