From 3184680827e2a611e71c57dd2a74c4e7e754b8a6 Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Sun, 8 Dec 2013 16:38:38 +0700
Subject: attachCommentPhoto
---
web/scripts3.js | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
(limited to 'web/scripts3.js')
diff --git a/web/scripts3.js b/web/scripts3.js
index 087a2d66..dc2cc330 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -117,7 +117,7 @@ function showGroup(gid) {
""+
"
"+item.body+"
"+
photo+
- ""+
+ ""+
replies
);
ul.append(li);
@@ -173,7 +173,7 @@ function showMessages(param) {
""+
""+item.body+"
"+
photo+
- ""+
+ ""+
replies
);
ul.append(li);
@@ -225,7 +225,7 @@ function showMessage(mid) {
""+
""+post.body+"
"+
photo+
- ""
+ ""
);
ul.append(li);
@@ -423,7 +423,7 @@ function showCommentForm(mid,rid) {
var c=$('#replies #'+rid+' .msg-comment');
c.wrap('');
c.before('');
- c.append('');
+ c.append('');
}
// $('#replies #'+rid+' .msg-links').hide();
$('#replies #'+rid+' .msg-comment').show();
@@ -435,6 +435,20 @@ function showCommentForm(mid,rid) {
return false;
}
+function attachCommentPhoto(div) {
+ if($(div).children().length===0) {
+ var inp=$('');
+ inp.on('change',function() {
+ $(this).parent().attr('class','attach-photo-active');
+ });
+ inp.trigger('click');
+ $(div).append(inp);
+ } else {
+ $(div).empty();
+ $(div).attr('class','attach-photo');
+ }
+}
+
function unfoldReply() {
if((0+window.location.hash.substring(1))>0) {
var el=$(window.location.hash);
@@ -795,7 +809,8 @@ $(document).ready(function() {
});
tareply.click(function () {
$(this).addClass("narrow");
- $(this).after('');
+ $(this).after('');
+ $(this).parent().after('');
$(this).off('click');
});
--
cgit v1.2.3