diff options
author | Simon <simon@kisikew.org> | 2012-03-04 02:02:15 -0800 |
---|---|---|
committer | Simon <simon@kisikew.org> | 2012-03-04 02:02:15 -0800 |
commit | a7b637b933fffdf0a1972ee198ebf31d8c3e1a9d (patch) | |
tree | 90fcb045e64fb89448dd0704a98c1608b66f0606 /view/theme/dispy/jot-header.tpl | |
parent | dfa056bb1beedf4e48c470ff14bfa7d412ebcb26 (diff) | |
parent | c28ce8a79cae9721bc5291f7ef7d17674d29ebf3 (diff) | |
download | volse-hubzilla-a7b637b933fffdf0a1972ee198ebf31d8c3e1a9d.tar.gz volse-hubzilla-a7b637b933fffdf0a1972ee198ebf31d8c3e1a9d.tar.bz2 volse-hubzilla-a7b637b933fffdf0a1972ee198ebf31d8c3e1a9d.zip |
Merge pull request #75 from simonlnu/master
theme tweaks
Diffstat (limited to 'view/theme/dispy/jot-header.tpl')
-rw-r--r-- | view/theme/dispy/jot-header.tpl | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index 0a559aae7..23883036b 100644 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -4,10 +4,11 @@ var editor=false; var textlen = 0; var plaintext = '$editselect'; +// this is here because of the silly tinymce error. didn't help. var skin = 'default'; -function initEditor(cb){ - if (editor==false){ +function initEditor(cb) { + if (editor==false) { $("#profile-jot-text-loading").show(); if(plaintext == 'none') { $("#profile-jot-text-loading").hide(); @@ -22,7 +23,8 @@ function initEditor(cb){ cb(); } return; - } + } + tinyMCE.init({ theme : "advanced", skin : "default", @@ -100,7 +102,36 @@ function initEditor(cb){ ed.pasteAsPlainText = true; $("#profile-jot-text-loading").hide(); $(".jothidden").show(); - if (typeof cb!="undefined") cb(); + + 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); + }); + }); } }); |