@@ -290,6 +290,10 @@ public function doUpgrade() {
290
290
<head>
291
291
<title>Actualizador de AgilityContest</title>
292
292
<style>
293
+ .waiting {
294
+ cursor: progress;
295
+ }
296
+
293
297
textarea {
294
298
-moz-box-sizing:border-box;
295
299
box-sizing:border-box;
@@ -325,10 +329,6 @@ public function doUpgrade() {
325
329
});
326
330
};
327
331
328
- function restart() {
329
- window.location="https://localhost/agility/console";
330
- }
331
-
332
332
function fireUpdater() {
333
333
var txarea=$("#progress");
334
334
txarea.blur();
@@ -342,23 +342,37 @@ function fireUpdater() {
342
342
success: function(data) {
343
343
var done=false;
344
344
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);
347
347
if (a.indexOf("DONE")==0) done=true;
348
348
if (a.indexOf("FATAL")==0) done=true;
349
349
}
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
+ }
352
356
txarea.putCursorAtEnd();
353
357
},
354
358
error: function(XMLHttpRequest,textStatus,errorThrown) {
355
359
alert("Error: "+textStatus + " "+ errorThrown );
356
360
}
357
361
});
358
362
}
363
+
364
+ function start() {
365
+ $("#progress").addClass("waiting");
366
+ fireUpdater();
367
+ }
368
+
369
+ function restart() {
370
+ window.location="https://localhost/agility/console";
371
+ }
372
+
359
373
</script>
360
374
</head>
361
- <body onload="fireUpdater ();">
375
+ <body onload="start ();">
362
376
<h2>Updating AgilityContest...</h2>
363
377
<h3>New version: ' .$ up ->getVersionName ().' - ' .$ up ->getVersionDate ().' </h3>
364
378
<form id="updater" name="updater" action="/agility/console">
0 commit comments