adoption to design of sp-magic

This commit is contained in:
Samuel Philipp 2016-11-23 00:07:57 +01:00
parent bc6fa550f9
commit f65d081896
143 changed files with 13685 additions and 2590 deletions

View file

@ -5,6 +5,8 @@ define( [
"../ajax"
], function( jQuery, nonce, rquery ) {
"use strict";
var oldCallbacks = [],
rjsonp = /(=)\?(?=&|$)|\?\?/;

View file

@ -1,32 +1,25 @@
define( [
"../core",
"../core/stripAndCollapse",
"../core/parseHTML",
"../ajax",
"../traversing",
"../manipulation",
"../selector",
"../selector"
], function( jQuery, stripAndCollapse ) {
// Optional event/alias dependency
"../event/alias"
], function( jQuery ) {
// Keep a copy of the old load method
var _load = jQuery.fn.load;
"use strict";
/**
* Load a url into a page
*/
jQuery.fn.load = function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
}
var selector, type, response,
self = this,
off = url.indexOf( " " );
if ( off > -1 ) {
selector = jQuery.trim( url.slice( off ) );
selector = stripAndCollapse( url.slice( off ) );
url = url.slice( 0, off );
}

View file

@ -1,13 +0,0 @@
define( [
"../core"
], function( jQuery ) {
// Support: Android 2.3
// Workaround failure to string-cast null input
jQuery.parseJSON = function( data ) {
return JSON.parse( data + "" );
};
return jQuery.parseJSON;
} );

View file

@ -2,6 +2,8 @@ define( [
"../core"
], function( jQuery ) {
"use strict";
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
var xml;
@ -9,7 +11,8 @@ jQuery.parseXML = function( data ) {
return null;
}
// Support: IE9
// Support: IE 9 - 11 only
// IE throws on parseFromString with invalid input.
try {
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
} catch ( e ) {

View file

@ -4,6 +4,15 @@ define( [
"../ajax"
], function( jQuery, document ) {
"use strict";
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
if ( s.crossDomain ) {
s.contents.script = false;
}
} );
// Install script dataType
jQuery.ajaxSetup( {
accepts: {

View file

@ -1,3 +1,5 @@
define( function() {
"use strict";
return window.location;
} );

View file

@ -1,5 +1,7 @@
define( [
"../../core"
], function( jQuery ) {
"use strict";
return jQuery.now();
} );

View file

@ -1,3 +1,5 @@
define( function() {
"use strict";
return ( /\?/ );
} );

View file

@ -4,6 +4,8 @@ define( [
"../ajax"
], function( jQuery, support ) {
"use strict";
jQuery.ajaxSettings.xhr = function() {
try {
return new window.XMLHttpRequest();
@ -15,7 +17,7 @@ var xhrSuccessStatus = {
// File protocol always yields status code 0, assume 200
0: 200,
// Support: IE9
// Support: IE <=9 only
// #1450: sometimes IE returns 1223 when it should be 204
1223: 204
},
@ -79,7 +81,7 @@ jQuery.ajaxTransport( function( options ) {
xhr.abort();
} else if ( type === "error" ) {
// Support: IE9
// Support: IE <=9 only
// On a manual native abort, IE9 throws
// errors on any property access that is not readyState
if ( typeof xhr.status !== "number" ) {
@ -97,7 +99,7 @@ jQuery.ajaxTransport( function( options ) {
xhrSuccessStatus[ xhr.status ] || xhr.status,
xhr.statusText,
// Support: IE9 only
// Support: IE <=9 only
// IE9 has no XHR2 but throws on binary (trac-11426)
// For XHR2 non-text, let the caller handle it (gh-2498)
( xhr.responseType || "text" ) !== "text" ||
@ -115,7 +117,7 @@ jQuery.ajaxTransport( function( options ) {
xhr.onload = callback();
errorCallback = xhr.onerror = callback( "error" );
// Support: IE9
// Support: IE 9 only
// Use onreadystatechange to replace onabort
// to handle uncaught aborts
if ( xhr.onabort !== undefined ) {