bootstrapJs.htmli 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <script src="../yui-3.5.1/build/yui/yui-min.js"></script>
  2. <script type="text/javascript">
  3. /* Loads the next file from the global jsFilesToLoad array (destroying it
  4. * in the process).
  5. */
  6. function loadNextJsFile() {
  7. if( jsFilesToLoad.length > 0 ) {
  8. var dynamicJsScript = document.createElement("script");
  9. dynamicJsScript.type = "text/javascript";
  10. dynamicJsScript.src = jsFilesToLoad.shift();
  11. globalYui.log('Loading ' + dynamicJsScript.src);
  12. dynamicJsScript.onload = loadNextJsFile;
  13. document.getElementsByTagName("head")[0].appendChild(dynamicJsScript);
  14. }
  15. }
  16. var globalYuiLoaderOptions = {
  17. combine: true,
  18. comboBase: '../yuiCombinator.php?',
  19. root: 'yui-3.5.1/build/'
  20. };
  21. var globalYui = YUI( globalYuiLoaderOptions ).use(
  22. "node", "io", "dump", "json", "panel", "event", "arraysort",
  23. "array-extras", "datasource", "datasource-io", "datasource-jsonschema",
  24. "datasource-polling", "stylesheet", "dd-drop", "dd-constrain",
  25. "dd-proxy", "transition", function (Y) {
  26. /* Kick off the sequential loading. */
  27. loadNextJsFile();
  28. });
  29. </script>