Committer: dnikolaev
LJSUP-7813: New thread expander in S2, minimalismU 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}); + } } };