Skip to content

Commit 601d4a3

Browse files
committed
new updater: windows OK. update version info
1 parent 1b23228 commit 601d4a3

File tree

3 files changed

+25
-237
lines changed

3 files changed

+25
-237
lines changed

agility/server/auth/system.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ program_name = "AgilityContest"
33
author = "Juan Antonio Martinez"
44
email = "juansgaviota@gmail.com"
55
license = "GPL"
6-
version_name = "2.1.1"
7-
version_date = "20151014_1336"
6+
version_name = "2.1.2"
7+
version_date = "20151014_1417"
88
database_name = "agility"
99
database_host = "localhost"
1010
database_user = "agility_operator"

agility/upgrade.php

+23-9
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ public function doUpgrade() {
290290
<head>
291291
<title>Actualizador de AgilityContest</title>
292292
<style>
293+
.waiting {
294+
cursor: progress;
295+
}
296+
293297
textarea {
294298
-moz-box-sizing:border-box;
295299
box-sizing:border-box;
@@ -325,10 +329,6 @@ public function doUpgrade() {
325329
});
326330
};
327331
328-
function restart() {
329-
window.location="https://localhost/agility/console";
330-
}
331-
332332
function fireUpdater() {
333333
var txarea=$("#progress");
334334
txarea.blur();
@@ -342,23 +342,37 @@ function fireUpdater() {
342342
success: function(data) {
343343
var done=false;
344344
for(var n=0 ; n<data.length; n++) {
345-
var a=data[n];
346-
txarea.val(txarea.val()+"\\n"+a);
345+
var a=data[n].trim();
346+
if (a!=="") txarea.val(txarea.val()+"\\n"+a);
347347
if (a.indexOf("DONE")==0) done=true;
348348
if (a.indexOf("FATAL")==0) done=true;
349349
}
350-
if (!done) setTimeout(fireUpdater,500); // call myself in 0.5 second
351-
else $("#doneBtn").css("display","inline");
350+
if (!done) {
351+
setTimeout(fireUpdater,500); // call myself in 0.5 second
352+
} else {
353+
txarea.removeClass("waiting");
354+
$("#doneBtn").css("display","inline");
355+
}
352356
txarea.putCursorAtEnd();
353357
},
354358
error: function(XMLHttpRequest,textStatus,errorThrown) {
355359
alert("Error: "+textStatus + " "+ errorThrown );
356360
}
357361
});
358362
}
363+
364+
function start() {
365+
$("#progress").addClass("waiting");
366+
fireUpdater();
367+
}
368+
369+
function restart() {
370+
window.location="https://localhost/agility/console";
371+
}
372+
359373
</script>
360374
</head>
361-
<body onload="fireUpdater();">
375+
<body onload="start();">
362376
<h2>Updating AgilityContest...</h2>
363377
<h3>New version: '.$up->getVersionName().' - '.$up->getVersionDate().' </h3>
364378
<form id="updater" name="updater" action="/agility/console">

agility/upgrade.php.orig

-226
This file was deleted.

0 commit comments

Comments
 (0)