1
0
Fork 0

update database selector after adding/dropping databases

This commit is contained in:
Jan Steemann 2013-11-13 23:18:43 +01:00
parent 1e347a0d19
commit 9f340c10d5
1 changed files with 8 additions and 0 deletions

View File

@ -157,6 +157,14 @@ window.databaseView = Backbone.View.extend({
this.collection.fetch({
success: function() {
self.render();
var select = $("#dbSelectionList");
select.empty();
self.collection.toJSON().forEach(function(item) {
select.append($("<option></option>")
.attr("value", item.name)
.text(item.name)
.attr("selected", item.name === this.currentDB));
});
}
});
}