aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/bootstrap.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/demos/bootstrap.js b/demos/bootstrap.js
index b96620d6a..7a942374d 100644
--- a/demos/bootstrap.js
+++ b/demos/bootstrap.js
@@ -7,6 +7,7 @@ var script = scripts[ scripts.length - 1 ];
// Read the modules
var modules = script.getAttribute( "data-modules" );
+var composite = script.getAttribute( "data-composite" ) || false;
var pathParts = window.location.pathname.split( "/" );
var effectsAll = [
"effects/effect-blind",
@@ -22,7 +23,8 @@ var effectsAll = [
"effects/effect-scale",
"effects/effect-shake",
"effects/effect-size",
- "effects/effect-slide"
+ "effects/effect-slide",
+ "effects/effect-transfer"
];
var widgets = [
"accordion",
@@ -52,8 +54,13 @@ function getPath( module ) {
}
}
for ( var j = 0; j < effectsAll.length; j++ ) {
- if ( module !== "effect" && effectsAll[ j ].indexOf( module ) !== -1 ) {
- return "effects/" + module;
+ if ( module !== "effect" ) {
+ if ( effectsAll[ j ] === module ) {
+ return module;
+ }
+ if ( effectsAll[ j ].indexOf( module ) !== -1 ) {
+ return "effects/" + module;
+ }
}
}
return module;
@@ -69,7 +76,7 @@ function fixPaths( modules ) {
document.documentElement.className = "demo-loading";
require.config( {
- baseUrl: "../../ui",
+ baseUrl: window.location.pathname.indexOf( "demos/" ) !== -1 ? "../../ui" : "../../../ui",
paths: {
jquery: "../external/jquery/jquery",
external: "../external/"
@@ -86,7 +93,9 @@ if ( modules && modules.indexOf( "effects-all" ) !== -1 ) {
}
modules = modules ? modules.replace( /^\s+|\s+$/g, "" ).split( /\s+/ ) : [];
-modules.push( pathParts[ pathParts.length - 2 ] );
+if ( !composite ) {
+ modules.push( pathParts[ pathParts.length - 2 ] );
+}
modules = fixPaths( modules );
require( modules, function() {