You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mr...@apache.org on 2017/09/11 04:38:53 UTC

[23/94] [abbrv] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
deleted file mode 100644
index e1f3f19..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*!
-loadCSS: load a CSS file asynchronously.
-[c]2015 @scottjehl, Filament Group, Inc.
-Licensed MIT
-*/
-(function(w){
-	"use strict";
-	/* exported loadCSS */
-	var loadCSS = function( href, before, media ){
-		// Arguments explained:
-		// `href` [REQUIRED] is the URL for your CSS file.
-		// `before` [OPTIONAL] is the element the script should use as a reference for injecting our stylesheet <link> before
-			// By default, loadCSS attempts to inject the link after the last stylesheet or script in the DOM. However, you might desire a more specific location in your document.
-		// `media` [OPTIONAL] is the media type or query of the stylesheet. By default it will be 'all'
-		var doc = w.document;
-		var ss = doc.createElement( "link" );
-		var newMedia = media || "all";
-		var ref;
-		if( before ){
-			ref = before;
-		}
-		else {
-			var refs = ( doc.body || doc.getElementsByTagName( "head" )[ 0 ] ).childNodes;
-			ref = refs[ refs.length - 1];
-		}
-
-		var sheets = doc.styleSheets;
-		ss.rel = "stylesheet";
-		ss.href = href;
-		// temporarily set media to something inapplicable to ensure it'll fetch without blocking render
-		ss.media = "only x";
-
-
-		// Inject link
-			// Note: the ternary preserves the existing behavior of "before" argument, but we could choose to change the argument to "after" in a later release and standardize on ref.nextSibling for all refs
-			// Note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/
-		ref.parentNode.insertBefore( ss, ( before ? ref : ref.nextSibling ) );
-		// A method (exposed on return object for external use) that mimics onload by polling until document.styleSheets until it includes the new sheet.
-		var onloadcssdefined = function( cb ){
-			var resolvedHref = ss.href;
-			var i = sheets.length;
-			while( i-- ){
-				if( sheets[ i ].href === resolvedHref ){
-					return cb();
-				}
-			}
-			setTimeout(function() {
-				onloadcssdefined( cb );
-			});
-		};
-
-		// once loaded, set link's media back to `all` so that the stylesheet applies once it loads
-		if( ss.addEventListener ){
-			ss.addEventListener( "load", function(){
-				this.media = newMedia;
-			});
-		}
-		ss.onloadcssdefined = onloadcssdefined;
-		onloadcssdefined(function() {
-			if( ss.media !== newMedia ){
-				ss.media = newMedia;
-			}
-		});
-		return ss;
-	};
-	// commonjs
-	if( typeof exports !== "undefined" ){
-		exports.loadCSS = loadCSS;
-	}
-	else {
-		w.loadCSS = loadCSS;
-	}
-}( typeof global !== "undefined" ? global : this ));