[#263] Remove profile popups, never finished
This commit is contained in:
parent
155e1ba2a7
commit
ca3eeedfff
|
@ -18,7 +18,6 @@
|
|||
<%= javascript_heads %>
|
||||
<%= stylesheet_link_tag 'jstoolbar' %>
|
||||
<%= javascript_include_tag 'jquery.1.3.2.min.js' %>
|
||||
<%= javascript_include_tag 'jquery.hoverIntent.minified.js' %>
|
||||
<%= javascript_include_tag 'common.js' %>
|
||||
<%= heads_for_theme %>
|
||||
<% heads_for_wiki_formatter %>
|
||||
|
|
|
@ -48,38 +48,6 @@ jQuery(document).ready(function($) {
|
|||
$("div[rel="+tTarget+"]").hide();
|
||||
});
|
||||
|
||||
// show/hide the profile box when hover over the gravatar
|
||||
$(".profile-wrap").hover(function() {
|
||||
/*
|
||||
* this is currently set to deal with profiles that are already in the document
|
||||
* if you wish to move to an ajax call instead, this is where it will occur
|
||||
*/
|
||||
$(this).find("a").removeAttr("title"); /* tooltips always mess with hovers */
|
||||
$(this).find(".profile-box").slideDown(animRate);
|
||||
}, function() {
|
||||
$(this).find(".profile-box").slideUp(animRate);
|
||||
});
|
||||
|
||||
// set up functions for delayed profile views.
|
||||
function profileShow(){
|
||||
var thisTop = $(this).height() + 5;
|
||||
$(this).find("a").removeAttr("title"); /* tooltips always mess with hovers */
|
||||
$(this).find(".profile-box").css('top', thisTop).slideDown(animRate);
|
||||
};
|
||||
function profileHide(){
|
||||
$(this).find(".profile-box").hide();
|
||||
};
|
||||
|
||||
// call a delayed profile view
|
||||
$(".user").hoverIntent({
|
||||
sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)
|
||||
interval: 400, // number = milliseconds for onMouseOver polling interval
|
||||
over: profileShow, // function = onMouseOver callback (REQUIRED)
|
||||
timeout: 50, // number = milliseconds delay before onMouseOut
|
||||
out: profileHide // function = onMouseOut callback (REQUIRED)
|
||||
|
||||
});
|
||||
|
||||
// file table thumbnails
|
||||
$("table a.has-thumb").hover(function() {
|
||||
$(this).removeAttr("title").toggleClass("active");
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
/**
|
||||
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
|
||||
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
||||
*
|
||||
* @param f onMouseOver function || An object with configuration options
|
||||
* @param g onMouseOut function || Nothing (use configuration options object)
|
||||
* @author Brian Cherne <brian@cherne.net>
|
||||
*/
|
||||
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
|
Loading…
Reference in New Issue