aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/css.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-07-15 09:40:38 -0400
committerScott González <scott.gonzalez@gmail.com>2015-07-15 09:40:38 -0400
commit71d8f16ad4bc60d8946cf73f4b0c0bc99840e6ab (patch)
treea48489064648b2cbb59772d8a62f4fb66496ed4f /tests/lib/css.js
parenta3df6dd8a8e363a276392acd7744f7db1e75eb61 (diff)
parentde4984da244289c259e8fc8d1106898908b6ffce (diff)
downloadjquery-ui-71d8f16ad4bc60d8946cf73f4b0c0bc99840e6ab.tar.gz
jquery-ui-71d8f16ad4bc60d8946cf73f4b0c0bc99840e6ab.zip
Merge branch 'master' into datepicker
Diffstat (limited to 'tests/lib/css.js')
-rw-r--r--tests/lib/css.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lib/css.js b/tests/lib/css.js
new file mode 100644
index 000000000..37353e912
--- /dev/null
+++ b/tests/lib/css.js
@@ -0,0 +1,23 @@
+(function() {
+
+function includeStyle( url ) {
+ document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
+}
+
+// Find the script element
+var scripts = document.getElementsByTagName( "script" );
+var script = scripts[ scripts.length - 1 ];
+
+// Load the modules
+var modules = script.getAttribute( "data-modules" );
+if ( modules ) {
+ modules = modules.split( /\s+/ );
+ for ( var i = 0; i < modules.length; i++ ) {
+ includeStyle( "themes/base/" + modules[ i ] + ".css" );
+ }
+}
+
+// Load the QUnit stylesheet
+includeStyle( "external/qunit/qunit.css" );
+
+} )();