tranform <a> submits to buttons

stable
Juanfran 2015-02-02 08:42:21 +01:00
parent 8cacf4e824
commit c9a6d1df8e
39 changed files with 35 additions and 82 deletions

View File

@ -150,7 +150,6 @@ CreateMembersDirective = ($rs, $rootScope, $confirm, $loading ,lightboxService)
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link: link} return {link: link}

View File

@ -120,7 +120,6 @@ ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -154,7 +153,6 @@ ProjectDefaultValuesDirective = ($repo, $confirm, $loading) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -445,7 +445,6 @@ GithubWebhooksDirective = ($repo, $confirm, $loading) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -481,7 +480,6 @@ GitlabWebhooksDirective = ($repo, $confirm, $loading) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -517,7 +515,6 @@ BitbucketWebhooksDirective = ($repo, $confirm, $loading) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}

View File

@ -201,7 +201,6 @@ LoginDirective = ($auth, $confirm, $location, $config, $routeParams, $navUrls, $
return promise.then(onSuccess, onError) return promise.then(onSuccess, onError)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -242,7 +241,6 @@ RegisterDirective = ($auth, $confirm, $location, $navUrls, $config, $analytics)
promise.then(onSuccessSubmit, onErrorSubmit) promise.then(onSuccessSubmit, onErrorSubmit)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -279,7 +277,6 @@ ForgotPasswordDirective = ($auth, $confirm, $location, $navUrls) ->
promise.then(onSuccessSubmit, onErrorSubmit) promise.then(onSuccessSubmit, onErrorSubmit)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -321,7 +318,6 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
promise.then(onSuccessSubmit, onErrorSubmit) promise.then(onSuccessSubmit, onErrorSubmit)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -471,7 +467,6 @@ CancelAccountDirective = ($repo, $model, $auth, $confirm, $location, $params, $n
promise.then(onSuccessSubmit, onErrorSubmit) promise.then(onSuccessSubmit, onErrorSubmit)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}

View File

@ -158,7 +158,6 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $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()

View File

@ -329,7 +329,6 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $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()
@ -398,7 +397,6 @@ CreateBulkUserstoriesDirective = ($repo, $rs, $rootscope, lightboxService, $load
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -55,7 +55,6 @@ FeedbackDirective = ($lightboxService, $repo, $confirm, $loading)->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "feedback:show", -> $scope.$on "feedback:show", ->
$scope.$apply -> $scope.$apply ->

View File

@ -75,7 +75,6 @@ CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService, $loading)
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}
@ -123,7 +122,6 @@ CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, $loading, lightbo
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -118,7 +118,6 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $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()

View File

@ -134,7 +134,6 @@ SearchBoxDirective = ($lightboxService, $navurls, $location, $route)->
$el.find("#search-text").val("") $el.find("#search-text").val("")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
return {link:link} return {link:link}

View File

