prevent comment save if the textarea doesn't have content

stable
Juanfran 2015-06-03 10:10:10 +02:00
parent dcf3b8fa1b
commit d27f612bb8
2 changed files with 2 additions and 4 deletions

View File

@ -375,11 +375,10 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c
# Events
$el.on "click", ".add-comment a.button-green", debounce 2000, (event) ->
$el.on "click", ".add-comment input.button-green", debounce 2000, (event) ->
event.preventDefault()
target = angular.element(event.currentTarget)
save(target)
$el.on "click", ".show-more", (event) ->

View File

@ -16,8 +16,7 @@ section.history
a(class="help-markdown", href="https://taiga.io/support/taiga-markdown-syntax/", target="_blank", title="{{'COMMON.WYSIWYG.MARKDOWN_HELP' | translate}}")
span.icon.icon-help
span(translate="COMMON.WYSIWYG.MARKDOWN_HELP")
a(href="", title="{{'COMMENTS.COMMENT' | translate}}", class="button button-green save-comment")
span(translate="COMMENTS.COMMENT")
input(type="button", ng-disabled!="!<%- ngmodel %>.comment.length" title="{{'COMMENTS.COMMENT' | translate}}", value="{{'COMMENTS.COMMENT' | translate}}", class="button button-green save-comment")
<% } %>
section.history-activity.hidden
.changes-list