From 0c9e0e7c66c5a11f2fe1ec12ba6c33283c86dc03 Mon Sep 17 00:00:00 2001 From: hkernbach Date: Tue, 14 Jun 2016 14:36:32 +0200 Subject: [PATCH] ie + edge cache fixes --- .../_admin/aardvark/APP/frontend/js/routers/router.js | 10 +++++++++- .../aardvark/APP/frontend/js/routers/startApp.js | 5 ----- .../aardvark/APP/frontend/js/views/collectionsView.js | 2 ++ .../aardvark/APP/frontend/js/views/databaseView.js | 6 +++++- .../aardvark/APP/frontend/js/views/userBarView.js | 5 ++++- 5 files changed, 20 insertions(+), 8 deletions(-) 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 74a3b74d80..6ab033184c 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 @@ -179,7 +179,9 @@ arangoHelper.setDocumentStore(this.arangoDocumentStore); - this.arangoCollectionsStore.fetch(); + this.arangoCollectionsStore.fetch({ + cache: false + }); window.spotlightView = new window.SpotlightView({ collection: this.arangoCollectionsStore @@ -191,6 +193,7 @@ this.notificationList = new window.NotificationCollection(); this.currentDB.fetch({ + cache: false, success: function() { self.naviView = new window.NavigationView({ database: self.arangoDatabase, @@ -485,6 +488,7 @@ if (this.foxxList.length === 0) { this.foxxList.fetch({ + cache: false, success: function() { callback(); } @@ -527,6 +531,7 @@ }); } this.arangoCollectionsStore.fetch({ + cache: false, success: function () { self.collectionsView.render(); } @@ -542,6 +547,7 @@ return; } this.arangoCollectionsStore.fetch({ + cache: false, success: function () { self.indicesView = new window.IndicesView({ collectionName: colname, @@ -563,6 +569,7 @@ return; } this.arangoCollectionsStore.fetch({ + cache: false, success: function () { self.settingsView = new window.SettingsView({ collectionName: colname, @@ -585,6 +592,7 @@ } this.arangoCollectionsStore.fetch({ success: function () { + cache: false, self.infoView = new window.InfoView({ collectionName: colname, collection: self.arangoCollectionsStore.findWhere({ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/startApp.js b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/startApp.js index f2ffa3224b..0865bf0c95 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/startApp.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/startApp.js @@ -12,11 +12,6 @@ } }); - //set ajax cache globally to false. otherwise IE + EDGE will cache everything - $.ajaxSetup({ - cache: false - }); - $(document).ready(function() { window.App = new window.Router(); Backbone.history.start(); diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js index 9b6bae9f8d..cd3e4289b6 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js @@ -17,6 +17,7 @@ refetchCollections: function() { var self = this; this.collection.fetch({ + cache: false, success: function() { self.checkLockedCollections(); } @@ -164,6 +165,7 @@ updateCollectionsView: function() { var self = this; this.collection.fetch({ + cache: false, success: function() { self.render(); } diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/databaseView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/databaseView.js index 744e8e8392..3552502be4 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/databaseView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/databaseView.js @@ -48,7 +48,10 @@ }, initialize: function() { - this.collection.fetch({async: true}); + this.collection.fetch({ + async: true, + cache: false + }); }, checkBoxes: function (e) { @@ -236,6 +239,7 @@ updateDatabases: function() { var self = this; this.collection.fetch({ + cache: false, success: function() { self.render(); window.App.handleSelectDatabase(); diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/userBarView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/userBarView.js index 1bb900279a..4a62ba3dc8 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/userBarView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/userBarView.js @@ -17,7 +17,10 @@ initialize: function (options) { this.userCollection = options.userCollection; - this.userCollection.fetch({async: true}); + this.userCollection.fetch({ + cache: false, + async: true + }); this.userCollection.bind("change:extra", this.render.bind(this)); },