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
This commit is contained in:
parent
884ca37c39
commit
148bf110ba
src
app/stories
theme/base
@ -639,6 +639,7 @@ angular.module('sb.story').controller('StoryDetailController',
|
||||
mapTaskToProject(savedTask);
|
||||
}
|
||||
$scope.loadEvents();
|
||||
task.title = '';
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -305,6 +305,7 @@ angular.module('sb.story').controller('StoryNewController',
|
||||
});
|
||||
}
|
||||
$scope.tasks.push(savedTask);
|
||||
task.title = '';
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!--
|
||||
~ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
|
||||
~ Copyright (c) 2016 Codethink Ltd.
|
||||
~ Copyright (c) 2019 Adam Coldrick
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
~ not use this file except in compliance with the License. You may obtain
|
||||
@ -597,24 +598,19 @@
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<input-inline
|
||||
auto-focus="true"
|
||||
ng-model="projects[name].branches[branchName].newTask.title"
|
||||
enabled="isLoggedIn"
|
||||
on-change="updateTaskInline()"
|
||||
empty-prompt="Click to assign."
|
||||
empty-disabled-prompt="Not assigned."
|
||||
maxlength="255"
|
||||
as-inline="false"
|
||||
placeholder="Enter task name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
focus="true"
|
||||
ng-model="projects[name].branches[branchName].newTask.title"
|
||||
maxlength="255"
|
||||
placeholder="Enter task name"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<user-typeahead
|
||||
auto-focus="false"
|
||||
ng-model="projects[name].branches[branchName].newTask.assignee_id"
|
||||
enabled="isLoggedIn"
|
||||
on-change="updateTaskInline()"
|
||||
empty-prompt="Click to assign."
|
||||
empty-disabled-prompt="Not assigned."
|
||||
as-inline="false"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
~ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
|
||||
~ Copyright (c) 2016 Codethink Ltd.
|
||||
~ Copyright (c) 2017 Adam Coldrick
|
||||
~ Copyright (c) 2017, 2019 Adam Coldrick
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
~ not use this file except in compliance with the License. You may obtain
|
||||
@ -454,24 +454,19 @@
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<input-inline
|
||||
auto-focus="true"
|
||||
ng-model="projects[name].branches[branchName].newTask.title"
|
||||
enabled="isLoggedIn"
|
||||
on-change="updateTaskInline()"
|
||||
empty-prompt="Click to assign."
|
||||
empty-disabled-prompt="Not assigned."
|
||||
maxlength="255"
|
||||
as-inline="false"
|
||||
placeholder="Enter task name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
focus="true"
|
||||
ng-model="projects[name].branches[branchName].newTask.title"
|
||||
maxlength="255"
|
||||
placeholder="Enter task name"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<user-typeahead
|
||||
auto-focus="false"
|
||||
ng-model="projects[name].branches[branchName].newTask.assignee_id"
|
||||
enabled="isLoggedIn"
|
||||
on-change="updateTaskInline()"
|
||||
empty-prompt="Click to assign."
|
||||
empty-disabled-prompt="Not assigned."
|
||||
as-inline="false"
|
||||
|
@ -41,8 +41,9 @@
|
||||
padding-bottom : 10px;
|
||||
}
|
||||
|
||||
input-inline, project-typeahead, user-typeahead, task-status-dropdown {
|
||||
.task-title input, input-inline, project-typeahead, user-typeahead, task-status-dropdown {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
|
||||
& .form-group {
|
||||
margin-bottom: 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user