fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-05-12 08:59 am

[dw-free] Contextual hover menu doesn't work on jquerified pages

[commit: http://hg.dwscoalition.org/dw-free/rev/79e083120192]

http://bugs.dwscoalition.org/show_bug.cgi?id=2507

Remove obsolete file.

Patch by [personal profile] fu.

Files modified:
  • htdocs/js/contextualhover-jquery.js
--------------------------------------------------------------------------------
diff -r c29f3ee7ce3d -r 79e083120192 htdocs/js/contextualhover-jquery.js
--- a/htdocs/js/contextualhover-jquery.js	Thu May 12 16:45:29 2011 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-(function($) {
-    $.widget("ui.contextualhover", {
-        popupDelay: 500,
-        hideDelay: 250,
-    });
-
-    var ContextualHover = {
-        setup: function() {
-            if (!Site || !Site.ctx_popup) return;
-            if (Site.ctx_popup_userhead)
-                ContextualHover._initUserhead();
-    
-            if (Site.ctx_popup_icons)
-                ContextualHover._initIcons();
-        },
-
-        _initUserhead: function() {
-            $("span.ljuser").each(function() {
-                var $usertag = $(this);
-                if ( $usertag.data("userdata") ) return;
-
-                $("img", $usertag).each(function() {
-                    // if the parent (a tag with link to userinfo) has userid in its URL, then
-                    // this is an openid user icon and we should use the userid
-                    var $parent = $(this).parent("a[href]");
-                    var data = {};
-                    var userid;
-                    if (userid = $parent.attr("href").match(/\?userid=(\d+)/i)) 
-                        data.userid = userid[1];
-                    else
-                        data.username = $usertag.attr("lj:user");
-                    if ( !data.username && !data.userid ) return;
-
-                    $usertag.data("userdata", data).addClass("ContextualPopup");
-                });
-            });
-        },
-
-        _initIcons: function() {
-
-            $("img[src*='/userpic/']").each(function() {
-                if ( $(this).data("icon_url") ) return;
-                if (this.src.match(/userpic\..+\/\d+\/\d+/) ||
-                    this.src.match(/\/userpic\/\d+\/\d+/)) {
-                    $(this).data("icon_url", this.src).addClass("ContextualPopup");
-                }
-            });
-        }
-    }
-
-    // for init
-    $.extend({ contextualhover: ContextualHover.setup });
-
-})(jQuery);
-
-// initialize on page load
-$(function() {
-    $.contextualhover();
-    $(".ContextualPopup").live("mousemove", function(e){
-        console.log(e.target);
-    });
-});
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org