prettified settings menu

This commit is contained in:
Matthew Kastor 2013-03-31 22:23:37 -04:00 committed by nightwing
commit cc4d524a8a

View file

@ -188,7 +188,7 @@ define(function(require, exports, module) {
*/
function wrapElements() {
var topmenu = document.createElement('div');
topmenu.id = 'settingsmenu';
topmenu.setAttribute('id', 'settingsmenu');
elements.forEach(function (element) {
topmenu.appendChild(element);
});
@ -218,9 +218,10 @@ define(function(require, exports, module) {
var div = document.createElement('div');
div.setAttribute('contains', item);
div.setAttribute('class', 'menuEntry');
div.setAttribute('style', 'clear: both;');
div.appendChild(egen.createLabel(item, item));
if(Array.isArray(val)) {
el = egen.createSelection(item, val, clss);
el.addEventListener('change', function (e) {
@ -265,6 +266,7 @@ define(function(require, exports, module) {
}
});
}
el.style.cssText = 'float:right;';
div.appendChild(el);
return div;
}
@ -355,7 +357,7 @@ define(function(require, exports, module) {
cleanupElementsList();
// dump the entries from the elements list and wrap them up in a div
// then put the div into the generic menu and show it.
overlayPage(wrapElements(), '0', '0', '0', null);
overlayPage(wrapElements(), '0', '0', '0', '75%');
}
/**
* This builds the settings menu and selects