diff --git a/frontend/css/modal.css b/frontend/css/modal.css index fb1e19ea32..5ee04d8458 100644 --- a/frontend/css/modal.css +++ b/frontend/css/modal.css @@ -6,6 +6,7 @@ .modal-body .icon-info-sign { padding-bottom: 5px; margin-bottom: 10px; + margin-left: 10px; opacity: 0.7; } diff --git a/frontend/js/collections/arangoCollections.js b/frontend/js/collections/arangoCollections.js index 9872f4bd09..7a5d24d645 100644 --- a/frontend/js/collections/arangoCollections.js +++ b/frontend/js/collections/arangoCollections.js @@ -214,6 +214,11 @@ window.arangoCollections = Backbone.Collection.extend({ url: "/_api/collection/" + id + "/load", success: function () { arangoHelper.arangoNotification('Collection loaded'); + window.arangoCollectionsStore.fetch({ + success: function () { + window.collectionsView.render(); + } + }); }, error: function (data) { var temp = JSON.parse(data.responseText); @@ -228,6 +233,11 @@ window.arangoCollections = Backbone.Collection.extend({ url: "/_api/collection/" + id + "/unload", success: function () { arangoHelper.arangoNotification('Collection unloaded'); + window.arangoCollectionsStore.fetch({ + success: function () { + window.collectionsView.render(); + } + }); }, error: function () { var temp = JSON.parse(data.responseText); diff --git a/frontend/js/routers/router.js b/frontend/js/routers/router.js index c110922417..4b69810efe 100644 --- a/frontend/js/routers/router.js +++ b/frontend/js/routers/router.js @@ -20,6 +20,10 @@ $(document).ready(function() { window.arangoDocumentsStore = new window.arangoDocuments(); window.arangoDocumentStore = new window.arangoDocument(); + window.collectionView = new window.collectionView({ + model: arangoCollection + }); + window.dashboardView = new window.dashboardView({ collection: window.arangoCollectionsStore }); @@ -55,26 +59,22 @@ $(document).ready(function() { window.arangoCollectionsStore.fetch({ success: function () { - var collectionsView = new window.collectionsView({ + window.collectionsView = new window.collectionsView({ collection: window.arangoCollectionsStore }); - collectionsView.render(); + window.collectionsView.render(); naviView.selectMenuItem('collections-menu'); } }); }, collection: function(colid) { //TODO: if-statement for every view ! - if (!this.collectionView) { - this.collectionView = new window.collectionView({ - colId: colid, - model: arangoCollection - }); + if (!window.collectionView) { } else { - this.collectionView.options.colId = colid; } - this.collectionView.render(); + window.collectionView.options.colId = colid; + window.collectionView.render(); }, newCollection: function() { if (!this.newCollectionView) { diff --git a/frontend/js/templates/collectionView.ejs b/frontend/js/templates/collectionView.ejs index 0fc543283b..dd19c844ab 100644 --- a/frontend/js/templates/collectionView.ejs +++ b/frontend/js/templates/collectionView.ejs @@ -40,7 +40,7 @@