can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r20566: LJSUP-10159: New Comment Form. Add class...

Committer: dpetrov
LJSUP-10159: New Comment Form. Add class to disable contextual popup if needed
U   branches/commenting-form/htdocs/js/contextualhover.js
Modified: branches/commenting-form/htdocs/js/contextualhover.js
===================================================================
--- branches/commenting-form/htdocs/js/contextualhover.js	2011-11-17 14:15:56 UTC (rev 20565)
+++ branches/commenting-form/htdocs/js/contextualhover.js	2011-11-17 14:19:15 UTC (rev 20566)
@@ -554,6 +554,7 @@
 			// attach to all ljuser head icons
 			var rex_userid = /\?userid=(\d+)/,
 				rex_userpic = /(userpic\..+\/\d+\/\d+)|(\/userpic\/\d+\/\d+)/,
+				class_nopopup = 'noctxpopup',
 				ljusers = jQuery('span.ljuser>a>img', node),
 				i = -1, userid, ljuser, parent;
 
@@ -562,7 +563,7 @@
 				ljuser = ljusers[i];
 				parent = ljuser.parentNode;
 
-				if (parent.href && (userid = parent.href.match(rex_userid))) {
+				if (parent.href && (userid = parent.href.match(rex_userid)) && !(parent.className.indexOf(class_nopopup) >= 0)) {
 					ljuser.userid = userid[1];
 				} else if (parent.parentNode.getAttribute('lj:user')) {
 					ljuser.username = parent.parentNode.getAttribute('lj:user');
@@ -580,7 +581,7 @@
 			i = -1;
 			while (ljusers[++i]) {
 				ljuser = ljusers[i];
-				if (ljuser.src.match(rex_userpic)) {
+				if (ljuser.src.match(rex_userpic) && !(ljuser.className.indexOf(class_nopopup) >= 0)) {
 					ljuser.up_url = ljuser.src;
 					if (ljuser.parentNode.getAttribute('data-journal')) {
 						ljuser.posted_in = ljuser.parentNode.getAttribute('data-journal');

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