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');
|
this.naviView.selectMenuItem('applications-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleSelectDatabase: function () {
|
||||||
|
this.naviView.handleSelectDatabase();
|
||||||
|
},
|
||||||
|
|
||||||
handleResize: function () {
|
handleResize: function () {
|
||||||
var oldWidth = $('#content').width();
|
var oldWidth = $('#content').width();
|
||||||
var containerWidth = $(window).width() - 70;
|
var containerWidth = $(window).width() - 70;
|
||||||
|
|
|
@ -157,6 +157,8 @@ window.databaseView = Backbone.View.extend({
|
||||||
this.collection.fetch({
|
this.collection.fetch({
|
||||||
success: function() {
|
success: function() {
|
||||||
self.render();
|
self.render();
|
||||||
|
window.App.handleSelectDatabase();
|
||||||
|
/*
|
||||||
var select = $("#dbSelectionList");
|
var select = $("#dbSelectionList");
|
||||||
select.empty();
|
select.empty();
|
||||||
self.collection.toJSON().forEach(function(item) {
|
self.collection.toJSON().forEach(function(item) {
|
||||||
|
@ -165,6 +167,7 @@ window.databaseView = Backbone.View.extend({
|
||||||
.text(item.name)
|
.text(item.name)
|
||||||
.attr("selected", item.name === this.currentDB));
|
.attr("selected", item.name === this.currentDB));
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.collection.fetch({
|
this.collection.fetch({
|
||||||
success: function(){
|
success: function(){
|
||||||
self.render(self.$el);
|
self.render(self.$el);
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
$('.nav-collapse').css('margin-right', margin - 10);
|
$('.nav-collapse').css('margin-right', margin - 10);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleSelectDatabase: function () {
|
||||||
|
this.dbSelectionView.render($("#selectDB"));
|
||||||
|
},
|
||||||
|
|
||||||
handleSelectNavigation: function () {
|
handleSelectNavigation: function () {
|
||||||
$("#arangoCollectionSelect").change(function() {
|
$("#arangoCollectionSelect").change(function() {
|
||||||
var navigateTo = $(this).find("option:selected").val();
|
var navigateTo = $(this).find("option:selected").val();
|
||||||
|
|
Loading…
Reference in New Issue