changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[livejournal] r18738: LJSUP-8437: not working navigation menu ...

Committer: dpetrov
LJSUP-8437: not working navigation menu in post
U   trunk/htdocs/js/commentmanage.js
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-03-30 07:08:11 UTC (rev 18737)
+++ trunk/htdocs/js/commentmanage.js	2011-03-30 07:14:09 UTC (rev 18738)
@@ -539,35 +539,37 @@
 		$( 'body' ).delegate( 'a', 'click', function( ev ) {
 			var rex_id = /id=(\d+)/, ae = this;
 
-		if (ae.href.indexOf('talkscreen.bml') != -1) {
-			var reMatch = rex_id.exec(ae.href);
-			if (!reMatch) return;
+			if (ae.href.indexOf('talkscreen.bml') != -1) {
+				var reMatch = rex_id.exec(ae.href);
+				if (!reMatch) return;
 
-			var id = reMatch[1];
-			if (!document.getElementById('ljcmt' + id)) return;
+				var id = reMatch[1];
+				if (!document.getElementById('ljcmt' + id)) return;
 
-			createModerationFunction(ae, id)( ev );
-		} else if (ae.href.indexOf('delcomment.bml') != -1) {
-			if (LJ_cmtinfo && LJ_cmtinfo.disableInlineDelete) return;
+				createModerationFunction(ae, id)( ev );
+			} else if (ae.href.indexOf('delcomment.bml') != -1) {
+				if (LJ_cmtinfo && LJ_cmtinfo.disableInlineDelete) return;
 
-			var reMatch = rex_id.exec(ae.href);
-			if (!reMatch) return;
+				var reMatch = rex_id.exec(ae.href);
+				if (!reMatch) return;
 
-			var id = reMatch[1];
-			if (!document.getElementById('ljcmt' + id)) return;
+				var id = reMatch[1];
+				if (!document.getElementById('ljcmt' + id)) return;
 
-			var action = (ae.href.indexOf('spam=1') != -1) ? 'markAsSpam' : 'delete';
+				var action = (ae.href.indexOf('spam=1') != -1) ? 'markAsSpam' : 'delete';
 
-			createDeleteFunction(ae, id, action)( ev );
-		// unspam
-		} else if (ae.href.indexOf('spamcomment.bml') != -1) {
-			var reMatch = rex_id.exec(ae.href);
-			if (!reMatch) return;
+				createDeleteFunction(ae, id, action)( ev );
+			// unspam
+			} else if (ae.href.indexOf('spamcomment.bml') != -1) {
+				var reMatch = rex_id.exec(ae.href);
+				if (!reMatch) return;
 
-			var id = reMatch[1];
-			if (!document.getElementById('ljcmt' + id)) return;
-			createModerationFunction(ae, id, 'unspam')( ev );
-				}
+				var id = reMatch[1];
+				if (!document.getElementById('ljcmt' + id)) return;
+				createModerationFunction(ae, id, 'unspam')( ev );
+			} else {
+				return;
+			}
 
 			ev.preventDefault();
 			ev.stopPropagation();

Tags: can3p, 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