mirror of https://gitee.com/bigwinds/arangodb
show/hide database selector depending on number of dbs available
This commit is contained in:
parent
9f340c10d5
commit
922e4f35bf
|
@ -346,6 +346,10 @@ $(document).ready(function() {
|
|||
this.naviView.selectMenuItem('applications-menu');
|
||||
},
|
||||
|
||||
handleSelectDatabase: function () {
|
||||
this.naviView.handleSelectDatabase();
|
||||
},
|
||||
|
||||
handleResize: function () {
|
||||
var oldWidth = $('#content').width();
|
||||
var containerWidth = $(window).width() - 70;
|
||||
|
|
|
@ -157,6 +157,8 @@ window.databaseView = Backbone.View.extend({
|
|||
this.collection.fetch({
|
||||
success: function() {
|
||||
self.render();
|
||||
window.App.handleSelectDatabase();
|
||||
/*
|
||||
var select = $("#dbSelectionList");
|
||||
select.empty();
|
||||
self.collection.toJSON().forEach(function(item) {
|
||||
|
@ -165,6 +167,7 @@ window.databaseView = Backbone.View.extend({
|
|||
.text(item.name)
|
||||
.attr("selected", item.name === this.currentDB));
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
},
|
||||
|
||||
initialize: function() {
|
||||
var self = this;
|
||||
var self = this;
|
||||
this.collection.fetch({
|
||||
success: function(){
|
||||
self.render(self.$el);
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
$('.nav-collapse').css('margin-right', margin - 10);
|
||||
},
|
||||
|
||||
handleSelectDatabase: function () {
|
||||
this.dbSelectionView.render($("#selectDB"));
|
||||
},
|
||||
|
||||
handleSelectNavigation: function () {
|
||||
$("#arangoCollectionSelect").change(function() {
|
||||
var navigateTo = $(this).find("option:selected").val();
|
||||
|
|
Loading…
Reference in New Issue