tag deletion

This commit is contained in:
Mo Bitar
2016-12-26 01:19:00 -06:00
parent e3ea390abd
commit 9f13f659cc
5 changed files with 7 additions and 5 deletions

View File

@@ -927,8 +927,9 @@ angular.module('app.frontend').controller('BaseCtrl', BaseCtrl);
$scope.notesRemoveTag = function (tag) {
var validNotes = Note.filterDummyNotes(tag.notes);
if (validNotes == 0) {
modelManager.deleteTag(tag);
// if no more notes, delete tag
apiController.deleteItem($scope.defaultUser, tag, function () {
apiController.deleteItem(tag, function () {
// force scope tags to update on sub directives
$scope.tags = [];
$timeout(function () {

File diff suppressed because one or more lines are too long