My favorites
▼
|
Sign in
jaikuengine
Jaiku, now with more open source!
Project Home
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
45
attachment: jaikuengine-issue-45-patch.diff
(1.6 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Index: js/core.js
===================================================================
--- js/core.js (revision 1)
+++ js/core.js (working copy)
@@ -86,15 +86,33 @@
count: function () {
var value = counter.el.value;
var count = value.length;
- if (140 - count > 1) {
- str = (140 - count) + " characters left";
+ chars_left = 140 - count;
+ if (chars_left >= 0) {
+ if ($(counter.target.parentNode).is('.error')) {
+ $(counter.target.parentNode).removeClass("error");
+ }
+
+ if (chars_left > 1) {
+ str = (chars_left) + " characters left";
+ }
+ else if (chars_left > 0) {
+ str = "1 character left";
+ }
+ else {
+ str = "No characters left";
+ }
+ } else {
+ if (!$(counter.target.parentNode).is('.error')) {
+ $(counter.target.parentNode).addClass("error");
+ }
+
+ if (chars_left < -1) {
+ str = -chars_left + " characters over limit";
+ }
+ else {
+ str = "1 character over limit";
+ }
}
- else if (140 - count > 0) {
- str = "1 character left";
- }
- else {
- str = "No characters left";
- }
var ok = (count > 0 && count < 141) && (value.replace(counter.re,"") != counter.el._value);
counter.button.disabled = !ok;
counter.target.nodeValue = str;
Index: themes/trotz/screen.css
===================================================================
--- themes/trotz/screen.css (revision 1)
+++ themes/trotz/screen.css (working copy)
@@ -158,7 +158,7 @@
}
p.error, span.error {
- color: #c33;
+ color: #c33 !important;
}
p.success {
Powered by
Google Project Hosting