mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 12:54:41 +00:00
remove base url juggling in favore of .js convention provided by requirejs
This commit is contained in:
parent
dc203029a3
commit
5158cbf4ce
10 changed files with 20 additions and 22 deletions
|
|
@ -4,22 +4,20 @@
|
|||
|
||||
(function( $ ) {
|
||||
$.testHelper = {
|
||||
// synchronously loads sets of asynchronous dependencies
|
||||
// This function takes sets of files to load asynchronously. Each set will be loaded after
|
||||
// the previous set has completed loading. That is, each require and it's dependencies in a
|
||||
// set will be loaded asynchronously, but each set will be run in serial.
|
||||
asyncLoad: function( seq ) {
|
||||
require({
|
||||
baseUrl: "../../../js"
|
||||
});
|
||||
|
||||
function loadSeq( seq, i ){
|
||||
if( !seq[i] ){
|
||||
QUnit.start();
|
||||
return;
|
||||
}
|
||||
|
||||
// if the file has a dot in the name its most likely a lib file
|
||||
// so we should grab it from the js directory. This could be regarded
|
||||
// as overeager convention ... don't care its a test helper and the
|
||||
// failure will be obvious if it happens (eg "can't load this file")
|
||||
require({
|
||||
baseUrl: (seq[i][0].indexOf(".") > -1) ? "../../../js" : location.pathname
|
||||
});
|
||||
|
||||
require( seq[i], function() {
|
||||
loadSeq(seq, i + 1);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"button_core"
|
||||
"button_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"buttonMarkup_core"
|
||||
"buttonMarkup_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"checkboxradio_core"
|
||||
"checkboxradio_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"collapsible_core"
|
||||
"collapsible_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"controlgroup_core"
|
||||
"controlgroup_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"core",
|
||||
"core_scroll"
|
||||
"core.js",
|
||||
"core_scroll.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"degradeInputs"
|
||||
"degradeInputs.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"dialog_events"
|
||||
"dialog_events.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
],
|
||||
[ "jquery.mobile.init" ],
|
||||
[
|
||||
"select_events",
|
||||
"select_native",
|
||||
"select_cached",
|
||||
"select_core"
|
||||
"select_events.js",
|
||||
"select_native.js",
|
||||
"select_cached.js",
|
||||
"select_core.js"
|
||||
]
|
||||
]);
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue