aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/dispy
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-04 12:21:08 -0500
committerSimon L'nu <simon.lnu@gmail.com>2012-03-04 12:21:08 -0500
commit5f77aff48692d7fbf286b5a1b5476c652a1b608f (patch)
tree2aeb5fe3dcb574e44734d658ff9ed97e140b149f /view/theme/dispy
parentd98ca8e127eca8cee1953012e0bda5f3fee16672 (diff)
downloadvolse-hubzilla-5f77aff48692d7fbf286b5a1b5476c652a1b608f.tar.gz
volse-hubzilla-5f77aff48692d7fbf286b5a1b5476c652a1b608f.tar.bz2
volse-hubzilla-5f77aff48692d7fbf286b5a1b5476c652a1b608f.zip
more tweakage. stylesheet and jot-header
Signed-off-by: Simon L'nu <simon.lnu@gmail.com>
Diffstat (limited to 'view/theme/dispy')
-rw-r--r--view/theme/dispy/jot-header.tpl56
-rw-r--r--view/theme/dispy/style.css5
2 files changed, 32 insertions, 29 deletions
diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl
index 23883036b..93df84aae 100644
--- a/view/theme/dispy/jot-header.tpl
+++ b/view/theme/dispy/jot-header.tpl
@@ -104,34 +104,6 @@ function initEditor(cb) {
$(".jothidden").show();
if (typeof cb!="undefined") { cb(); }
-
- // character count part deux
- //
- // get # of chars
- var textlen = $('#profile-jot-text').val().length();
- $('#character-counter').html(textlen);
-
- $('#profile-jot-text').keyup(function() {
- $('#character-counter').removeClass('jothidden');
- if(textlen <= 140) {
- $('#character-counter').removeClass('red');
- $('#character-counter').removeClass('orange');
- $('#character-counter').addClass('grey');
- }
- if((textlen > 140) && (textlen <= 420)) {
- $('#character-counter').removeClass('grey');
- $('#character-counter').removeClass('red');
- $('#character-counter').addClass('orange');
- }
- if(textlen > 420) {
- $('#character-counter').removeClass('grey');
- $('#character-counter').removeClass('orange');
- $('#character-counter').addClass('red');
- }
- // get new len
- $('#character-counter').html($(this).val().length);
- });
-
});
}
});
@@ -146,10 +118,38 @@ function initEditor(cb) {
}
}
+function charCounter() {
+ // character count part deux
+ $('#profile-jot-text').keyup(function(event) {
+ var textlen = $(this).val().length();
+ var maxLen1 = 140;
+ var maxLen2 = 420;
+
+ $('#character-counter').removeClass('jothidden');
+ if(textlen <= maxLen1) {
+ $('#character-counter').removeClass('red');
+ $('#character-counter').removeClass('orange');
+ $('#character-counter').addClass('grey');
+ }
+ if((textlen > maxLen1) && (textlen <= maxLen2)) {
+ $('#character-counter').removeClass('grey');
+ $('#character-counter').removeClass('red');
+ $('#character-counter').addClass('orange');
+ }
+ if(textlen > maxLen2) {
+ $('#character-counter').removeClass('grey');
+ $('#character-counter').removeClass('orange');
+ $('#character-counter').addClass('red');
+ }
+ $('#character-counter').html($(this).val().length);
+ });
+}
+
function enableOnUser(){
if (editor) return;
$(this).val("");
initEditor();
+ charCounter();
}
</script>
diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css
index 4d5f51eb2..95bc1c6f7 100644
--- a/view/theme/dispy/style.css
+++ b/view/theme/dispy/style.css
@@ -918,9 +918,12 @@ aside #viewcontacts {
#acl-deny-text-end {
clear: both;
}
-#jot-title-desc, #profile-jot-desc {
+#jot-title-desc {
color: #cccccc;
}
+#profile-jot-desc {
+ color: #a00;
+}
#jot-title-wrapper {
margin-bottom: 5px;
}