syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject syncope git commit: [SYNCOPE-836] user can log in and out without cleaning cache - this closes #16
Date Thu, 05 May 2016 14:57:44 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 9e9bda9f0 -> 1bebcdad6


[SYNCOPE-836] user can log in and out without cleaning cache - this closes #16


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1bebcdad
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1bebcdad
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1bebcdad

Branch: refs/heads/master
Commit: 1bebcdad67bc84099da101957aae1cd978b1db8f
Parents: 9e9bda9
Author: Matteo Di Carlo <matteo.dicarlo@tirasa.net>
Authored: Thu May 5 16:36:46 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Thu May 5 16:58:22 2016 +0200

----------------------------------------------------------------------
 .../src/main/resources/META-INF/resources/app/js/app.js        | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1bebcdad/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
index b6ab431..69ea8f4 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
@@ -217,7 +217,10 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider',
           //if the url is an html, we're changing page
           if (config.url.indexOf('.html', config.url.length - 5) == -1) {
             $rootScope.$broadcast("xhrStarted");
+            var separator = config.url.indexOf('?') === -1 ? '?' : '&';
+            config.url = config.url + separator + 'noCache=' + new Date().getTime();
           }
+
           $rootScope.spinner.on();
           return config || $q.when(config);
         },
@@ -429,5 +432,8 @@ app.controller('ApplicationController', ['$scope', '$rootScope', 'InfoService',
         "resources": {url: "/resources", templateUrl: "views/user-resources.html"},
         "finish": {url: "/finish", templateUrl: "views/user-form-finish.html"}
       };
+      $scope.clearCache = function () {
+        $templateCache.removeAll();
+      }
     }
   }]);


Mime
View raw message