@ -83,7 +83,6 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, $loading, lightboxSer
$rootscope.$broadcast(broadcastEvent, data) $rootscope.$broadcast(broadcastEvent, data)
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()
@ -127,7 +126,6 @@ CreateBulkTasksDirective = ($repo, $rs, $rootscope, $loading, lightboxService) -
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -97,7 +97,6 @@ UserChangePasswordDirective = ($rs, $confirm, $loading) ->
submitButton = $el.find(".submit-button") submitButton = $el.find(".submit-button")
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -107,8 +107,6 @@ UserProfileDirective = ($confirm, $auth, $repo) ->
$el.on "submit", "form", submit $el.on "submit", "form", submit
$el.on "click", ".submit-button", submit
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -87,5 +87,4 @@ div.wrapper(tg-project-modules, ng-controller="ProjectProfileController as ctrl"
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")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Sign in") Sign in
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -48,8 +48,7 @@ div.wrapper(tg-project-profile, ng-controller="ProjectProfileController as ctrl"
p All projects are private during Taiga's beta period. p All projects are private during Taiga's beta period.
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") 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)

View File

@ -27,9 +27,7 @@ div.wrapper.roles(tg-bitbucket-webhooks, ng-controller="BitbucketController as c
label(for="valid-origin-ips") Valid origin ips (separated by ,) label(for="valid-origin-ips") Valid origin ips (separated by ,)
input(type="text", name="valid-origin-ips", tg-valid-origin-ips, ng-model="bitbucket.valid_origin_ips", placeholder="Bitbucket requests are not signed so the best way of verifying the origin is by IP. If the field is empty there will be no IP validation.", id="valid-origin-ips") input(type="text", name="valid-origin-ips", tg-valid-origin-ips, ng-model="bitbucket.valid_origin_ips", placeholder="Bitbucket requests are not signed so the best way of verifying the origin is by IP. If the field is empty there will be no IP validation.", id="valid-origin-ips")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save
a.help-button(href="https://taiga.io/support/bitbucket-integration/", target="_blank") a.help-button(href="https://taiga.io/support/bitbucket-integration/", target="_blank")
span.icon.icon-help span.icon.icon-help

View File

@ -23,9 +23,7 @@ div.wrapper.roles(tg-github-webhooks, ng-controller="GithubController as ctrl",
.icon.icon-copy .icon.icon-copy
.help-copy Copy to clipboard: Ctrl+C .help-copy Copy to clipboard: Ctrl+C
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save
a.help-button(href="https://taiga.io/support/github-integration/", target="_blank") a.help-button(href="https://taiga.io/support/github-integration/", target="_blank")
span.icon.icon-help span.icon.icon-help

View File

@ -31,8 +31,7 @@ block content
label(for="valid-origin-ips") Valid origin ips (separated by ,) label(for="valid-origin-ips") Valid origin ips (separated by ,)
input(type="text", name="valid-origin-ips", tg-valid-origin-ips, ng-model="gitlab.valid_origin_ips", placeholder="Gitlab requests are not signed so the best way of verifying the origin is by IP. If the field is empty there will be no IP validation.", id="valid-origin-ips") input(type="text", name="valid-origin-ips", tg-valid-origin-ips, ng-model="gitlab.valid_origin_ips", placeholder="Gitlab requests are not signed so the best way of verifying the origin is by IP. If the field is empty there will be no IP validation.", id="valid-origin-ips")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save
a.help-button(href="https://taiga.io/support/gitlab-integration/", target="_blank") a.help-button(href="https://taiga.io/support/gitlab-integration/", target="_blank")
span.icon.icon-help span.icon.icon-help

View File

@ -36,5 +36,4 @@ 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
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -16,5 +16,4 @@ 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.submit-button(href="", title="Reset Password") Reset Password button.button-change-password.button-gray.submit-button(type="submit", title="Reset Password") Reset Password
button(type="submit", class="hidden")

View File

@ -10,7 +10,6 @@ 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
button(type="submit", class="hidden") button.button-gray.submit-button.button-forgot(type="submit", title="Reset Password") Reset Password
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.

View File

@ -8,7 +8,6 @@ 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.submit-button(href="", title="Log in") Enter button.button-login.button-gray.submit-button(type="submit", title="Enter") Enter
button(type="submit", class="hidden")
fieldset(tg-github-login-button) fieldset(tg-github-login-button)

View File

@ -20,7 +20,6 @@ form.register-form
placeholder="Set a password") placeholder="Set a password")
fieldset fieldset
button(type="submit", class="hidden") button.button-register.button-gray.submit-button(type="submit", title="Sign up") Sign up
a.button.button-register.button-gray.submit-button(href="", title="Sign up") Sign up
tg-terms-notice tg-terms-notice

View File

@ -6,9 +6,6 @@ form
//- Form is set in a directive //- Form is set in a directive
.add-member-forms .add-member-forms
button.button-green.submit-button(type="submit", title="Create") 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.

View File

@ -20,6 +20,4 @@ form
textarea.description(placeholder="Description", ng-model="issue.description") textarea.description(placeholder="Description", ng-model="issue.description")
// include lightbox-attachments // include lightbox-attachments
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Create") Create
a.button.button-green.submit-button(href="", title="Save")
span Create

View File

@ -6,6 +6,4 @@ 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
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Send feedback") Send feedback
a.button.button-green.submit-button(href="", title="Send feedback")
span Send feedback

View File

@ -5,5 +5,4 @@ form
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")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -5,5 +5,4 @@ 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
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Search") Search
a.button.button-green.submit-button(href="", title="Search") Search

View File

@ -15,9 +15,7 @@ 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)
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Create") Create
a.button.button-green.submit-button(href="", title="Create")
span Create
div(tg-check-permission="delete_milestone") div(tg-check-permission="delete_milestone")
span.delete-sprint.hidden Do you want to delete this sprint? span.delete-sprint.hidden Do you want to delete this sprint?

View File

@ -5,5 +5,4 @@ form
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")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -34,6 +34,4 @@ 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(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Create") Create
a.button.button-green.submit-button(href="", title="Save")
span Create

View File

@ -5,5 +5,4 @@ form
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")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -36,5 +36,4 @@ 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")
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Create") Create
a.button.button-green.submit-button(href="", title="Submit") Create

View File

@ -10,8 +10,7 @@ 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
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Sign in") Sign in
a.button.button-login.button-gray.submit-button(href="", title="Sign in") Sign in
fieldset(tg-github-login-button) fieldset(tg-github-login-button)

View File

@ -21,8 +21,7 @@ div.register-form-container(tg-register)
placeholder="Set a password (case sensitive)") placeholder="Set a password (case sensitive)")
fieldset fieldset
button(type="submit", class="hidden") button.button-register.button-gray.submit-button(type="submit", title="Sign up") Sign up
a.button.button-register.button-gray.submit-button(href="", title="Sign up") Sign up
fieldset(tg-github-login-button) fieldset(tg-github-login-button)

View File

@ -30,7 +30,7 @@ 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.submit-button.button.button-green(href="", title="Create") Create button.button-green.submit-button(type="submit", title="Create") Create
button(type="submit", class="hidden") button(type="submit", class="hidden")

View File

@ -19,5 +19,4 @@ div.wrapper(tg-user-change-password, ng-controller="UserChangePasswordController
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
button(type="submit", class="hidden") button.button-green.submit-button(type="submit", title="Save") Save
a.button.button-green.submit-button(href="", title="Save") Save

View File

@ -49,8 +49,7 @@ div.wrapper(tg-user-profile, ng-controller="UserSettingsController as ctrl",
ng-model="user.bio") ng-model="user.bio")
fieldset.submit fieldset.submit
button(type="submit", title="Save", class="hidden") button.button-green.submit-button(type="submit", title="Save") 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

View File

@ -17,8 +17,17 @@
@extend %button; @extend %button;
} }
a.button-green { button {
@extend %button;
}
.submit-button {
width: 100%;
}
.button-green {
background: $green-taiga; background: $green-taiga;
border: 0;
color: $white; color: $white;
vertical-align: middle; vertical-align: middle;
&:hover, &:hover,