Added back version check on ajaxSuccess

This commit is contained in:
Keivan Beigi
2015-02-07 10:25:38 -08:00
parent 8f8fe99a16
commit 8d03850de7
6 changed files with 42 additions and 25 deletions
+13
View File
@@ -0,0 +1,13 @@
var $ = require('jquery');
var vent = require('vent');
$(document).ajaxSuccess(function(event, xhr){
var version = xhr.getResponseHeader('X-ApplicationVersion');
if(!version || !window.NzbDrone || !window.NzbDrone.Version) {
return;
}
if(version !== window.NzbDrone.Version) {
vent.trigger(vent.Events.ServerUpdated);
}
});