Fix step comments bugs (#1751)

This commit is contained in:
aignatov-bio 2019-05-13 09:49:53 +02:00 committed by GitHub
parent 0b194eb3b1
commit 2010b3ad8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 8 deletions

View file

@ -206,6 +206,24 @@ var Comments = (function() {
$form.submit();
});
$form.find('textarea').on('focus', function(){
$(this).addClass('border');
if (this.value.length > 0) {
$submitBtn.addClass('show');
}
}).on('blur',function(){
if (this.value.length == 0) {
$(this).removeClass('border');
$submitBtn.removeClass('show');
}
}).on('keyup',function(){
if (this.value.length > 0) {
$submitBtn.addClass('show');
} else {
$submitBtn.removeClass('show');
}
})
$('.help-block', $form).addClass('hide');
$form.off().on('ajax:send', function () {

View file

@ -297,7 +297,6 @@
line-height: 16px;
overflow: hidden;
padding: 2px 5px;
pointer-events: none;
width: 100%;
&:focus {
@ -307,6 +306,7 @@
&:disabled {
background: transparent;
border: 1px solid transparent;
pointer-events: none;
user-select: none;
}
}
@ -448,7 +448,7 @@
outline: none;
}
&:hover {
&.border {
border: 1px solid $color-silver;
}
}
@ -462,8 +462,8 @@
right: -36px;
transition: $md-transaction;
&.has-error {
top: -64px;
&.show {
right: 0;
}
}
@ -472,9 +472,5 @@
textarea {
border: 1px solid $color-silver;
}
.new-comment-button {
right: 0;
}
}
}