Update to notice form character count warning
This commit is contained in:
parent
05b69a290d
commit
e34efca7f3
|
@ -22,13 +22,13 @@ $(document).ready(function(){
|
|||
var maxLength = 140;
|
||||
var currentLength = $("#notice_data-text").val().length;
|
||||
var remaining = maxLength - currentLength;
|
||||
var counter = $("#counter");
|
||||
var counter = $("#notice_text-count");
|
||||
counter.text(remaining);
|
||||
|
||||
if (remaining <= 0) {
|
||||
$("#form_notice").addClass("response_error");
|
||||
$("#form_notice").addClass("warning");
|
||||
} else {
|
||||
$("#form_notice").removeClass("response_error");
|
||||
$("#form_notice").removeClass("warning");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@ color:#88171A;
|
|||
#notice_text-count {
|
||||
color:#333;
|
||||
}
|
||||
#notice_text-count.warning {
|
||||
color:#FDFF00;
|
||||
background-color:#000;
|
||||
#form_notice.warning #notice_text-count {
|
||||
color:#000;
|
||||
background-color:#A9BF4F;
|
||||
}
|
||||
#notice_data-text.warning {
|
||||
border-color:#FDFF00;
|
||||
#form_notice.warning #notice_data-text {
|
||||
border-color:#A9BF4F;
|
||||
}
|
||||
|
||||
#form_notice #notice_data-attach_view {
|
||||
|
|
Loading…
Reference in New Issue
Block a user