Mercurial > bugzilla-dashboard
diff index.html @ 92:16e98d4313e6
now lazy-loading jquery-ui and bugzilla.js.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Mon, 26 Apr 2010 18:48:58 -0700 |
parents | ee0a4597c067 |
children | 544d339d2b4c |
line wrap: on
line diff
--- a/index.html Mon Apr 26 18:44:57 2010 -0700 +++ b/index.html Mon Apr 26 18:48:58 2010 -0700 @@ -139,9 +139,7 @@ </body> <!-- Base Scripts --> <script src="js/jquery.js"></script> -<script src="js/jquery-ui.js"></script> <script src="js/require.js"></script> -<script src="js/bugzilla.js"></script> <script> $(window).ready(function() { var moduleScriptNames = [ @@ -151,16 +149,19 @@ "xhr" ]; - var moduleScripts = []; + var scripts = [ + "js/jquery-ui.js", + "js/bugzilla.js" + ]; moduleScriptNames.forEach(function(name) { - moduleScripts.push("js/modules/" + name + ".js"); + scripts.push("js/modules/" + name + ".js"); }); if (!('JSON' in window)) - moduleScripts.push("js/json2.js"); + scripts.push("js/json2.js"); - Require.preload(document, moduleScripts, function whenLoaded() { + Require.preload(document, scripts, function whenLoaded() { $("#loading-screen").hide(); $(".hide-while-loading").show();