Add Create Story Button in Worklists

Now you can create a story and its tasks in the middle of adding
items to a board or worklist.

Change-Id: Ia531b62e98b68b9d82e0d046055bdc657014deb1
This commit is contained in:
Zara 2016-01-19 13:58:41 +00:00
parent 33a3c29db1
commit 4a70d58625
3 changed files with 13 additions and 2 deletions

View File

@ -19,7 +19,7 @@
*/
angular.module('sb.worklist').controller('WorklistAddItemController',
function ($log, $scope, $state, worklist, $modalInstance, Story, Task,
Criteria, Worklist, $q, valid) {
NewStoryService, Criteria, Worklist, $q, valid) {
'use strict';
$scope.worklist = worklist;
@ -30,6 +30,10 @@ angular.module('sb.worklist').controller('WorklistAddItemController',
$scope.loadingItems = false;
$scope.error = {};
$scope.newStory = function () {
NewStoryService.showNewStoryModal();
};
var unstaged = function(item) {
var accept = true;
angular.forEach($scope.items, function(selectedItem) {

View File

@ -18,7 +18,8 @@
* The StoryBoard story submodule handles most activity surrounding the
* creation and management of stories, their tasks, and comments.
*/
angular.module('sb.worklist', ['ui.router', 'sb.services', 'sb.util',
angular.module('sb.worklist',
['ui.router', 'sb.services', 'sb.util',
'ui.bootstrap'])
.config(function ($stateProvider, $urlRouterProvider) {
'use strict';

View File

@ -119,6 +119,12 @@
<div class="btn" ng-show="saving">
<i class="fa fa-spinner fa-lg fa-spin"></i>
</div>
<button type ="button"
class="btn btn-primary pull-left"
ng-click="newStory()"
ng-disabled="saving">
Create Story
</button>
<button type="button"
class="btn btn-primary"
ng-click="save()"