Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[livejournal] r18816: LJSUP-7813: New thread expander in S2, m...

Committer: dnikolaev
LJSUP-7813: New thread expander in S2, minimalism

U   trunk/htdocs/js/commentmanage.js
U   trunk/htdocs/tools/endpoints/get_thread.bml
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-04-06 12:48:19 UTC (rev 18815)
+++ trunk/htdocs/js/commentmanage.js	2011-04-07 03:33:14 UTC (rev 18816)
@@ -163,7 +163,8 @@
             removeComment(ditemid, opt_delthread);
             if (opt_delauthor) {
                 for (var item in LJ_cmtinfo) {
-					if (LJ_cmtinfo[item].u == LJ_cmtinfo[ditemid].u && !LJ_cmtinfo[ item ].is_deleted ) {
+					if ( LJ_cmtinfo[item].u == LJ_cmtinfo[ditemid].u
+						&& !LJ_cmtinfo[ item ].is_deleted ) {
                         removeComment(item, false);
                     }
                 }
@@ -192,7 +193,7 @@
 					delete ExpanderEx.Collection[ dtid ];
 				}
 			} );
-		} );
+		}, true );
 	}
 	else {
 		var todel = document.getElementById("ljcmt" + ditemid);
@@ -576,6 +577,8 @@
 			var id = reMatch[1];
 			if (!document.getElementById('ljcmt' + id)) return;
 			createModerationFunction(ae, id, 'unspam')( ev );
+		} else {
+			return;
 		}
 
 			ev.preventDefault();

Modified: trunk/htdocs/tools/endpoints/get_thread.bml
===================================================================
--- trunk/htdocs/tools/endpoints/get_thread.bml	2011-04-06 12:48:19 UTC (rev 18815)
+++ trunk/htdocs/tools/endpoints/get_thread.bml	2011-04-07 03:33:14 UTC (rev 18816)
@@ -309,7 +309,10 @@
                     depth  => $c->{depth},
                     state  => $state,
                 };
-                $self->($self, $c->{replies}) if $c->{replies} && @{$c->{replies}};
+
+                if (!$GET{single} && $c->{replies} && @{$c->{replies}}) {
+                    $self->($self, $c->{replies});
+                }
             }
         };
 

Tags: bml, js, livejournal, wildkin
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