diff options
author | Alex Bitney | 2016-02-07 00:00:41 +0200 |
---|---|---|
committer | Alex Bitney | 2016-02-07 00:00:41 +0200 |
commit | c2d316449f85bd2b74ae9ffaa3d08b7a5ee282cf (patch) | |
tree | ce808c6d65e4a61913497f5d397473f75fadc701 /src/main/webapp/scripts.js | |
parent | 1fffebc18bbdbe87b456e2b3bd66e9ce5a6afcb8 (diff) |
added tags when posting new message
added templates engine (rythm engine) and moved something to it.
WARNING: textext plugin does not work when minimized, and also I fixed bug in it.
Diffstat (limited to 'src/main/webapp/scripts.js')
-rw-r--r-- | src/main/webapp/scripts.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/webapp/scripts.js b/src/main/webapp/scripts.js index bb3ddc5d..811764e8 100644 --- a/src/main/webapp/scripts.js +++ b/src/main/webapp/scripts.js @@ -134,8 +134,9 @@ function postformListener(formEl,ev) { function unfoldPostForm() { if(window.location.pathname==="/" && window.location.hash==="#post") { - $('#newmessage>div').css('display','block'); - $('#newmessage textarea').css('min-height','70px'); + if (newmessage_toggleOpen) { + newmessage_toggleOpen(); + } $('#newmessage textarea')[0].focus(); } } @@ -652,6 +653,16 @@ jQuery.fn.selectText = function(){ })(jQuery); +// listening to style changes http://stackoverflow.com/questions/2157963/is-it-possible-to-listen-to-a-style-change-event +(function() { + var ev = new $.Event('style'), + orig = $.fn.css; + $.fn.css = function() { + $(this).trigger(ev); + return orig.apply(this, arguments); + } +})(); + /******************************************************************************/ $(document).ready(function() { |