From cff5fbf72fefe541d2780788d03b524276c7eeb4 Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Sat, 21 Jul 2018 08:43:43 -0500 Subject: [PATCH] Select all tag after deleting tag --- app/assets/javascripts/app/controllers/home.js | 1 - app/assets/javascripts/app/controllers/tags.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/home.js b/app/assets/javascripts/app/controllers/home.js index 597f276c7..2ed1ee0df 100644 --- a/app/assets/javascripts/app/controllers/home.js +++ b/app/assets/javascripts/app/controllers/home.js @@ -206,7 +206,6 @@ angular.module('app') $scope.removeTag = function(tag) { if(confirm("Are you sure you want to delete this tag? Note: deleting a tag will not delete its notes.")) { modelManager.setItemToBeDeleted(tag); - // if no more notes, delete tag syncManager.sync().then(() => { // force scope tags to update on sub directives $scope.safeApply(); diff --git a/app/assets/javascripts/app/controllers/tags.js b/app/assets/javascripts/app/controllers/tags.js index bb9149f89..2017b7679 100644 --- a/app/assets/javascripts/app/controllers/tags.js +++ b/app/assets/javascripts/app/controllers/tags.js @@ -158,6 +158,7 @@ angular.module('app') this.selectedDeleteTag = function(tag) { this.removeTag()(tag); + this.selectTag(this.allTag); } this.noteCount = function(tag) {