mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-02 09:54:37 +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.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');
|
$('.help-block', $form).addClass('hide');
|
||||||
|
|
||||||
$form.off().on('ajax:send', function () {
|
$form.off().on('ajax:send', function () {
|
||||||
|
|
|
@ -297,7 +297,6 @@
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
pointer-events: none;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
|
@ -307,6 +306,7 @@
|
||||||
&:disabled {
|
&:disabled {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
pointer-events: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -448,7 +448,7 @@
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&.border {
|
||||||
border: 1px solid $color-silver;
|
border: 1px solid $color-silver;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,8 +462,8 @@
|
||||||
right: -36px;
|
right: -36px;
|
||||||
transition: $md-transaction;
|
transition: $md-transaction;
|
||||||
|
|
||||||
&.has-error {
|
&.show {
|
||||||
top: -64px;
|
right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,9 +472,5 @@
|
||||||
textarea {
|
textarea {
|
||||||
border: 1px solid $color-silver;
|
border: 1px solid $color-silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-comment-button {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue