From 148bf110ba1d6dd594ec0ce3248f749a4dbdacd8 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 2 Feb 2019 11:06:51 +0000 Subject: [PATCH] Clear task title field on saving a new task When adding many tasks consecutively, it is frustrating to have to clear the task title field manually. It is unlikely that the user wants to create many tasks with the same name. This commit improves this by clearing the task title field when a new task is saved, to remove the need to manually clear it. Change-Id: I9ba08d9258de220a59a46c5b77163cba0b3d09c8 --- .../controller/story_detail_controller.js | 1 + .../controller/story_new_controller.js | 1 + src/app/stories/template/detail.html | 20 +++++++----------- src/app/stories/template/new_page.html | 21 +++++++------------ src/theme/base/_edit_tasks.scss | 3 ++- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/app/stories/controller/story_detail_controller.js b/src/app/stories/controller/story_detail_controller.js index 4aa09855..7c85f2ce 100644 --- a/src/app/stories/controller/story_detail_controller.js +++ b/src/app/stories/controller/story_detail_controller.js @@ -639,6 +639,7 @@ angular.module('sb.story').controller('StoryDetailController', mapTaskToProject(savedTask); } $scope.loadEvents(); + task.title = ''; }); }; diff --git a/src/app/stories/controller/story_new_controller.js b/src/app/stories/controller/story_new_controller.js index 25fa5061..7aea210f 100644 --- a/src/app/stories/controller/story_new_controller.js +++ b/src/app/stories/controller/story_new_controller.js @@ -305,6 +305,7 @@ angular.module('sb.story').controller('StoryNewController', }); } $scope.tasks.push(savedTask); + task.title = ''; }; /** diff --git a/src/app/stories/template/detail.html b/src/app/stories/template/detail.html index a7036bcf..787ef046 100644 --- a/src/app/stories/template/detail.html +++ b/src/app/stories/template/detail.html @@ -1,6 +1,7 @@