Sort dropdown

This commit is contained in:
vita10gy 2013-04-13 14:03:59 -05:00
parent ef915aaaa2
commit 83f6d853e0

View File

@ -26,7 +26,9 @@ window.portalHighlighterControl = function() {
} }
$("#portal_highlight_select").html(''); $("#portal_highlight_select").html('');
$("#portal_highlight_select").append($("<option>").attr('value',_no_highlighter).text(_no_highlighter)); $("#portal_highlight_select").append($("<option>").attr('value',_no_highlighter).text(_no_highlighter));
$.each(_highlighters, function(name, callback) { var h_names = Object.keys(_highlighters).sort();
$.each(h_names, function(i, name) {
$("#portal_highlight_select").append($("<option>").attr('value',name).text(name)); $("#portal_highlight_select").append($("<option>").attr('value',name).text(name));
}); });
$("#portal_highlight_select").val(_current_highlighter); $("#portal_highlight_select").val(_current_highlighter);