Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r19076: LJSV-1584: antispam - do not show "ban" ...

Committer: szhirkov
LJSV-1584: antispam - do not show "ban" message for anonimous users
U   trunk/htdocs/js/commentmanage.js
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-05-18 10:11:52 UTC (rev 19075)
+++ trunk/htdocs/js/commentmanage.js	2011-05-18 10:17:09 UTC (rev 19076)
@@ -242,10 +242,8 @@
 		}
         var canAdmin = LJ_cmtinfo.canAdmin;
 		
-		var imageInTarget = jQuery(ae).find('img');
+		var markSpamMLPrefix = (Site.remote_is_maintainer == 1 && com.u !== '') ? 'comment.mark.spam.' : 'comment.mark.spam2.';		
 		
-		var markSpamMLPrefix = (Site.remote_is_maintainer == 1) ? 'comment.mark.spam.' : 'comment.mark.spam2.';
-		
 		if (action == 'markAsSpam') {
 			if (!window.delPopup) {
 				window.delPopup = jQuery('<div />')
@@ -253,11 +251,11 @@
 						window.delPopup.bubble('hide');
 					});
 			}			
-			
+
 			window.delPopup
 				.html('<div class="b-popup-group"><div class="b-popup-row b-popup-row-head"><strong>' + getLocalizedStr(markSpamMLPrefix + 'title', comUser) + '</strong></div><div class="b-popup-row">' + getLocalizedStr(markSpamMLPrefix + 'subject', comUser) + '</div><div class="b-popup-row"><input type="button" class="spam-comment-button" onclick="deleteComment(' + dItemid + ', \'' + action + '\');" value="' + getLocalizedStr(markSpamMLPrefix + 'button', comUser) + '"></div><div>', ae, e, 'spamComment' + dItemid)
 				.bubble()
-				.bubble('show', (imageInTarget.length === 0) ? ae : imageInTarget);
+				.bubble('show', ae);
 
 			return true;
 		} else if (action == 'delete') {
@@ -289,7 +287,7 @@
 			window.modPopup
 				.html(inHTML.join(' '))
 				.bubble()
-				.bubble('show', (imageInTarget.length === 0) ? ae : imageInTarget);
+				.bubble('show', ae);
 				
 		} else if (action == 'unspam') {
 			deleteComment(dItemid, action);

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