Skip to content
Permalink
Browse files

Fix whitespace in event.js

  • Loading branch information...
csnover committed Dec 26, 2010
1 parent 52b1709 commit a939ade9c6d2b42be24031d902c86ec52847c0cc
Showing with 26 additions and 26 deletions.
  1. +26 −26 src/event.js
@@ -63,7 +63,7 @@ jQuery.event = {
var eventKey = elem.nodeType ? "events" : "__events__",
events = elemData[ eventKey ],
eventHandle = elemData.handle;

if ( typeof events === "function" ) {
// On plain objects events is a fn that holds the the data
// which prevents this data from being JSON serialized
@@ -143,9 +143,9 @@ jQuery.event = {
}
}
}
if ( special.add ) {
special.add.call( elem, handleObj );

if ( special.add ) {
special.add.call( elem, handleObj );

if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
@@ -184,7 +184,7 @@ jQuery.event = {
if ( !elemData || !events ) {
return;
}

if ( typeof events === "function" ) {
elemData = events;
events = events.events;
@@ -222,7 +222,7 @@ jQuery.event = {
namespaces = type.split(".");
type = namespaces.shift();

namespace = new RegExp("(^|\\.)" +
namespace = new RegExp("(^|\\.)" +
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
}

@@ -384,7 +384,7 @@ jQuery.event = {
isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
special = jQuery.event.special[ targetType ] || {};

if ( (!special._default || special._default.call( elem, event ) === false) &&
if ( (!special._default || special._default.call( elem, event ) === false) &&
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {

try {
@@ -454,7 +454,7 @@ jQuery.event = {
event.handler = handleObj.handler;
event.data = handleObj.data;
event.handleObj = handleObj;

var ret = handleObj.handler.apply( this, args );

if ( ret !== undefined ) {
@@ -553,7 +553,7 @@ jQuery.event = {
add: function( handleObj ) {
jQuery.event.add( this,
liveConvert( handleObj.origType, handleObj.selector ),
jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
},

remove: function( handleObj ) {
@@ -583,7 +583,7 @@ jQuery.removeEvent = document.removeEventListener ?
if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle, false );
}
} :
} :
function( elem, type, handle ) {
if ( elem.detachEvent ) {
elem.detachEvent( "on" + type, handle );
@@ -630,7 +630,7 @@ jQuery.Event.prototype = {
if ( !e ) {
return;
}

// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
@@ -726,7 +726,7 @@ if ( !jQuery.support.submitBubbles ) {
return trigger( "submit", this, arguments );
}
});

jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
var elem = e.target,
type = elem.type;
@@ -788,7 +788,7 @@ if ( !jQuery.support.changeBubbles ) {
if ( e.type !== "focusout" || elem.type !== "radio" ) {
jQuery.data( elem, "_change_data", val );
}

if ( data === undefined || val === data ) {
return;
}
@@ -802,7 +802,7 @@ if ( !jQuery.support.changeBubbles ) {

jQuery.event.special.change = {
filters: {
focusout: testChange,
focusout: testChange,

beforedeactivate: testChange,

@@ -873,15 +873,15 @@ if ( document.addEventListener ) {
if ( focusCounts[fix]++ === 0 ) {
document.addEventListener( orig, handler, true );
}
},
teardown: function() {
},
teardown: function() {
if ( --focusCounts[fix] === 0 ) {
document.removeEventListener( orig, handler, true );
}
}
};

function handler( e ) {
function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
return jQuery.event.trigger( e, null, e.target );
@@ -898,7 +898,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
}
return this;
}

if ( jQuery.isFunction( data ) || data === false ) {
fn = data;
data = undefined;
@@ -938,20 +938,20 @@ jQuery.fn.extend({

return this;
},

delegate: function( selector, types, data, fn ) {
return this.live( types, data, fn, selector );
},

undelegate: function( selector, types, fn ) {
if ( arguments.length === 0 ) {
return this.unbind( "live" );

} else {
return this.die( types, null, fn, selector );
}
},

trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
@@ -1008,12 +1008,12 @@ jQuery.each(["live", "die"], function( i, name ) {
var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );

if ( typeof types === "object" && !types.preventDefault ) {
for ( var key in types ) {
context[ name ]( key, data, types[key], selector );
}

return this;
}

@@ -1060,7 +1060,7 @@ jQuery.each(["live", "die"], function( i, name ) {
context.unbind( "live." + liveConvert( type, selector ), fn );
}
}

return this;
};
});
@@ -1079,7 +1079,7 @@ function liveHandler( event ) {
if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
return;
}

if ( event.namespace ) {
namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
}

0 comments on commit a939ade

Please sign in to comment.
You can’t perform that action at this time.