mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-19 05:47:53 +08:00
Fix step comments bugs (#1751)
This commit is contained in:
parent
0b194eb3b1
commit
2010b3ad8f
2 changed files with 22 additions and 8 deletions
|
@ -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 () {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue