[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
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2507
Remove obsolete file.
Patch by
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);
- });
-});
--------------------------------------------------------------------------------
