Commit 97c803ac authored by Timmy Willison's avatar Timmy Willison

Ajax: move ajax event aliases to their own file

Fixes #15126
parent 3b9057a1
...@@ -39,7 +39,7 @@ module.exports = function( grunt ) { ...@@ -39,7 +39,7 @@ module.exports = function( grunt ) {
], ],
// Exclude specified modules if the module matching the key is removed // Exclude specified modules if the module matching the key is removed
removeWith: { removeWith: {
ajax: [ "manipulation/_evalUrl" ], ajax: [ "manipulation/_evalUrl", "event/ajax" ],
callbacks: [ "deferred" ], callbacks: [ "deferred" ],
css: [ "effects", "dimensions", "offset" ], css: [ "effects", "dimensions", "offset" ],
sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ] sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ]
......
...@@ -795,12 +795,5 @@ jQuery.each( [ "get", "post" ], function( i, method ) { ...@@ -795,12 +795,5 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
}; };
}); });
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
});
return jQuery; return jQuery;
}); });
define([
"../core",
"../event"
], function( jQuery ) {
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
});
});
...@@ -22,6 +22,7 @@ define([ ...@@ -22,6 +22,7 @@ define([
"./ajax/script", "./ajax/script",
"./ajax/jsonp", "./ajax/jsonp",
"./ajax/load", "./ajax/load",
"./event/ajax",
"./effects", "./effects",
"./effects/animatedSelector", "./effects/animatedSelector",
"./offset", "./offset",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment