Skip to content

Commit

Permalink
new updater: windows OK. update version info
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsito committed Oct 14, 2015
1 parent 1b23228 commit 601d4a3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 237 deletions.
4 changes: 2 additions & 2 deletions agility/server/auth/system.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ program_name = "AgilityContest"
author = "Juan Antonio Martinez"
email = "[email protected]"
license = "GPL"
version_name = "2.1.1"
version_date = "20151014_1336"
version_name = "2.1.2"
version_date = "20151014_1417"
database_name = "agility"
database_host = "localhost"
database_user = "agility_operator"
Expand Down
32 changes: 23 additions & 9 deletions agility/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ public function doUpgrade() {
<head>
<title>Actualizador de AgilityContest</title>
<style>
.waiting {
cursor: progress;
}
textarea {
-moz-box-sizing:border-box;
box-sizing:border-box;
Expand Down Expand Up @@ -325,10 +329,6 @@ public function doUpgrade() {
});
};
function restart() {
window.location="https://localhost/agility/console";
}
function fireUpdater() {
var txarea=$("#progress");
txarea.blur();
Expand All @@ -342,23 +342,37 @@ function fireUpdater() {
success: function(data) {
var done=false;
for(var n=0 ; n<data.length; n++) {
var a=data[n];
txarea.val(txarea.val()+"\\n"+a);
var a=data[n].trim();
if (a!=="") txarea.val(txarea.val()+"\\n"+a);
if (a.indexOf("DONE")==0) done=true;
if (a.indexOf("FATAL")==0) done=true;
}
if (!done) setTimeout(fireUpdater,500); // call myself in 0.5 second
else $("#doneBtn").css("display","inline");
if (!done) {
setTimeout(fireUpdater,500); // call myself in 0.5 second
} else {
txarea.removeClass("waiting");
$("#doneBtn").css("display","inline");
}
txarea.putCursorAtEnd();
},
error: function(XMLHttpRequest,textStatus,errorThrown) {
alert("Error: "+textStatus + " "+ errorThrown );
}
});
}
function start() {
$("#progress").addClass("waiting");
fireUpdater();
}
function restart() {
window.location="https://localhost/agility/console";
}
</script>
</head>
<body onload="fireUpdater();">
<body onload="start();">
<h2>Updating AgilityContest...</h2>
<h3>New version: '.$up->getVersionName().' - '.$up->getVersionDate().' </h3>
<form id="updater" name="updater" action="/agility/console">
Expand Down
226 changes: 0 additions & 226 deletions agility/upgrade.php.orig

This file was deleted.

0 comments on commit 601d4a3

Please sign in to comment.