Cleanup the perf and test ui files.

This commit is contained in:
John-David Dalton
2014-01-22 23:04:10 -08:00
parent d96bfd21b7
commit afb3806326
2 changed files with 67 additions and 68 deletions

View File

@@ -87,9 +87,6 @@
otherList = span2.lastChild, otherList = span2.lastChild,
toolbar = document.getElementById('perf-toolbar'); toolbar = document.getElementById('perf-toolbar');
toolbar.appendChild(span2);
toolbar.appendChild(span1);
buildList.selectedIndex = (function() { buildList.selectedIndex = (function() {
switch (build) { switch (build) {
case 'lodash-compat': return 0; case 'lodash-compat': return 0;
@@ -120,6 +117,9 @@
return -1; return -1;
}()); }());
toolbar.appendChild(span2);
toolbar.appendChild(span1);
addListener(buildList, 'change', eventHandler); addListener(buildList, 'change', eventHandler);
addListener(otherList, 'change', eventHandler); addListener(otherList, 'change', eventHandler);
}); });

View File

@@ -55,45 +55,10 @@
function init() { function init() {
var toolbar = document.getElementById('qunit-testrunner-toolbar'); var toolbar = document.getElementById('qunit-testrunner-toolbar');
if (toolbar) { if (!toolbar) {
toolbar.appendChild(span1);
toolbar.appendChild(span2);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 1;
case 'lodash-modern-dev': return 2;
case 'lodash-modern': return 3;
case 'lodash-legacy': return 4;
case 'lodash-mobile': return 5;
case 'lodash-underscore': return 6;
case 'lodash-custom-dev': return 7;
case 'lodash-custom': return 8;
case 'lodash-compat-dev':
case null: return 0;
}
return -1;
}());
loaderList.selectedIndex = (function() {
switch (loader) {
case 'curl': return 1;
case 'dojo': return 2;
case 'requirejs': return 3;
case 'none':
case null: return 0;
}
return -1;
}());
addListener(buildList, 'change', eventHandler);
addListener(loaderList, 'change', eventHandler);
}
else {
setTimeout(init, 15); setTimeout(init, 15);
return;
} }
}
var span1 = document.createElement('span'); var span1 = document.createElement('span');
span1.style.cssText = 'float:right'; span1.style.cssText = 'float:right';
span1.innerHTML = span1.innerHTML =
@@ -124,6 +89,40 @@
var buildList = span1.lastChild, var buildList = span1.lastChild,
loaderList = span2.lastChild; loaderList = span2.lastChild;
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 1;
case 'lodash-modern-dev': return 2;
case 'lodash-modern': return 3;
case 'lodash-legacy': return 4;
case 'lodash-mobile': return 5;
case 'lodash-underscore': return 6;
case 'lodash-custom-dev': return 7;
case 'lodash-custom': return 8;
case 'lodash-compat-dev':
case null: return 0;
}
return -1;
}());
loaderList.selectedIndex = (function() {
switch (loader) {
case 'curl': return 1;
case 'dojo': return 2;
case 'requirejs': return 3;
case 'none':
case null: return 0;
}
return -1;
}());
toolbar.appendChild(span1);
toolbar.appendChild(span2);
addListener(buildList, 'change', eventHandler);
addListener(loaderList, 'change', eventHandler);
}
init(); init();
}); });