From 58b91dd3baaaf72ab65062a4804403cd4a5935b2 Mon Sep 17 00:00:00 2001 From: xudan Date: Thu, 5 Jul 2018 22:37:35 -0400 Subject: Move OVP web portal code to a separate repo The new repo for web portal is https://gerrit.opnfv.org/gerrit/dovetail-webportal JIRA: DOVETAIL-671 Change-Id: Iac085abc3d175b9a091d70d0448af56c7a6845e9 Signed-off-by: xudan --- .../testapi-ui/assets/lib/jquery/src/ajax/jsonp.js | 102 --------------------- 1 file changed, 102 deletions(-) delete mode 100644 cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/jsonp.js (limited to 'cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/jsonp.js') diff --git a/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/jsonp.js b/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/jsonp.js deleted file mode 100644 index 8c406e72..00000000 --- a/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/jsonp.js +++ /dev/null @@ -1,102 +0,0 @@ -define( [ - "../core", - "./var/nonce", - "./var/rquery", - "../ajax" -], function( jQuery, nonce, rquery ) { - -"use strict"; - -var oldCallbacks = [], - rjsonp = /(=)\?(?=&|$)|\?\?/; - -// Default jsonp settings -jQuery.ajaxSetup( { - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -} ); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? - "url" : - typeof s.data === "string" && - ( s.contentType || "" ) - .indexOf( "application/x-www-form-urlencoded" ) === 0 && - rjsonp.test( s.data ) && "data" - ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - - // Insert callback into url or form data - if ( jsonProp ) { - s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); - } else if ( s.jsonp !== false ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters[ "script json" ] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // Force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - overwritten = window[ callbackName ]; - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always( function() { - - // If previous value didn't exist - remove it - if ( overwritten === undefined ) { - jQuery( window ).removeProp( callbackName ); - - // Otherwise restore preexisting value - } else { - window[ callbackName ] = overwritten; - } - - // Save back as free - if ( s[ callbackName ] ) { - - // Make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // Save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - } ); - - // Delegate to script - return "script"; - } -} ); - -} ); -- cgit 1.2.3-korg