unify form submit
parent
bb5eaa8633
commit
33c427b072
|
@ -30,7 +30,7 @@ MAX_MEMBERSHIP_FIELDSETS = 4
|
||||||
## Create Members Lightbox Directive
|
## Create Members Lightbox Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
CreateMembersDirective = ($rs, $rootScope, $confirm, lightboxService) ->
|
CreateMembersDirective = ($rs, $rootScope, $confirm, $loading ,lightboxService) ->
|
||||||
extraTextTemplate = """
|
extraTextTemplate = """
|
||||||
<fieldset class="extra-text">
|
<fieldset class="extra-text">
|
||||||
<textarea placeholder="(Optional) Add a personalized text to the invitation. Tell something lovely to your new members ;-)"></textarea>
|
<textarea placeholder="(Optional) Add a personalized text to the invitation. Tell something lovely to your new members ;-)"></textarea>
|
||||||
|
@ -103,15 +103,19 @@ CreateMembersDirective = ($rs, $rootScope, $confirm, lightboxService) ->
|
||||||
$el.find(".add-member-wrapper fieldset:last > a").removeClass("icon-plus add-fieldset")
|
$el.find(".add-member-wrapper fieldset:last > a").removeClass("icon-plus add-fieldset")
|
||||||
.addClass("icon-delete delete-fieldset")
|
.addClass("icon-delete delete-fieldset")
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
onSuccess = (data) ->
|
onSuccess = (data) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
$rootScope.$broadcast("membersform:new:success")
|
$rootScope.$broadcast("membersform:new:success")
|
||||||
|
|
||||||
onError = (data) ->
|
onError = (data) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
$rootScope.$broadcast("membersform:new:error")
|
$rootScope.$broadcast("membersform:new:error")
|
||||||
|
@ -143,7 +147,12 @@ CreateMembersDirective = ($rs, $rootScope, $confirm, lightboxService) ->
|
||||||
|
|
||||||
$rs.memberships.bulkCreateMemberships($scope.project.id, invitations, invitation_extra_text).then(onSuccess, onError)
|
$rs.memberships.bulkCreateMemberships($scope.project.id, invitations, invitation_extra_text).then(onSuccess, onError)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
module.directive("tgLbCreateMembers", ["$tgResources", "$rootScope", "$tgConfirm", "lightboxService",
|
module.directive("tgLbCreateMembers", ["$tgResources", "$rootScope", "$tgConfirm", "$tgLoading", "lightboxService",
|
||||||
CreateMembersDirective])
|
CreateMembersDirective])
|
||||||
|
|
|
@ -27,6 +27,7 @@ toString = @.taiga.toString
|
||||||
joinStr = @.taiga.joinStr
|
joinStr = @.taiga.joinStr
|
||||||
groupBy = @.taiga.groupBy
|
groupBy = @.taiga.groupBy
|
||||||
bindOnce = @.taiga.bindOnce
|
bindOnce = @.taiga.bindOnce
|
||||||
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaAdmin")
|
module = angular.module("taigaAdmin")
|
||||||
|
|
||||||
|
@ -95,14 +96,16 @@ module.controller("ProjectProfileController", ProjectProfileController)
|
||||||
ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location) ->
|
ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
||||||
submit = (target) =>
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
return if not form.validate()
|
return if not form.validate()
|
||||||
|
|
||||||
$loading.start(target)
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise = $repo.save($scope.project)
|
promise = $repo.save($scope.project)
|
||||||
promise.then ->
|
promise.then ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
newUrl = $navurls.resolve("project-admin-project-profile-details", {project: $scope.project.slug})
|
newUrl = $navurls.resolve("project-admin-project-profile-details", {project: $scope.project.slug})
|
||||||
$location.path(newUrl)
|
$location.path(newUrl)
|
||||||
|
@ -114,24 +117,51 @@ ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location) ->
|
||||||
if data._error_message
|
if data._error_message
|
||||||
$confirm.notify("error", data._error_message)
|
$confirm.notify("error", data._error_message)
|
||||||
|
|
||||||
$el.on "submit", "form", (event) ->
|
submitButton = $el.find(".submit-button");
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", ".default-values a.button-green", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
target = angular.element(event.currentTarget)
|
|
||||||
submit(target)
|
|
||||||
|
|
||||||
$el.on "click", ".project-details a.button-green", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
target = angular.element(event.currentTarget)
|
|
||||||
submit(target)
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation", ProjectProfileDirective])
|
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation", ProjectProfileDirective])
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
## Project Default Values Directive
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
ProjectDefaultValuesDirective = ($repo, $confirm, $loading) ->
|
||||||
|
link = ($scope, $el, $attrs) ->
|
||||||
|
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
||||||
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
return if not form.validate()
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
|
promise = $repo.save($scope.project)
|
||||||
|
promise.then ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
|
$confirm.notify("success")
|
||||||
|
|
||||||
|
promise.then null, (data) ->
|
||||||
|
$loading.finish(target)
|
||||||
|
form.setErrors(data)
|
||||||
|
if data._error_message
|
||||||
|
$confirm.notify("error", data._error_message)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
|
$scope.$on "$destroy", ->
|
||||||
|
$el.off()
|
||||||
|
|
||||||
|
return {link:link}
|
||||||
|
|
||||||
|
module.directive("tgProjectDefaultValues", ["$tgRepo", "$tgConfirm", "$tgLoading", ProjectDefaultValuesDirective])
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Project Modules Directive
|
## Project Modules Directive
|
||||||
|
|
|
@ -208,7 +208,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
|
||||||
animationFrame.add () ->
|
animationFrame.add () ->
|
||||||
goToBottomList()
|
goToBottomList()
|
||||||
|
|
||||||
$el.find(".new-value").hide()
|
$el.find(".new-value").addClass("hidden")
|
||||||
initializeNewValue()
|
initializeNewValue()
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
|
|
|
@ -23,6 +23,7 @@ taiga = @.taiga
|
||||||
|
|
||||||
mixOf = @.taiga.mixOf
|
mixOf = @.taiga.mixOf
|
||||||
bindMethods = @.taiga.bindMethods
|
bindMethods = @.taiga.bindMethods
|
||||||
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaAdmin")
|
module = angular.module("taigaAdmin")
|
||||||
|
|
||||||
|
@ -94,30 +95,28 @@ module.directive("tgSelectInputText", SelectInputText)
|
||||||
GithubWebhooksDirective = ($repo, $confirm, $loading) ->
|
GithubWebhooksDirective = ($repo, $confirm, $loading) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
||||||
submit = (target) =>
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
return if not form.validate()
|
return if not form.validate()
|
||||||
|
|
||||||
$loading.start(target)
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise = $repo.saveAttribute($scope.github, "github")
|
promise = $repo.saveAttribute($scope.github, "github")
|
||||||
promise.then ->
|
promise.then ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
if data._error_message
|
if data._error_message
|
||||||
$confirm.notify("error", data._error_message)
|
$confirm.notify("error", data._error_message)
|
||||||
|
|
||||||
$el.on "click", "a.button-green", (event) ->
|
submitButton = $el.find(".submit-button")
|
||||||
event.preventDefault()
|
|
||||||
target = angular.element(event.currentTarget)
|
|
||||||
submit(target)
|
|
||||||
|
|
||||||
$el.on "submit", "form", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,9 @@ LoginDirective = ($auth, $confirm, $location, $config, $routeParams, $navUrls, $
|
||||||
onError = (response) ->
|
onError = (response) ->
|
||||||
$confirm.notify("light-error", "According to our Oompa Loompas, your username/email
|
$confirm.notify("light-error", "According to our Oompa Loompas, your username/email
|
||||||
or password are incorrect.") #TODO: i18n
|
or password are incorrect.") #TODO: i18n
|
||||||
submit = ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
form = new checksley.Form($el.find("form.login-form"))
|
form = new checksley.Form($el.find("form.login-form"))
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
@ -202,13 +204,8 @@ LoginDirective = ($auth, $confirm, $location, $config, $routeParams, $navUrls, $
|
||||||
promise = $auth.login(data)
|
promise = $auth.login(data)
|
||||||
return promise.then(onSuccess, onError)
|
return promise.then(onSuccess, onError)
|
||||||
|
|
||||||
$el.on "click", "a.button-login", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "submit", "form", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
@ -239,20 +236,17 @@ RegisterDirective = ($auth, $confirm, $location, $navUrls, $config, $analytics)
|
||||||
|
|
||||||
form.setErrors(response.data)
|
form.setErrors(response.data)
|
||||||
|
|
||||||
submit = debounce 2000, =>
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.register($scope.data)
|
promise = $auth.register($scope.data)
|
||||||
promise.then(onSuccessSubmit, onErrorSubmit)
|
promise.then(onSuccessSubmit, onErrorSubmit)
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", "a.button-register", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
@ -279,20 +273,17 @@ ForgotPasswordDirective = ($auth, $confirm, $location, $navUrls) ->
|
||||||
$confirm.notify("light-error", "According to our Oompa Loompas,
|
$confirm.notify("light-error", "According to our Oompa Loompas,
|
||||||
your are not registered yet.") #TODO: i18n
|
your are not registered yet.") #TODO: i18n
|
||||||
|
|
||||||
submit = debounce 2000, =>
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.forgotPassword($scope.data)
|
promise = $auth.forgotPassword($scope.data)
|
||||||
promise.then(onSuccessSubmit, onErrorSubmit)
|
promise.then(onSuccessSubmit, onErrorSubmit)
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", "a.button-forgot", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
@ -324,20 +315,17 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
|
||||||
$confirm.notify("light-error", "One of our Oompa Loompas say
|
$confirm.notify("light-error", "One of our Oompa Loompas say
|
||||||
'#{response.data._error_message}'.") #TODO: i18n
|
'#{response.data._error_message}'.") #TODO: i18n
|
||||||
|
|
||||||
submit = debounce 2000, =>
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.changePasswordFromRecovery($scope.data)
|
promise = $auth.changePasswordFromRecovery($scope.data)
|
||||||
promise.then(onSuccessSubmit, onErrorSubmit)
|
promise.then(onSuccessSubmit, onErrorSubmit)
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", "a.button-change-password", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
@ -375,20 +363,17 @@ InvitationDirective = ($auth, $confirm, $location, $params, $navUrls, $analytics
|
||||||
$confirm.notify("light-error", "According to our Oompa Loompas, your are not registered yet or
|
$confirm.notify("light-error", "According to our Oompa Loompas, your are not registered yet or
|
||||||
typed an invalid password.") #TODO: i18n
|
typed an invalid password.") #TODO: i18n
|
||||||
|
|
||||||
submitLogin = debounce 2000, =>
|
submitLogin = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not loginForm.validate()
|
if not loginForm.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.acceptInvitiationWithExistingUser($scope.dataLogin)
|
promise = $auth.acceptInvitiationWithExistingUser($scope.dataLogin)
|
||||||
promise.then(onSuccessSubmitLogin, onErrorSubmitLogin)
|
promise.then(onSuccessSubmitLogin, onErrorSubmitLogin)
|
||||||
|
|
||||||
$el.on "submit", "form.login-form", (event) ->
|
$el.on "submit", "form.login-form", submitLogin
|
||||||
event.preventDefault()
|
$el.on "click", ".button-login", submitLogin
|
||||||
submitLogin()
|
|
||||||
|
|
||||||
$el.on "click", "a.button-login", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submitLogin()
|
|
||||||
|
|
||||||
# Register form
|
# Register form
|
||||||
$scope.dataRegister = {token: token}
|
$scope.dataRegister = {token: token}
|
||||||
|
@ -404,20 +389,17 @@ InvitationDirective = ($auth, $confirm, $location, $params, $navUrls, $analytics
|
||||||
$confirm.notify("light-error", "According to our Oompa Loompas, that
|
$confirm.notify("light-error", "According to our Oompa Loompas, that
|
||||||
username or email is already in use.") #TODO: i18n
|
username or email is already in use.") #TODO: i18n
|
||||||
|
|
||||||
submitRegister = debounce 2000, =>
|
submitRegister = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not registerForm.validate()
|
if not registerForm.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.acceptInvitiationWithNewUser($scope.dataRegister)
|
promise = $auth.acceptInvitiationWithNewUser($scope.dataRegister)
|
||||||
promise.then(onSuccessSubmitRegister, onErrorSubmitRegister)
|
promise.then(onSuccessSubmitRegister, onErrorSubmitRegister)
|
||||||
|
|
||||||
$el.on "submit", "form.register-form", (event) ->
|
$el.on "submit", "form.register-form", submitRegister
|
||||||
event.preventDefault()
|
$el.on "click", ".button-register", submitRegister
|
||||||
submitRegister
|
|
||||||
|
|
||||||
$el.on "click", "a.button-register", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submitRegister()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
@ -483,20 +465,17 @@ CancelAccountDirective = ($repo, $model, $auth, $confirm, $location, $params, $n
|
||||||
$confirm.notify("error", "One of our Oompa Loompas says
|
$confirm.notify("error", "One of our Oompa Loompas says
|
||||||
'#{response.data._error_message}'.") #TODO: i18n
|
'#{response.data._error_message}'.") #TODO: i18n
|
||||||
|
|
||||||
submit = ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
promise = $auth.cancelAccount($scope.data)
|
promise = $auth.cancelAccount($scope.data)
|
||||||
promise.then(onSuccessSubmit, onErrorSubmit)
|
promise.then(onSuccessSubmit, onErrorSubmit)
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", "a.button-cancel-account", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,9 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
estimated_finish: null
|
estimated_finish: null
|
||||||
}
|
}
|
||||||
|
|
||||||
submit = (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
target = angular.element(event.currentTarget)
|
target = angular.element(event.currentTarget)
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
|
|
||||||
|
@ -65,17 +67,17 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
promise = $repo.save(newSprint)
|
promise = $repo.save(newSprint)
|
||||||
broadcastEvent = "sprintform:edit:success"
|
broadcastEvent = "sprintform:edit:success"
|
||||||
|
|
||||||
$loading.start(target)
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
$scope.sprintsCounter += 1 if createSprint
|
$scope.sprintsCounter += 1 if createSprint
|
||||||
$rootscope.$broadcast(broadcastEvent, data)
|
$rootscope.$broadcast(broadcastEvent, data)
|
||||||
|
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
|
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
if data._error_message
|
if data._error_message
|
||||||
|
@ -152,9 +154,10 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
else
|
else
|
||||||
$el.find(".last-sprint-name").removeClass("disappear")
|
$el.find(".last-sprint-name").removeClass("disappear")
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
submitButton = $el.find(".submit-button")
|
||||||
event.preventDefault()
|
|
||||||
submit(event)
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$el.on "click", ".delete-sprint .icon-delete", (event) ->
|
$el.on "click", ".delete-sprint .icon-delete", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
|
@ -285,15 +285,14 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
|
||||||
|
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
form = $el.find("form").checksley()
|
|
||||||
target = angular.element(event.currentTarget)
|
|
||||||
|
|
||||||
|
form = $el.find("form").checksley()
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
$loading.start(target)
|
$loading.start(submitButton)
|
||||||
|
|
||||||
if $scope.isNew
|
if $scope.isNew
|
||||||
promise = $repo.create("userstories", $scope.us)
|
promise = $repo.create("userstories", $scope.us)
|
||||||
|
@ -303,16 +302,21 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
|
||||||
broadcastEvent = "usform:edit:success"
|
broadcastEvent = "usform:edit:success"
|
||||||
|
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$rootScope.$broadcast(broadcastEvent, data)
|
$rootScope.$broadcast(broadcastEvent, data)
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
if data._error_message
|
if data._error_message
|
||||||
$confirm.notify("error", data._error_message)
|
$confirm.notify("error", data._error_message)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
|
@ -356,28 +360,32 @@ CreateBulkUserstoriesDirective = ($repo, $rs, $rootscope, lightboxService, $load
|
||||||
}
|
}
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
target = angular.element(event.currentTarget)
|
|
||||||
|
|
||||||
form = $el.find("form").checksley({onlyOneErrorElement: true})
|
form = $el.find("form").checksley({onlyOneErrorElement: true})
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
$loading.start(target)
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise = $rs.userstories.bulkCreate($scope.new.projectId, $scope.new.statusId, $scope.new.bulk)
|
promise = $rs.userstories.bulkCreate($scope.new.projectId, $scope.new.statusId, $scope.new.bulk)
|
||||||
promise.then (result) ->
|
promise.then (result) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
$rootscope.$broadcast("usform:bulk:success", result)
|
$rootscope.$broadcast("usform:bulk:success", result)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
$loading.finish(target)
|
$loading.finish(submitButton)
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
if data._error_message
|
if data._error_message
|
||||||
$confirm.notify("error", data._error_message)
|
$confirm.notify("error", data._error_message)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
|
|
|
@ -29,29 +29,33 @@ trim = @.taiga.trim
|
||||||
|
|
||||||
module = angular.module("taigaFeedback", [])
|
module = angular.module("taigaFeedback", [])
|
||||||
|
|
||||||
FeedbackDirective = ($lightboxService, $repo, $confirm)->
|
FeedbackDirective = ($lightboxService, $repo, $confirm, $loading)->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
|
|
||||||
submit = debounce 2000, ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise = $repo.create("feedback", $scope.feedback)
|
promise = $repo.create("feedback", $scope.feedback)
|
||||||
|
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$lightboxService.close($el)
|
$lightboxService.close($el)
|
||||||
$confirm.notify("success", "\\o/ we'll be happy to read your")
|
$confirm.notify("success", "\\o/ we'll be happy to read your")
|
||||||
|
|
||||||
promise.then null, ->
|
promise.then null, ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
submitButton = $el.find(".submit-button")
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", ".button-green", (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$scope.$on "feedback:show", ->
|
$scope.$on "feedback:show", ->
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
|
@ -65,4 +69,4 @@ FeedbackDirective = ($lightboxService, $repo, $confirm)->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgLbFeedback", ["lightboxService", "$tgRepo", "$tgConfirm", FeedbackDirective])
|
module.directive("tgLbFeedback", ["lightboxService", "$tgRepo", "$tgConfirm", "$tgLoading", FeedbackDirective])
|
||||||
|
|
|
@ -29,7 +29,7 @@ module = angular.module("taigaIssues")
|
||||||
## Issue Create Lightbox Directive
|
## Issue Create Lightbox Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService) ->
|
CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService, $loading) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
$scope.issue = {}
|
$scope.issue = {}
|
||||||
|
@ -50,31 +50,35 @@ CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService) ->
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
submit = debounce 2000, ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
promise = $repo.create("issues", $scope.issue)
|
promise = $repo.create("issues", $scope.issue)
|
||||||
|
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$rootscope.$broadcast("issueform:new:success", data)
|
$rootscope.$broadcast("issueform:new:success", data)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
|
|
||||||
promise.then null, ->
|
promise.then null, ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
||||||
$el.on "click", ".button-green", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "submit", "form", (event) ->
|
submitButton = $el.find(".submit-button")
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgLbCreateIssue", ["$tgRepo", "$tgConfirm", "$rootScope", "lightboxService",
|
module.directive("tgLbCreateIssue", ["$tgRepo", "$tgConfirm", "$rootScope", "lightboxService", "$tgLoading",
|
||||||
CreateIssueDirective])
|
CreateIssueDirective])
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +86,7 @@ module.directive("tgLbCreateIssue", ["$tgRepo", "$tgConfirm", "$rootScope", "lig
|
||||||
## Issue Bulk Create Lightbox Directive
|
## Issue Bulk Create Lightbox Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, lightboxService) ->
|
CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, $loading, lightboxService) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.$on "issueform:bulk", (ctx, projectId, status)->
|
$scope.$on "issueform:bulk", (ctx, projectId, status)->
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
@ -91,29 +95,38 @@ CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, lightboxService)
|
||||||
bulk: ""
|
bulk: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
data = $scope.new.bulk
|
data = $scope.new.bulk
|
||||||
projectId = $scope.new.projectId
|
projectId = $scope.new.projectId
|
||||||
|
|
||||||
promise = $rs.issues.bulkCreate(projectId, data)
|
promise = $rs.issues.bulkCreate(projectId, data)
|
||||||
promise.then (result) ->
|
promise.then (result) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$rootscope.$broadcast("issueform:new:success", result)
|
$rootscope.$broadcast("issueform:new:success", result)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
|
|
||||||
promise.then null, ->
|
promise.then null, ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
module.directive("tgLbCreateBulkIssues", ["$tgRepo", "$tgResources", "$tgConfirm", "$rootScope",
|
module.directive("tgLbCreateBulkIssues", ["$tgRepo", "$tgResources", "$tgConfirm", "$rootScope", "$tgLoading",
|
||||||
"lightboxService", CreateBulkIssuesDirective])
|
"lightboxService", CreateBulkIssuesDirective])
|
||||||
|
|
|
@ -26,7 +26,7 @@ debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaProject")
|
module = angular.module("taigaProject")
|
||||||
|
|
||||||
CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, lightboxService, $cacheFactory) ->
|
CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, $loading, lightboxService, $cacheFactory) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.data = {}
|
$scope.data = {}
|
||||||
$scope.templates = []
|
$scope.templates = []
|
||||||
|
@ -39,12 +39,14 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
# than another deleted in the same session
|
# than another deleted in the same session
|
||||||
$cacheFactory.get('$http').removeAll()
|
$cacheFactory.get('$http').removeAll()
|
||||||
|
|
||||||
|
$loading.finish(submitButton)
|
||||||
$rootscope.$broadcast("projects:reload")
|
$rootscope.$broadcast("projects:reload")
|
||||||
$confirm.notify("success", "Success") #TODO: i18n
|
$confirm.notify("success", "Success") #TODO: i18n
|
||||||
$location.url($projectUrl.get(response))
|
$location.url($projectUrl.get(response))
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
|
||||||
onErrorSubmit = (response) ->
|
onErrorSubmit = (response) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
form.setErrors(response)
|
form.setErrors(response)
|
||||||
selectors = []
|
selectors = []
|
||||||
for error_field in _.keys(response)
|
for error_field in _.keys(response)
|
||||||
|
@ -54,10 +56,14 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
error_step.addClass("active")
|
error_step.addClass("active")
|
||||||
$el.find('.progress-bar').removeClass().addClass('progress-bar').addClass(error_step.data("step"))
|
$el.find('.progress-bar').removeClass().addClass('progress-bar').addClass(error_step.data("step"))
|
||||||
|
|
||||||
submit = ->
|
submit = (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
promise = $repo.create("projects", $scope.data)
|
promise = $repo.create("projects", $scope.data)
|
||||||
promise.then(onSuccessSubmit, onErrorSubmit)
|
promise.then(onSuccessSubmit, onErrorSubmit)
|
||||||
|
|
||||||
|
@ -109,10 +115,10 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
step = prev.data('step')
|
step = prev.data('step')
|
||||||
$el.find('.progress-bar').removeClass().addClass('progress-bar').addClass(step)
|
$el.find('.progress-bar').removeClass().addClass('progress-bar').addClass(step)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
$el.on "click", ".button-submit", debounce 2000, (event) ->
|
$el.on "submit", "form", submit
|
||||||
event.preventDefault()
|
$el.on "click", ".submit-button", submit
|
||||||
submit()
|
|
||||||
|
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -121,7 +127,7 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm", "$location", "$tgNavUrls",
|
module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm", "$location", "$tgNavUrls",
|
||||||
"$tgResources", "$projectUrl", "lightboxService", "$cacheFactory", CreateProject])
|
"$tgResources", "$projectUrl", "$tgLoading", "lightboxService", "$cacheFactory", CreateProject])
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
|
@ -26,6 +26,7 @@ bindOnce = @.taiga.bindOnce
|
||||||
mixOf = @.taiga.mixOf
|
mixOf = @.taiga.mixOf
|
||||||
debounceLeading = @.taiga.debounceLeading
|
debounceLeading = @.taiga.debounceLeading
|
||||||
trim = @.taiga.trim
|
trim = @.taiga.trim
|
||||||
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaSearch", [])
|
module = angular.module("taigaSearch", [])
|
||||||
|
|
||||||
|
@ -111,7 +112,9 @@ SearchBoxDirective = ($lightboxService, $navurls, $location, $route)->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
project = null
|
project = null
|
||||||
|
|
||||||
submit = ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
@ -131,12 +134,8 @@ SearchBoxDirective = ($lightboxService, $navurls, $location, $route)->
|
||||||
$lightboxService.open($el)
|
$lightboxService.open($el)
|
||||||
$el.find("#search-text").val("")
|
$el.find("#search-text").val("")
|
||||||
|
|
||||||
$el.on "submit", (event) ->
|
$el.on "submit", "form", submit
|
||||||
submit()
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$el.on "click", ".button-green", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
submit()
|
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ taiga = @.taiga
|
||||||
bindOnce = @.taiga.bindOnce
|
bindOnce = @.taiga.bindOnce
|
||||||
debounce = @.taiga.debounce
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, lightboxService) ->
|
CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, $loading, lightboxService) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.isNew = true
|
$scope.isNew = true
|
||||||
|
|
||||||
|
@ -53,16 +53,10 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, lightboxService) ->
|
||||||
$el.find(".title").html("Edit task ") #TODO: i18n
|
$el.find(".title").html("Edit task ") #TODO: i18n
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
|
||||||
formSubmitted event
|
|
||||||
|
|
||||||
$el.on "submit", "form", debounce 2000, (event) ->
|
submitButton = $el.find(".submit-button")
|
||||||
formSubmitted event
|
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
submit = debounce 2000, (event) =>
|
||||||
$el.off()
|
|
||||||
|
|
||||||
formSubmitted = (event) ->
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
|
@ -76,29 +70,36 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, lightboxService) ->
|
||||||
promise = $repo.save($scope.task)
|
promise = $repo.save($scope.task)
|
||||||
broadcastEvent = "taskform:edit:success"
|
broadcastEvent = "taskform:edit:success"
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
# FIXME: error handling?
|
# FIXME: error handling?
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
$rootscope.$broadcast(broadcastEvent, data)
|
$rootscope.$broadcast(broadcastEvent, data)
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
|
$scope.$on "$destroy", ->
|
||||||
|
$el.off()
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
|
|
||||||
CreateBulkTasksDirective = ($repo, $rs, $rootscope, lightboxService) ->
|
CreateBulkTasksDirective = ($repo, $rs, $rootscope, $loading, lightboxService) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.form = {data: "", usId: null}
|
$scope.form = {data: "", usId: null}
|
||||||
|
|
||||||
$scope.$on "taskform:bulk", (ctx, sprintId, usId)->
|
submit = debounce 2000, (event) =>
|
||||||
lightboxService.open($el)
|
|
||||||
$scope.form = {data: "", sprintId: sprintId, usId: usId}
|
|
||||||
|
|
||||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
if not form.validate()
|
if not form.validate()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
data = $scope.form.data
|
data = $scope.form.data
|
||||||
projectId = $scope.projectId
|
projectId = $scope.projectId
|
||||||
sprintId = $scope.form.sprintId
|
sprintId = $scope.form.sprintId
|
||||||
|
@ -106,13 +107,24 @@ CreateBulkTasksDirective = ($repo, $rs, $rootscope, lightboxService) ->
|
||||||
|
|
||||||
promise = $rs.tasks.bulkCreate(projectId, sprintId, usId, data)
|
promise = $rs.tasks.bulkCreate(projectId, sprintId, usId, data)
|
||||||
promise.then (result) ->
|
promise.then (result) ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
$rootscope.$broadcast("taskform:bulk:success", result)
|
$rootscope.$broadcast("taskform:bulk:success", result)
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
|
||||||
# TODO: error handling
|
# TODO: error handling
|
||||||
promise.then null, ->
|
promise.then null, ->
|
||||||
|
$loading.finish(submitButton)
|
||||||
console.log "FAIL"
|
console.log "FAIL"
|
||||||
|
|
||||||
|
$scope.$on "taskform:bulk", (ctx, sprintId, usId)->
|
||||||
|
lightboxService.open($el)
|
||||||
|
$scope.form = {data: "", sprintId: sprintId, usId: usId}
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
|
@ -126,6 +138,7 @@ module.directive("tgLbCreateEditTask", [
|
||||||
"$tgModel",
|
"$tgModel",
|
||||||
"$tgResources",
|
"$tgResources",
|
||||||
"$rootScope",
|
"$rootScope",
|
||||||
|
"$tgLoading",
|
||||||
"lightboxService",
|
"lightboxService",
|
||||||
CreateEditTaskDirective
|
CreateEditTaskDirective
|
||||||
])
|
])
|
||||||
|
@ -134,6 +147,7 @@ module.directive("tgLbCreateBulkTasks", [
|
||||||
"$tgRepo",
|
"$tgRepo",
|
||||||
"$tgResources",
|
"$tgResources",
|
||||||
"$rootScope",
|
"$rootScope",
|
||||||
|
"$tgLoading",
|
||||||
"lightboxService",
|
"lightboxService",
|
||||||
CreateBulkTasksDirective
|
CreateBulkTasksDirective
|
||||||
])
|
])
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
taiga = @.taiga
|
taiga = @.taiga
|
||||||
|
|
||||||
mixOf = @.taiga.mixOf
|
mixOf = @.taiga.mixOf
|
||||||
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaUserSettings")
|
module = angular.module("taigaUserSettings")
|
||||||
|
|
||||||
|
@ -66,18 +67,6 @@ class UserChangePasswordController extends mixOf(taiga.Controller, taiga.PageMix
|
||||||
|
|
||||||
return promise.then(=> @.loadProject())
|
return promise.then(=> @.loadProject())
|
||||||
|
|
||||||
save: ->
|
|
||||||
if @scope.newPassword1 != @scope.newPassword2
|
|
||||||
@confirm.notify('error', "The passwords dosn't match")
|
|
||||||
return
|
|
||||||
|
|
||||||
promise = @rs.userSettings.changePassword(@scope.currentPassword, @scope.newPassword1)
|
|
||||||
promise.then =>
|
|
||||||
@confirm.notify('success')
|
|
||||||
promise.then null, (response) =>
|
|
||||||
@confirm.notify('error', response.data._error_message)
|
|
||||||
|
|
||||||
|
|
||||||
module.controller("UserChangePasswordController", UserChangePasswordController)
|
module.controller("UserChangePasswordController", UserChangePasswordController)
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,11 +74,36 @@ module.controller("UserChangePasswordController", UserChangePasswordController)
|
||||||
## User ChangePassword Directive
|
## User ChangePassword Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
UserChangePasswordDirective = () ->
|
UserChangePasswordDirective = ($rs, $confirm, $loading) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs, ctrl) ->
|
||||||
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
if $scope.newPassword1 != $scope.newPassword2
|
||||||
|
$confirm.notify('error', "The passwords dosn't match")
|
||||||
|
return
|
||||||
|
|
||||||
|
$loading.start(submitButton)
|
||||||
|
|
||||||
|
promise = $rs.userSettings.changePassword($scope.currentPassword, $scope.newPassword1)
|
||||||
|
promise.then =>
|
||||||
|
$loading.finish(submitButton)
|
||||||
|
$confirm.notify('success')
|
||||||
|
|
||||||
|
promise.then null, (response) =>
|
||||||
|
$loading.finish(submitButton)
|
||||||
|
$confirm.notify('error', response.data._error_message)
|
||||||
|
|
||||||
|
submitButton = $el.find(".submit-button")
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
return {link:link}
|
return {
|
||||||
|
link:link
|
||||||
|
}
|
||||||
|
|
||||||
module.directive("tgUserChangePassword", UserChangePasswordDirective)
|
module.directive("tgUserChangePassword", ["$tgResources", "$tgConfirm", "$tgLoading", UserChangePasswordDirective])
|
||||||
|
|
|
@ -23,7 +23,7 @@ taiga = @.taiga
|
||||||
mixOf = @.taiga.mixOf
|
mixOf = @.taiga.mixOf
|
||||||
sizeFormat = @.taiga.sizeFormat
|
sizeFormat = @.taiga.sizeFormat
|
||||||
module = angular.module("taigaUserSettings")
|
module = angular.module("taigaUserSettings")
|
||||||
|
debounce = @.taiga.debounce
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## User settings Controller
|
## User settings Controller
|
||||||
|
@ -82,7 +82,9 @@ module.controller("UserSettingsController", UserSettingsController)
|
||||||
|
|
||||||
UserProfileDirective = ($confirm, $auth, $repo) ->
|
UserProfileDirective = ($confirm, $auth, $repo) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$el.on "click", ".user-profile form .save-profile", (event) ->
|
submit = debounce 2000, (event) =>
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
return if not form.validate()
|
return if not form.validate()
|
||||||
|
|
||||||
|
@ -103,6 +105,10 @@ UserProfileDirective = ($confirm, $auth, $repo) ->
|
||||||
|
|
||||||
$repo.save($scope.user).then(onSuccess, onError)
|
$repo.save($scope.user).then(onSuccess, onError)
|
||||||
|
|
||||||
|
$el.on "submit", "form", submit
|
||||||
|
|
||||||
|
$el.on "click", ".submit-button", submit
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ block head
|
||||||
title Taiga Your agile, free, and open source project management tool
|
title Taiga Your agile, free, and open source project management tool
|
||||||
|
|
||||||
block content
|
block content
|
||||||
div.wrapper(tg-project-profile, ng-controller="ProjectProfileController as ctrl",
|
div.wrapper(tg-project-default-values, ng-controller="ProjectProfileController as ctrl",
|
||||||
ng-init="section='admin'; sectionName='Default values'")
|
ng-init="section='admin'; sectionName='Default values'")
|
||||||
sidebar.menu-secondary.sidebar(tg-admin-navigation="project-profile")
|
sidebar.menu-secondary.sidebar(tg-admin-navigation="project-profile")
|
||||||
include views/modules/admin-menu
|
include views/modules/admin-menu
|
||||||
|
|
|
@ -93,5 +93,5 @@ block content
|
||||||
option(value="") Select a videoconference system
|
option(value="") Select a videoconference system
|
||||||
input(type="text", ng-model="project.videoconferences_salt",
|
input(type="text", ng-model="project.videoconferences_salt",
|
||||||
placeholder="If you want you can append a salt code to the name of the chat room")
|
placeholder="If you want you can append a salt code to the name of the chat room")
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="") Save
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
|
@ -54,8 +54,8 @@ block content
|
||||||
|
|
||||||
p All projects are private during Taiga's beta period.
|
p All projects are private during Taiga's beta period.
|
||||||
|
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="") Save
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
a.delete-project(href="", title="Delete this project", ng-click="ctrl.openDeleteLightbox()") Delete this project
|
a.delete-project(href="", title="Delete this project", ng-click="ctrl.openDeleteLightbox()") Delete this project
|
||||||
|
|
||||||
div.lightbox.lightbox-delete-project(tg-lb-delete-project)
|
div.lightbox.lightbox-delete-project(tg-lb-delete-project)
|
||||||
|
|
|
@ -27,8 +27,8 @@ block content
|
||||||
.icon.icon-copy
|
.icon.icon-copy
|
||||||
.help-copy Copy to clipboard: Ctrl+C
|
.help-copy Copy to clipboard: Ctrl+C
|
||||||
|
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="") Save
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
||||||
|
|
||||||
.help
|
.help
|
||||||
|
|
|
@ -25,5 +25,5 @@ block content
|
||||||
label(for="retype-password") Retype Password
|
label(for="retype-password") Retype Password
|
||||||
input(type="password", placeholder="Retype Password", id="retype-password", ng-model="newPassword2")
|
input(type="password", placeholder="Retype Password", id="retype-password", ng-model="newPassword2")
|
||||||
fieldset
|
fieldset
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", ng-click="ctrl.save()") Save
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
|
@ -55,8 +55,8 @@ block content
|
||||||
ng-model="user.bio")
|
ng-model="user.bio")
|
||||||
|
|
||||||
fieldset.submit
|
fieldset.submit
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", title="Save", class="hidden")
|
||||||
a.button.button-green.save-profile(href="") Save
|
a.button.button-green.save-profile.submit-button(href="") Save
|
||||||
a.delete-account(href="", title="Delete Taiga account",
|
a.delete-account(href="", title="Delete Taiga account",
|
||||||
ng-click="ctrl.openDeleteLightbox()") Delete Taiga account
|
ng-click="ctrl.openDeleteLightbox()") Delete Taiga account
|
||||||
|
|
||||||
|
|
|
@ -36,5 +36,5 @@ section.default-values
|
||||||
ng-options="s.id as s.name for s in issueStatusList")
|
ng-options="s.id as s.name for s in issueStatusList")
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
input(type="submit", class="hidden")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", title="Save") Save
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
|
@ -3,10 +3,10 @@ div.change-email-form-container(tg-cancel-account)
|
||||||
strong Cancel your account <br />
|
strong Cancel your account <br />
|
||||||
span We're sorry you are leaving the taiga, we hope you enjoyed your stay :)
|
span We're sorry you are leaving the taiga, we hope you enjoyed your stay :)
|
||||||
|
|
||||||
form(ng-submit="ctrl.submit()")
|
form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="hidden", name="cancel_token", ng-model="data.cancel_token", data-required="true",
|
input(type="hidden", name="cancel_token", ng-model="data.cancel_token", data-required="true",
|
||||||
placeholder="cancel account token")
|
placeholder="cancel account token")
|
||||||
|
|
||||||
a.button.button-cancel-account.button-gray(href="", title="Yes, I'm leaving") Yes, I'm leaving!
|
a.button.button-cancel-account.button-gray(href="", title="Yes, I'm leaving") Yes, I'm leaving!
|
||||||
input(type="submit", style="display:none")
|
button(type="submit", class="hidden")
|
||||||
|
|
|
@ -3,10 +3,10 @@ div.change-email-form-container(tg-change-email)
|
||||||
strong Change your email <br />
|
strong Change your email <br />
|
||||||
span One click more and your email will be updated!
|
span One click more and your email will be updated!
|
||||||
|
|
||||||
form(ng-submit="ctrl.submit()")
|
form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="hidden", name="email_token", ng-model="data.email_token", data-required="true",
|
input(type="hidden", name="email_token", ng-model="data.email_token", data-required="true",
|
||||||
placeholder="change email token")
|
placeholder="change email token")
|
||||||
|
|
||||||
a.button.button-change-email.button-gray(href="", title="Change email") Change email
|
a.button.button-change-email.button-gray(href="", title="Change email") Change email
|
||||||
input(type="submit", style="display:none")
|
button(type="submit", class="hidden")
|
||||||
|
|
|
@ -3,7 +3,7 @@ div.change-password-form-container(tg-change-password-from-recovery)
|
||||||
strong Create a new Taiga pass <br />
|
strong Create a new Taiga pass <br />
|
||||||
span And hey, you may want to eat some more iron-rich food, it's good for your brain :P
|
span And hey, you may want to eat some more iron-rich food, it's good for your brain :P
|
||||||
|
|
||||||
form(ng-submit="ctrl.submit()")
|
form
|
||||||
fieldset.token-change-password(ng-hide="tokenInParams")
|
fieldset.token-change-password(ng-hide="tokenInParams")
|
||||||
input(type="text", name="token", ng-model="data.token", data-required="true",
|
input(type="text", name="token", ng-model="data.token", data-required="true",
|
||||||
placeholder="Recover password token")
|
placeholder="Recover password token")
|
||||||
|
@ -16,5 +16,5 @@ div.change-password-form-container(tg-change-password-from-recovery)
|
||||||
input(type="password", name="password2", id="password2", ng-model="data.password2",
|
input(type="password", name="password2", id="password2", ng-model="data.password2",
|
||||||
data-required="true", data-equalto="#password", placeholder="Re-type new password")
|
data-required="true", data-equalto="#password", placeholder="Re-type new password")
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-change-password.button-gray(href="", title="Reset Password") Reset Password
|
a.button.button-change-password.button-gray.submit-button(href="", title="Reset Password") Reset Password
|
||||||
input(type="submit", style="display:none")
|
button(type="submit", class="hidden")
|
||||||
|
|
|
@ -10,7 +10,7 @@ div.forgot-form-container(tg-forgot-password)
|
||||||
input(type="text", name="username", ng-model="data.username", data-required="true",
|
input(type="text", name="username", ng-model="data.username", data-required="true",
|
||||||
placeholder="Username or email")
|
placeholder="Username or email")
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-forgot.button-gray(href="", title="Reset Password") Reset Password
|
button(type="submit", class="hidden")
|
||||||
input(type="submit", style="display:none")
|
a.button.button-gray.submit-button.button-forgot(href="", title="Reset Password") Reset Password
|
||||||
|
|
||||||
a(href="", title="Login", tg-nav="login") Nah, take me back. I think I remember it.
|
a(href="", title="Login", tg-nav="login") Nah, take me back. I think I remember it.
|
||||||
|
|
|
@ -8,7 +8,7 @@ form.login-form
|
||||||
placeholder="Password")
|
placeholder="Password")
|
||||||
a.forgot-pass(href="", tg-nav="forgot-password", title="Did you forgot your password?") Forgot it?
|
a.forgot-pass(href="", tg-nav="forgot-password", title="Did you forgot your password?") Forgot it?
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-login.button-gray(href="", title="Log in") Enter
|
a.button.button-login.button-gray.submit-button(href="", title="Log in") Enter
|
||||||
input(type="submit", style="display:none")
|
button(type="submit", class="hidden")
|
||||||
|
|
||||||
fieldset(tg-github-login-button)
|
fieldset(tg-github-login-button)
|
||||||
|
|
|
@ -20,7 +20,7 @@ form.register-form
|
||||||
placeholder="Set a password")
|
placeholder="Set a password")
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-register.button-gray(href="", title="Sign up") Sign up
|
button(type="submit", class="hidden")
|
||||||
input(type="submit", style="display:none")
|
a.button.button-register.button-gray.submit-button(href="", title="Sign up") Sign up
|
||||||
|
|
||||||
tg-terms-notice
|
tg-terms-notice
|
||||||
|
|
|
@ -6,7 +6,9 @@ form
|
||||||
//- Form is set in a directive
|
//- Form is set in a directive
|
||||||
.add-member-forms
|
.add-member-forms
|
||||||
|
|
||||||
a.button.button-green(href="", title="Save")
|
|
||||||
span Create
|
button(type="submit", class="hidden")
|
||||||
|
a.button.button-green.submit-button(href="", title="Create")
|
||||||
|
span Create
|
||||||
|
|
||||||
p.help-text If users are already registered on Taiga, they will be added automatically. Otherwise they will receive an invitation.
|
p.help-text If users are already registered on Taiga, they will be added automatically. Otherwise they will receive an invitation.
|
||||||
|
|
|
@ -20,6 +20,6 @@ form
|
||||||
textarea.description(placeholder="Description", ng-model="issue.description")
|
textarea.description(placeholder="Description", ng-model="issue.description")
|
||||||
|
|
||||||
// include lightbox-attachments
|
// include lightbox-attachments
|
||||||
input(type="submit", style="display:none")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", title="Save")
|
a.button.button-green.submit-button(href="", title="Save")
|
||||||
span Create
|
span Create
|
||||||
|
|
|
@ -6,6 +6,6 @@ form
|
||||||
textarea(ng-model="feedback.comment", data-required="true",
|
textarea(ng-model="feedback.comment", data-required="true",
|
||||||
placeholder="...a bug, some suggestions, something cool... or even your worst nightmare with Taiga")
|
placeholder="...a bug, some suggestions, something cool... or even your worst nightmare with Taiga")
|
||||||
fieldset
|
fieldset
|
||||||
input.hidden(type="submit")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", title="Send feedback")
|
a.button.button-green.submit-button(href="", title="Send feedback")
|
||||||
span Send feedback
|
span Send feedback
|
||||||
|
|
|
@ -4,5 +4,6 @@ form
|
||||||
h2.title(tr="common.new-bulk")
|
h2.title(tr="common.new-bulk")
|
||||||
fieldset
|
fieldset
|
||||||
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="new.bulk", data-required="true", data-linewidth="200")
|
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="new.bulk", data-required="true", data-linewidth="200")
|
||||||
a.button.button-green(href="", tr="title:common.save")
|
|
||||||
span(tr="common.save")
|
button(type="submit", class="hidden")
|
||||||
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
|
@ -5,6 +5,5 @@ form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="text", name="text", id="search-text", placeholder="What are you looking for?", data-required="true")
|
input(type="text", name="text", id="search-text", placeholder="What are you looking for?", data-required="true")
|
||||||
fieldset
|
fieldset
|
||||||
input.hidden(type="submit")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", title="Accept")
|
a.button.button-green.submit-button(href="", title="Search") Search
|
||||||
span Search
|
|
|
@ -15,7 +15,8 @@ form
|
||||||
input.date-end(type="text", name="estimated_finish", placeholder="Estimated End",
|
input.date-end(type="text", name="estimated_finish", placeholder="Estimated End",
|
||||||
ng-model="sprint.estimated_finish", data-required="true", tg-date-selector)
|
ng-model="sprint.estimated_finish", data-required="true", tg-date-selector)
|
||||||
|
|
||||||
a.button.button-green(href="", title="Save")
|
button(type="submit", class="hidden")
|
||||||
|
a.button.button-green.submit-button(href="", title="Create")
|
||||||
span Create
|
span Create
|
||||||
|
|
||||||
div(tg-check-permission="delete_milestone")
|
div(tg-check-permission="delete_milestone")
|
||||||
|
|
|
@ -4,5 +4,6 @@ form
|
||||||
h2.title(tr="common.new-bulk")
|
h2.title(tr="common.new-bulk")
|
||||||
fieldset
|
fieldset
|
||||||
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="form.data", data-required="true")
|
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="form.data", data-required="true")
|
||||||
a.button.button-green(href="", tr="title:common.save")
|
|
||||||
span(tr="common.save")
|
button(type="submit", class="hidden")
|
||||||
|
a.button.button-green.submit-button(href="", title="Save") Save
|
||||||
|
|
|
@ -34,6 +34,6 @@ form
|
||||||
|
|
||||||
tg-blocking-message-input(watch="task.is_blocked", ng-model="task.blocked_note")
|
tg-blocking-message-input(watch="task.is_blocked", ng-model="task.blocked_note")
|
||||||
|
|
||||||
button(title="Save" style="display: none;")
|
button(type="submit", class="hidden")
|
||||||
a.button.button-green(href="", title="Save")
|
a.button.button-green.submit-button(href="", title="Save")
|
||||||
span Create
|
span Create
|
||||||
|
|
|
@ -4,5 +4,6 @@ form
|
||||||
h2.title(tr="common.new-bulk")
|
h2.title(tr="common.new-bulk")
|
||||||
fieldset
|
fieldset
|
||||||
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="new.bulk", data-required="true", data-linewidth="200")
|
textarea(cols="200", wrap="off", tg-limit-line-length, tr="placeholder:common.one-item-line", ng-model="new.bulk", data-required="true", data-linewidth="200")
|
||||||
a.button.button-green(href="", tr="title:common.save")
|
|
||||||
span(tr="common.save")
|
button(type="submit", class="hidden")
|
||||||
|
a.button.button-green.submit-button(href="", title="Save") Save
|
|
@ -36,5 +36,5 @@ form
|
||||||
|
|
||||||
tg-blocking-message-input(watch="us.is_blocked", ng-model="us.blocked_note")
|
tg-blocking-message-input(watch="us.is_blocked", ng-model="us.blocked_note")
|
||||||
|
|
||||||
a.button.button-green(href="", title="Save")
|
button(type="submit", class="hidden")
|
||||||
span Create
|
a.button.button-green.submit-button(href="", title="Submit") Create
|
||||||
|
|
|
@ -10,8 +10,8 @@ div.login-form-container(tg-login)
|
||||||
a.forgot-pass(href="", tg-nav="forgot-password", title="Did you forgot your password?") Forgot it?
|
a.forgot-pass(href="", tg-nav="forgot-password", title="Did you forgot your password?") Forgot it?
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-login.button-gray(href="", title="Sign in") Sign in
|
button(type="submit", class="hidden")
|
||||||
input(type="submit", style="display:none")
|
a.button.button-login.button-gray.submit-button(href="", title="Sign in") Sign in
|
||||||
|
|
||||||
fieldset(tg-github-login-button)
|
fieldset(tg-github-login-button)
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ div.register-form-container(tg-register)
|
||||||
placeholder="Set a password (case sensitive)")
|
placeholder="Set a password (case sensitive)")
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
a.button.button-register.button-gray(href="", title="Sign up") Sign up
|
button(type="submit", class="hidden")
|
||||||
input(type="submit", class="hidden")
|
a.button.button-register.button-gray.submit-button(href="", title="Sign up") Sign up
|
||||||
|
|
||||||
fieldset(tg-github-login-button)
|
fieldset(tg-github-login-button)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,9 @@ form
|
||||||
fieldset.wizard-action
|
fieldset.wizard-action
|
||||||
div
|
div
|
||||||
a.button-prev.button.button-gray(href="", title="Prev") Prev
|
a.button-prev.button.button-gray(href="", title="Prev") Prev
|
||||||
a.button-submit.button.button-green(href="", title="Create") Create
|
a.submit-button.button.button-green(href="", title="Create") Create
|
||||||
|
|
||||||
|
button(type="submit", class="hidden")
|
||||||
|
|
||||||
div.progress-bar
|
div.progress-bar
|
||||||
div.progress-state
|
div.progress-state
|
||||||
|
|
Loading…
Reference in New Issue