can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r21037: LJSUP-11059: Move commenting form under ...

Committer: dpetrov
LJSUP-11059: Move commenting form under comment
U   trunk/htdocs/js/quickreply.js
Modified: trunk/htdocs/js/quickreply.js
===================================================================
--- trunk/htdocs/js/quickreply.js	2012-01-30 07:57:51 UTC (rev 21036)
+++ trunk/htdocs/js/quickreply.js	2012-01-30 08:16:11 UTC (rev 21037)
@@ -4,6 +4,7 @@
 	reply: function(dtid, pid, newsubject)
 	{
 		var targetname = 'ljqrt' + dtid,
+			targetcomment = 'ljcmt' + dtid,
 			qr_ptid = $('parenttalkid'),
 			qr_rto = $('replyto'),
 			qr_dtid = $('dtid'),
@@ -25,9 +26,15 @@
 		if (QuickReply.lastDiv == 'qrdiv') {
 			qr_div.style.display = 'inline';
 			// Only one swap
-			cur_div.parentNode.insertBefore(qr_div, cur_div);
 		} else if (QuickReply.lastDiv != dtid) {
+		}
+
+		var comments = $('comments');
+
+		if (!comments || comments.className.indexOf('entry-comments-s1') === -1) {
 			cur_div.parentNode.insertBefore(qr_div, cur_div);
+		} else {
+			$(targetcomment).appendChild(qr_div);
 		}
 		
 		QuickReply.lastDiv = targetname;

Tags: can3p, dpetrov, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments