Fixed issue with loading update page when there is no update available.

pull/4/head
Mark McDowall 13 years ago
parent 9d47d8677d
commit 917ae0f999

@ -11,6 +11,7 @@ else
<h2>
Available Update: @Model.UpdatePackage.Version
@Ajax.ActionLink("Update", "StartUpdate", "Update", new AjaxOptions{ OnSuccess = "updateStarted" })
@Html.HiddenFor(m => m.UpdatePackage.Version)
</h2>
}
@if (Model.LogFiles.Count != 0)
@ -32,6 +33,7 @@ else
{
<script type="text/javascript">
function updateStarted() {
var expectedVersion = $('#UpdatePackage_Version').val();
var errors = 0;
//Pool the server every 5 seconds for a change in state
@ -47,7 +49,7 @@ else
if (errors > 0) {
//Kill the timer, redirect
$.doTimeout('updateStarted');
window.location = '/Update/Post?expectedVersion=@Model.UpdatePackage.Version';
window.location = '/Update/Post?expectedVersion=' + expectedVersion;
}
}
});

Loading…
Cancel
Save