mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Added notification when appcache is updated
This commit is contained in:
@@ -47,4 +47,15 @@ angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable',
|
||||
$rootScope.$broadcast('close', e);
|
||||
};
|
||||
|
||||
if ($window.applicationCache) {
|
||||
// Listen for appcache updated event, present refresh to update view
|
||||
$window.applicationCache.addEventListener('updateready', function(e) {
|
||||
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
|
||||
// Browser downloaded a new app cache.
|
||||
$rootScope.appCacheUpdate = true;
|
||||
$rootScope.$apply();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user