Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -88,6 +88,7 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
position: 'bottomLeft',
|
||||
w: '500px',
|
||||
openOnClick: false,
|
||||
openOnHover: true,
|
||||
ajaxUrl: false,
|
||||
delay: 800,
|
||||
ajaxCacheExpire: 0,
|
||||
@@ -125,14 +126,18 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
$( elem.id ).down('a').writeAttribute( 'title', '' );
|
||||
}
|
||||
|
||||
$( elem.id ).down('img').writeAttribute( 'title', '' );
|
||||
$( elem.id ).down('img').writeAttribute( 'alt', '' );
|
||||
if( $( elem.id ).down('img') )
|
||||
{
|
||||
$( elem.id ).down('img').writeAttribute( 'title', '' );
|
||||
$( elem.id ).down('img').writeAttribute( 'alt', '' );
|
||||
}
|
||||
}
|
||||
catch (aBall){}
|
||||
|
||||
$( elem.id ).observe( 'click' , _hc.mClick.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'mouseover', _hc.mOver.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'mouseout' , _hc.mOut.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'contextmenu' , _hc.mContext.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'click' , _hc.mClick.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'mouseover' , _hc.mOver.bindAsEventListener( _hc, elem.id ) );
|
||||
$( elem.id ).observe( 'mouseout' , _hc.mOut.bindAsEventListener( _hc, elem.id ) );
|
||||
} );
|
||||
},
|
||||
|
||||
@@ -141,7 +146,11 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
*/
|
||||
mMove: function(e)
|
||||
{
|
||||
this.curEvent = e;
|
||||
/* IE loses reference to event, so we need to copy it instead of use original reference */
|
||||
var _newEvent = {};
|
||||
for( var i in e ) { _newEvent[i] = e[i]; }
|
||||
|
||||
this.curEvent = _newEvent;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -153,6 +162,31 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
{
|
||||
this.close(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ( $(id).tagName.toLowerCase() == 'input' && $(id).type.toLowerCase() == 'checkbox' )
|
||||
{
|
||||
/* If this is a checkbox, and we're choosing to show on click then we probably only
|
||||
* want to show the card if we're clicking 'true'
|
||||
*/
|
||||
|
||||
if ( $(id).checked !== true )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
this.show(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* ITEM Context menu
|
||||
*/
|
||||
mContext: function(e, id)
|
||||
{
|
||||
this.close(id);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -167,6 +201,11 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( this.options.openOnHover !== true )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this.debugWrite( "mover - setting time OVER " + id );
|
||||
|
||||
if ( ! Object.isUndefined( this.timer[id + '_out'] ) )
|
||||
@@ -237,7 +276,7 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
|
||||
if ( this.options.ajaxUrl )
|
||||
{
|
||||
content = "<div class='general_box pad' style='height: 20px; text-align:center'><img src='" + ipb.vars['loading_img'] + "' alt='' /></div>";
|
||||
content = "<div class='general_box pad' style='height: 130px; padding-top: 130px; text-align:center'><img src='" + ipb.vars['loading_img'] + "' alt='' /></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -270,8 +309,12 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
|
||||
/* Pop up class dominates the mouseover class */
|
||||
Event.stopObserving( $( id ), 'mouseout' );
|
||||
|
||||
$( id ).observe( 'mouseout' , this.mOut.bindAsEventListener( this, id ) );
|
||||
Event.stopObserving( $( id ), 'contextmenu' );
|
||||
Event.stopObserving( $( id ), 'click' );
|
||||
|
||||
$( id ).observe( 'mouseout' , this.mOut.bindAsEventListener( this, id ) );
|
||||
$( id ).observe( 'contextmenu' , this.mContext.bindAsEventListener( this, id ) );
|
||||
$( id ).observe( 'click' , this.mClick.bindAsEventListener( this, id ) );
|
||||
|
||||
if ( this.options.ajaxUrl )
|
||||
{
|
||||
@@ -425,7 +468,7 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
|
||||
if ( $( 'pu__' + id + '_stem').className.match( /top/ ) && ( aDims['height'] != bDims['height'] ) )
|
||||
{
|
||||
var _nt = bDims['top'] - ( aDims['height'] - bDims['height'] );
|
||||
var _nt = bDims['top'] - ( aDims['height'] - bDims['height'] ) - 10;
|
||||
|
||||
$( popup ).setStyle( { 'top': _nt + 'px' } );
|
||||
}
|
||||
@@ -446,12 +489,14 @@ IPBoard.prototype.hoverCard = Class.create( {
|
||||
*/
|
||||
overPopUp: function( id )
|
||||
{
|
||||
e = this.curEvent;
|
||||
var myevent = this.curEvent;
|
||||
|
||||
if( !id ){ return; }
|
||||
|
||||
/* Moz chokes without try. */
|
||||
try
|
||||
{
|
||||
if ( Event.element(e) && Event.element(e).descendantOf( $('pu__' + this.id + '_popup') ) )
|
||||
if ( $(Event.findElement(myevent)) && $(Event.findElement(myevent)).descendantOf( $('pu__' + this.id + '_popup') ) )
|
||||
{
|
||||
this.debugWrite( "*** Over Pop Up ***" );
|
||||
|
||||
|
||||
Reference in new issue
Block a user