aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-07-21 15:54:14 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-08-08 00:29:37 -0400
commite6dbcd9f30351d6b27464713f5f6b962e51a3180 (patch)
tree8c3bb053b96d56926748846db3d886b7498737b4 /demos
parent37602d7e645964e4f5e4d06ef313081c8eb60bf1 (diff)
downloadjquery-ui-e6dbcd9f30351d6b27464713f5f6b962e51a3180.tar.gz
jquery-ui-e6dbcd9f30351d6b27464713f5f6b962e51a3180.zip
Demos: bootstrap needs to account for widgets folder
Ref #13885
Diffstat (limited to 'demos')
-rw-r--r--demos/bootstrap.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/demos/bootstrap.js b/demos/bootstrap.js
index f17e33230..7fed08cbb 100644
--- a/demos/bootstrap.js
+++ b/demos/bootstrap.js
@@ -24,6 +24,22 @@ var effectsAll = [
"effect-size",
"effect-slide"
];
+var widgets = [];
+
+function getPath( module ) {
+ for ( var i = 0; i < widgets.length; i++ ) {
+ if ( widgets[ i ] === module ) {
+ return "widgets/" + module;
+ }
+ }
+ return module;
+}
+function fixPaths( modules ) {
+ for ( var i = 0; i < modules.length; i++ ) {
+ modules[ i ] = getPath( modules[ i ] );
+ }
+ return modules;
+}
// Hide the page while things are loading to prevent a FOUC
document.documentElement.className = "demo-loading";
@@ -40,6 +56,7 @@ require.config( {
}
} );
+
// Replace effects all shortcut modules with all the effects modules
if ( modules && modules.indexOf( "effects-all" ) !== -1 ) {
modules = modules.replace( /effects-all/, effectsAll.join( " " ) );
@@ -47,6 +64,7 @@ if ( modules && modules.indexOf( "effects-all" ) !== -1 ) {
modules = modules ? modules.replace( /^\s+|\s+$/g, "" ).split( /\s+/ ) : [];
modules.push( pathParts[ pathParts.length - 2 ] );
+modules = fixPaths( modules );
require( modules, function() {
var newScript = document.createElement( "script" );