Update to remind note max length limit on the status bar length div
This commit is contained in:
parent
3175616573
commit
72d7ba0f31
1 changed files with 12 additions and 1 deletions
|
@ -677,7 +677,18 @@ function updateStatusBar() {
|
||||||
statusCursor.text(cursorText);
|
statusCursor.text(cursorText);
|
||||||
var fileText = ' — ' + editor.lineCount() + ' Lines';
|
var fileText = ' — ' + editor.lineCount() + ' Lines';
|
||||||
statusFile.text(fileText);
|
statusFile.text(fileText);
|
||||||
statusLength.text('Length ' + editor.getValue().length);
|
var docLength = editor.getValue().length;
|
||||||
|
statusLength.text('Length ' + docLength);
|
||||||
|
if (docLength > (docmaxlength * 0.95)) {
|
||||||
|
statusLength.css('color', 'red');
|
||||||
|
statusLength.attr('title', 'Your almost reach note max length limit.');
|
||||||
|
} else if (docLength > (docmaxlength * 0.8)) {
|
||||||
|
statusLength.css('color', 'orange');
|
||||||
|
statusLength.attr('title', 'You nearly fill the note, consider to make more pieces.');
|
||||||
|
} else {
|
||||||
|
statusLength.css('color', 'white');
|
||||||
|
statusLength.attr('title', 'You could write up to ' + docmaxlength + ' characters in this note.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ui vars
|
//ui vars
|
||||||
|
|
Loading…
Reference in a new issue