FEATURE: automatically update site to latest version of assets

if a user neglects to move around the site it will prompt to do so 2 hours in
This commit is contained in:
Sam
2014-01-15 12:07:42 +11:00
parent abe814412e
commit a247389d4e
7 changed files with 35 additions and 16 deletions

View File

@ -130,6 +130,11 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
}
},
requiresRefresh: function(){
var desired = Discourse.get("desiredAssetVersion");
return desired && Discourse.get("currentAssetVersion") !== desired;
}.property("currentAssetVersion", "desiredAssetVersion"),
assetVersion: function(prop, val) {
if(val) {
if(this.get("currentAssetVersion")){