From 8ac6a7ef3809cb511b10494d9c1f4654db1e071e Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Thu, 1 Nov 2018 12:44:50 +0200 Subject: Dynamically fetching javascript dependencies JIRA: DOVETAIL-746 This patch deletes the source code of javascript dependencies from web portal. Furthermore, it uses npm to install them. Change-Id: Idc40606ff9e7286aa66421cbbe05f94d7ce9f7e6 Signed-off-by: Stamatis Katsaounis --- .../testapi-ui/assets/lib/jquery/src/ajax/load.js | 76 ---------------------- 1 file changed, 76 deletions(-) delete mode 100644 3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js (limited to '3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js') diff --git a/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js b/3rd_party/static/testapi-ui/assets/lib/jquery/src/ajax/load.js deleted file mode 100644 index 3ce3a5a..0000000 --- a/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; -}; - -} ); -- cgit 1.2.3-korg