Merge "Clear task title field on saving a new task"

This commit is contained in:
Zuul 2019-03-06 02:14:40 +00:00 committed by Gerrit Code Review
commit 13984cb8de
5 changed files with 20 additions and 26 deletions

View File

@ -639,6 +639,7 @@ angular.module('sb.story').controller('StoryDetailController',
mapTaskToProject(savedTask);
}
$scope.loadEvents();
task.title = '';
});
};

View File

@ -305,6 +305,7 @@ angular.module('sb.story').controller('StoryNewController',
});
}
$scope.tasks.push(savedTask);
task.title = '';
};
/**

View File

@ -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
@ -591,24 +592,19 @@
</a>
&nbsp;
</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"

View File

@ -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>
&nbsp;
</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"

View File

@ -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;