Sort browser's widget list, so you can find widget you're looking for

This commit is contained in:
Nathan Gray 2013-05-21 20:22:51 +00:00
parent 7806f183a9
commit 08ac429774

View File

@ -56,10 +56,17 @@ widget_browser.prototype._init_list = function()
.attr('id', 'widgets') .attr('id', 'widgets')
.click(function(e) {self.select_widget(e);}) .click(function(e) {self.select_widget(e);})
.appendTo(this.list_div); .appendTo(this.list_div);
// Sort the registry
var types = [];
for(var type in et2_registry) for(var type in et2_registry)
{ {
var class_name = et2_registry[type]; types.push(type);
list.append('<li>'+type+'</li>'); }
types.sort();
for(var i = 0; i < types.length; i++)
{
list.append('<li>'+types[i]+'</li>');
} }
// Build attribute table // Build attribute table