diff options
author | Friendika <info@friendika.com> | 2011-11-04 01:52:33 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-04 01:52:33 -0700 |
commit | 2765b0ba4145dd58e49caa74b780dd6c19d7551c (patch) | |
tree | 675bf71f2d008e8cec5271f0b77e1dd83c9a1a1f /view | |
parent | 0130052b2cfde6ca888506807c1b5e7e61209151 (diff) | |
parent | 51b0f583b0b4f9e9f7a2fcfdf27332c905cc1011 (diff) | |
download | volse-hubzilla-2765b0ba4145dd58e49caa74b780dd6c19d7551c.tar.gz volse-hubzilla-2765b0ba4145dd58e49caa74b780dd6c19d7551c.tar.bz2 volse-hubzilla-2765b0ba4145dd58e49caa74b780dd6c19d7551c.zip |
Merge branch 'atcomplete'
Diffstat (limited to 'view')
-rw-r--r-- | view/jot-header.tpl | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/view/jot-header.tpl b/view/jot-header.tpl index ecf27e1b1..9ded3e9b4 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -30,9 +30,26 @@ function initEditor(cb){ content_css: "$baseurl/view/custom_tinymce.css", theme_advanced_path : false, setup : function(ed) { - //Character count + cPopup = null; + ed.onKeyDown.add(function(ed,e) { + if(cPopup !== null) + cPopup.onkey(e); + }); + ed.onKeyUp.add(function(ed, e) { var txt = tinyMCE.activeEditor.getContent(); + match = txt.match(/@([^ \n]+)$/); + if(match!==null) { + if(cPopup === null) { + cPopup = new ACPopup(this,baseurl+"/acl"); + } + if(cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]); + if(! cPopup.ready) cPopup = null; + } + else { + if(cPopup !== null) { cPopup.close(); cPopup = null; } + } + textlen = txt.length; if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) { $('#profile-jot-desc').html(ispublic); @@ -41,6 +58,8 @@ function initEditor(cb){ $('#profile-jot-desc').html(' '); } + //Character count + if(textlen <= 140) { $('#character-counter').removeClass('red'); $('#character-counter').removeClass('orange'); @@ -71,8 +90,8 @@ function initEditor(cb){ editor = true; // setup acl popup $("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'none', - 'transitionOut' : 'none' + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' }); } else { if (typeof cb!="undefined") cb(); |