Mercurial > bugzilla-dashboard
comparison 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 |
comparison
equal
deleted
inserted
replaced
91:e88fd29eee3a | 92:16e98d4313e6 |
---|---|
137 </table> | 137 </table> |
138 </div> | 138 </div> |
139 </body> | 139 </body> |
140 <!-- Base Scripts --> | 140 <!-- Base Scripts --> |
141 <script src="js/jquery.js"></script> | 141 <script src="js/jquery.js"></script> |
142 <script src="js/jquery-ui.js"></script> | |
143 <script src="js/require.js"></script> | 142 <script src="js/require.js"></script> |
144 <script src="js/bugzilla.js"></script> | |
145 <script> | 143 <script> |
146 $(window).ready(function() { | 144 $(window).ready(function() { |
147 var moduleScriptNames = [ | 145 var moduleScriptNames = [ |
148 "app", | 146 "app", |
149 "date-utils", | 147 "date-utils", |
150 "cache", | 148 "cache", |
151 "xhr" | 149 "xhr" |
152 ]; | 150 ]; |
153 | 151 |
154 var moduleScripts = []; | 152 var scripts = [ |
153 "js/jquery-ui.js", | |
154 "js/bugzilla.js" | |
155 ]; | |
155 | 156 |
156 moduleScriptNames.forEach(function(name) { | 157 moduleScriptNames.forEach(function(name) { |
157 moduleScripts.push("js/modules/" + name + ".js"); | 158 scripts.push("js/modules/" + name + ".js"); |
158 }); | 159 }); |
159 | 160 |
160 if (!('JSON' in window)) | 161 if (!('JSON' in window)) |
161 moduleScripts.push("js/json2.js"); | 162 scripts.push("js/json2.js"); |
162 | 163 |
163 Require.preload(document, moduleScripts, function whenLoaded() { | 164 Require.preload(document, scripts, function whenLoaded() { |
164 $("#loading-screen").hide(); | 165 $("#loading-screen").hide(); |
165 $(".hide-while-loading").show(); | 166 $(".hide-while-loading").show(); |
166 | 167 |
167 var moduleExports = {}; | 168 var moduleExports = {}; |
168 var require = Require.build(Require.modules, moduleExports); | 169 var require = Require.build(Require.modules, moduleExports); |