diff --git a/CHANGELOG b/CHANGELOG index 7c537ff403..369a703ca0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,10 @@ devel * fixed issue #2450 +* fixed issue #2448 + +* fixed issue #2442 + * added 'x-content-type-options: nosniff' to avoid MSIE bug * set default value for `--ssl.protocol` from TLSv1 to TLSv1.2. diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js index a0eea3fcdf..92b3fcd1f0 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js @@ -608,13 +608,14 @@ this.waitForInit(this.documents.bind(this), colid, pageid); return; } - if (!this.documentsView) { - this.documentsView = new window.DocumentsView({ - collection: new window.ArangoDocuments(), - documentStore: this.arangoDocumentStore, - collectionsStore: this.arangoCollectionsStore - }); + if (this.documentsView) { + this.documentsView.removeView(); } + this.documentsView = new window.DocumentsView({ + collection: new window.ArangoDocuments(), + documentStore: this.arangoDocumentStore, + collectionsStore: this.arangoCollectionsStore + }); this.documentsView.setCollectionId(colid, pageid); this.documentsView.render(); }, diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js index aeaab9f243..ffb700af0f 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js @@ -30,6 +30,14 @@ next: null }, + removeView: function () { + this.$el.empty().off(); /* off to unbind the events */ + this.stopListening(); + this.unbind(); + delete this.el; + return this; + }, + editButtons: ['#deleteSelected', '#moveSelected'], initialize: function (options) {