From c2d316449f85bd2b74ae9ffaa3d08b7a5ee282cf Mon Sep 17 00:00:00 2001 From: Alex Bitney Date: Sun, 7 Feb 2016 00:00:41 +0200 Subject: 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. --- src/main/webapp/scripts.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main/webapp/scripts.js') 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() { -- cgit v1.2.3