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