Open edit form when edit us button clicked.
parent
c43197420a
commit
d7b0b6d1b6
|
@ -27,7 +27,7 @@ CreateEditUserstoryDirective = ($repo, $model) ->
|
|||
$scope.us = {"subject": "KAKA"}
|
||||
$el.removeClass("hidden")
|
||||
|
||||
$scope.$on "usform:change", (ctx, us) ->
|
||||
$scope.$on "usform:edit", (ctx, us) ->
|
||||
$el.removeClass("hidden")
|
||||
$scope.us = us
|
||||
|
||||
|
|
|
@ -90,6 +90,9 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
|
||||
## Template actions
|
||||
|
||||
editUserStory: (us) ->
|
||||
@rootscope.$broadcast("usform:edit", us)
|
||||
|
||||
deleteUserStory: (us) ->
|
||||
title = "Delete User Story"
|
||||
subtitle = us.subject
|
||||
|
|
|
@ -4,7 +4,7 @@ div.row.us-item-row(ng-repeat="us in visibleUserstories track by us.id")
|
|||
input(type="checkbox", name="")
|
||||
a(href="") {{ us.subject }}
|
||||
span.us-settings
|
||||
a.icon.icon-edit(href="", ng-click="ctrl.deleteUserStory(us)", title="Edit")
|
||||
a.icon.icon-edit(href="", ng-click="ctrl.editUserStory(us)", title="Edit")
|
||||
a.icon.icon-delete(href="", ng-click="ctrl.deleteUserStory(us)", title="Delete")
|
||||
div.user-story-tags
|
||||
span.tag Tag name
|
||||
|
|
|
@ -5,7 +5,7 @@ form
|
|||
fieldset
|
||||
input(type="text", ng-model="us.subject", tg-i18n="placeholder:common.subject")
|
||||
fieldset
|
||||
select(ng-model="us.status", ng-options="s.name for s in statusList",
|
||||
select(ng-model="us.status", ng-options="s.id as s.name for s in statusList",
|
||||
tg-i18n="placeholder:common.status")
|
||||
fieldset
|
||||
input(type="text", placeholder="Tags", tg-tags, ng-model="us.tags")
|
||||
|
|
Loading…
Reference in New Issue