remove previous validation lightbox errors

stable
Juanfran 2016-02-03 09:16:55 +01:00
parent 78ebcdfbb5
commit a8da4d66a8
3 changed files with 17 additions and 0 deletions

View File

@ -36,8 +36,11 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading,
link = ($scope, $el, attrs) ->
hasErrors = false
createSprint = true
form = null
resetSprint = () ->
form.reset() if form
$scope.sprint = {
project: null
name: null

View File

@ -268,6 +268,7 @@ module.directive("tgBlockingMessageInput", ["$log", "$tgTemplate", "$compile", B
CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService, $loading, $translate, $confirm, $q, attachmentsService) ->
link = ($scope, $el, attrs) ->
form = null
$scope.createEditUs = {}
$scope.isNew = true
@ -285,6 +286,7 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
attachmentsToDelete = attachmentsToDelete.push(attachment)
$scope.$on "usform:new", (ctx, projectId, status, statusList) ->
form.reset() if form
$scope.isNew = true
$scope.usStatusList = statusList
$scope.attachments = Immutable.List()
@ -312,6 +314,8 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
lightboxService.open($el)
$scope.$on "usform:edit", (ctx, us, attachments) ->
form.reset() if form
$scope.us = us
$scope.attachments = Immutable.fromJS(attachments)
$scope.isNew = false
@ -431,7 +435,11 @@ module.directive("tgLbCreateEditUserstory", [
CreateBulkUserstoriesDirective = ($repo, $rs, $rootscope, lightboxService, $loading) ->
link = ($scope, $el, attrs) ->
form = null
$scope.$on "usform:bulk", (ctx, projectId, status) ->
form.reset() if form
$scope.new = {
projectId: projectId
statusId: status

View File

@ -39,6 +39,8 @@ CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService, $loading,
$scope.attachments = Immutable.List()
$scope.$on "issueform:new", (ctx, project)->
form.reset()
attachmentsToAdd = Immutable.List()
$el.find(".tag-input").val("")
@ -116,7 +118,11 @@ module.directive("tgLbCreateIssue", ["$tgRepo", "$tgConfirm", "$rootScope", "lig
CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, $loading, lightboxService) ->
link = ($scope, $el, attrs) ->
form = null
$scope.$on "issueform:bulk", (ctx, projectId, status)->
form.reset() if form
lightboxService.open($el)
$scope.new = {
projectId: projectId