mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
parent
37602d7e64
commit
e6dbcd9f30
18
demos/bootstrap.js
vendored
18
demos/bootstrap.js
vendored
@ -24,6 +24,22 @@ var effectsAll = [
|
|||||||
"effect-size",
|
"effect-size",
|
||||||
"effect-slide"
|
"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
|
// Hide the page while things are loading to prevent a FOUC
|
||||||
document.documentElement.className = "demo-loading";
|
document.documentElement.className = "demo-loading";
|
||||||
@ -40,6 +56,7 @@ require.config( {
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
// Replace effects all shortcut modules with all the effects modules
|
// Replace effects all shortcut modules with all the effects modules
|
||||||
if ( modules && modules.indexOf( "effects-all" ) !== -1 ) {
|
if ( modules && modules.indexOf( "effects-all" ) !== -1 ) {
|
||||||
modules = modules.replace( /effects-all/, effectsAll.join( " " ) );
|
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 = modules ? modules.replace( /^\s+|\s+$/g, "" ).split( /\s+/ ) : [];
|
||||||
modules.push( pathParts[ pathParts.length - 2 ] );
|
modules.push( pathParts[ pathParts.length - 2 ] );
|
||||||
|
modules = fixPaths( modules );
|
||||||
|
|
||||||
require( modules, function() {
|
require( modules, function() {
|
||||||
var newScript = document.createElement( "script" );
|
var newScript = document.createElement( "script" );
|
||||||
|
Loading…
Reference in New Issue
Block a user