From 3909e6d89e01e4cd8777377c63037896bb95aa2f Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 25 Nov 2011 21:18:19 +0100 Subject: new jq layout --- .../jquery-ui-1.9pre/tests/resource_loader.js | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/webapp/jquery-ui-1.9pre/tests/resource_loader.js (limited to 'src/main/webapp/jquery-ui-1.9pre/tests/resource_loader.js') diff --git a/src/main/webapp/jquery-ui-1.9pre/tests/resource_loader.js b/src/main/webapp/jquery-ui-1.9pre/tests/resource_loader.js new file mode 100644 index 0000000..c8dec48 --- /dev/null +++ b/src/main/webapp/jquery-ui-1.9pre/tests/resource_loader.js @@ -0,0 +1,39 @@ +(function( $ ) { + +var parts = document.location.search.slice( 1 ).split( "&" ), + length = parts.length, + i = 0, + current, + min; + +for ( ; i < length; i++ ) { + current = parts[ i ].split( "=" ); + if ( current[ 0 ] === "min" ) { + min = current[ 1 ]; + break; + } +} + +function includeStyle( url ) { + document.write( "" ); +} + +function includeScript( url ) { + document.write( "" ); +} + +window.loadResources = min ? + function() { + includeStyle( "build/dist/theme/jquery-ui.min.css" ); + includeScript( "build/dist/jquery-ui.min.js" ); + } : + function( resources ) { + $.each( resources.css || [], function( i, resource ) { + includeStyle( "themes/base/jquery." + resource + ".css" ); + }); + $.each( resources.js || [], function( i, resource ) { + includeScript( resource ); + }); + }; + +})( jQuery ); -- cgit v1.1