forked from GNUsocial/gnu-social
		
	fix ModPlus 'remote profile options' popup for Realtime
Switched from one-time setup to live stuff that'll work without per-notice setup. Used to not matter because Realtime wouldn't include the extra stuff, but new Realtime pulls the full rendering, so yay!
This commit is contained in:
		@@ -4,20 +4,18 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(function() {
 | 
					$(function() {
 | 
				
			||||||
    function ModPlus_setup(notice) {
 | 
					    $('.notice .author').live('mouseenter', function(e) {
 | 
				
			||||||
        if ($(notice).find('.remote-profile-options').size()) {
 | 
					        var notice = $(this).closest('.notice');
 | 
				
			||||||
            var $options = $(notice).find('.remote-profile-options');
 | 
					        var popup = notice.find('.remote-profile-options');
 | 
				
			||||||
            $options.prepend($())
 | 
					        if (popup.length) {
 | 
				
			||||||
            $(notice).find('.author').mouseenter(function(event) {
 | 
					            popup.fadeIn();
 | 
				
			||||||
                $(notice).find('.remote-profile-options').fadeIn();
 | 
					        }
 | 
				
			||||||
            });
 | 
					    });
 | 
				
			||||||
            $(notice).mouseleave(function(event) {
 | 
					    $('.notice').live('mouseleave', function(e) {
 | 
				
			||||||
                $(notice).find('.remote-profile-options').fadeOut();
 | 
					        var notice = $(this);
 | 
				
			||||||
            });
 | 
					        var popup = notice.find('.remote-profile-options');
 | 
				
			||||||
 | 
					        if (popup.length) {
 | 
				
			||||||
 | 
					            popup.fadeOut();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    $('.notice').each(function() {
 | 
					 | 
				
			||||||
        ModPlus_setup(this);
 | 
					 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user