X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2F3rd_party%2Fstatic%2Ftestapi-ui%2Fassets%2Flib%2Fjquery%2Fsrc%2Fajax%2Fload.js;fp=utils%2Ftest%2Ftestapi%2F3rd_party%2Fstatic%2Ftestapi-ui%2Fassets%2Flib%2Fjquery%2Fsrc%2Fajax%2Fload.js;h=0000000000000000000000000000000000000000;hb=f11f26d23dabde24b0bcd67ac81b094aa89eb6c9;hp=3ce3a5aae781c05185f272d62537c792c1006532;hpb=122cf34bf3e656e1b7fa35e07dd8a71e42ed4d59;p=releng.git diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js b/utils/test/testapi/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js deleted file mode 100644 index 3ce3a5aae..000000000 --- a/utils/test/testapi/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js +++ /dev/null @@ -1,76 +0,0 @@ -define( [ - "../core", - "../core/stripAndCollapse", - "../core/parseHTML", - "../ajax", - "../traversing", - "../manipulation", - "../selector" -], function( jQuery, stripAndCollapse ) { - -"use strict"; - -/** - * Load a url into a page - */ -jQuery.fn.load = function( url, params, callback ) { - var selector, type, response, - self = this, - off = url.indexOf( " " ); - - if ( off > -1 ) { - selector = stripAndCollapse( url.slice( off ) ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( params && typeof params === "object" ) { - type = "POST"; - } - - // If we have elements to modify, make the request - if ( self.length > 0 ) { - jQuery.ajax( { - url: url, - - // If "type" variable is undefined, then "GET" method will be used. - // Make value of this field explicit since - // user can override it through ajaxSetup method - type: type || "GET", - dataType: "html", - data: params - } ).done( function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - self.html( selector ? - - // If a selector was specified, locate the right elements in a dummy div - // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery( "
" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : - - // Otherwise use the full result - responseText ); - - // If the request succeeds, this function gets "data", "status", "jqXHR" - // but they are ignored because response was set above. - // If it fails, this function gets "jqXHR", "status", "error" - } ).always( callback && function( jqXHR, status ) { - self.each( function() { - callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); - } ); - } ); - } - - return this; -}; - -} );