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

View file

@ -20,28 +20,5 @@ module.exports = function(){
xhr.headers['X-Api-Key'] = window.NzbDrone.ApiKey;
}
return original.apply(this, arguments);
/* .done(function (response, status, xhr) {
var version = xhr.getResponseHeader('X-ApplicationVersion');
if (!window.NzbDrone || !window.NzbDrone.Version) {
return;
}
if (version !== window.NzbDrone.Version) {
var vent = require('../vent');
var messenger = require('../Shared/Messenger');
if (!vent || !messenger) {
return;
}
messenger.show({
message : 'Sonarr has been updated', hideAfter : 0, id : 'droneUpdated', actions : {
viewChanges : {
label : 'View Changes', action : function () {
window.location = window.NzbDrone.UrlBase + '/system/updates';
}
}
}
});
vent.trigger(vent.Events.ServerUpdated);
}
});*/
};
};
};