diff options
author | Ugnich Anton | 2014-02-15 13:13:04 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-02-15 13:13:04 +0700 |
commit | 48b7aa72126b1a75e470077de48408d24fb1b546 (patch) | |
tree | 2149e2b47144a54280b965cc9a0b4b488c26d694 /web/scripts3.js | |
parent | c25951ec334d94a9471ad0f2575b7c8ee4e7e21a (diff) |
New message layout (article); Google Analytics; small bugfixes
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index 723e3d76..8445ee19 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -443,6 +443,19 @@ function showCommentForm(mid,rid) { return false; } +function showCommentFooter(e) { + var a=$(e).closest("article"); + if(a.find("footer.comm").length==0) { + a.append('<form action="/post" method="POST" enctype="multipart/form-data"><input type="hidden" name="mid" value="'+a.data('mid')+'"/><footer class="comm"><div class="ta-wrapper"><textarea name="body" rows="1" class="reply narrow" placeholder="Написать комментарий..." onkeypress="postformListener(this.form,event)"></textarea><div class="attach-photo" onclick="attachCommentPhoto(this)"/></div><input type="submit" value="OK"/></footer></form>'); + a.find('textarea').autoResize({ + extraSpace: 0, + minHeight: 1 + }); + } + a.find('textarea')[0].focus(); + return false; +} + function attachCommentPhoto(div) { if($(div).children().length===0) { var inp=$('<input type="file" name="attach" accept="image/jpeg,image/png" style="visibility: hidden"/>'); |