diff --git a/dashboard/static/js/dashboard.js b/dashboard/static/js/dashboard.js index d25ca815..60e70152 100644 --- a/dashboard/static/js/dashboard.js +++ b/dashboard/static/js/dashboard.js @@ -10,9 +10,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"]) $http.get("/events.json").then(function(response) { // Don't make anything if the page hasn't changed - if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers().etag) + if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers()["last-modified"]) return; - $scope.lasteventsetag = response.headers().etag; + $scope.lasteventsetag = response.headers()["last-modified"]; var events = response.data; @@ -72,18 +72,18 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"]) pathname = "/public0.html" var refreshScene = function() { $http.get(pathname.replace(".html", ".json")).then(function(response) { - if ($scope.lastpublicetag != undefined && $scope.lastpublicetag == response.headers().etag) + if ($scope.lastpublicetag != undefined && $scope.lastpublicetag == response.headers()["last-modified"]) return; - $scope.lastpublicetag = response.headers().etag; + $scope.lastpublicetag = response.headers()["last-modified"]; $scope.scene = response.data; }); } var refreshData = function() { $http.get("/my.json").then(function(response) { - if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers().etag) + if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers()["last-modified"]) return; - $scope.lastmyetag = response.headers().etag; + $scope.lastmyetag = response.headers()["last-modified"]; $scope.my = response.data; }); @@ -98,9 +98,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"]) $rootScope.settings = response.data; }); $http.get("/themes.json").then(function(response) { - if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers().etag) + if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers()["last-modified"]) return; - $scope.lastthemeetag = response.headers().etag; + $scope.lastthemeetag = response.headers()["last-modified"]; var themes = response.data; $scope.themes = themes; @@ -118,9 +118,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"]) }, themes); }); $http.get("/teams.json").then(function(response) { - if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers().etag) + if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers()["last-modified"]) return; - $scope.lastteametag = response.headers().etag; + $scope.lastteametag = response.headers()["last-modified"]; var teams = response.data;