This commit is contained in:
Athou
2013-10-13 12:04:29 +02:00
parent 431ab92a02
commit c993bd472d

View File

@@ -152,13 +152,6 @@ module.controller('CategoryTreeCtrl', ['$scope', '$timeout', '$stateParams', '$w
}
}, true);
$scope.toTag = function(tag) {
$state.transitionTo('feeds.view', {
_type : 'tag',
_id : tag
});
};
$scope.$on('$stateChangeSuccess', function() {
$scope.selectedType = $stateParams._type;
$scope.selectedId = $stateParams._id;
@@ -459,50 +452,6 @@ module.controller('TagDetailsCtrl', ['$scope', '$state', '$stateParams', 'FeedSe
_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', [