Skip to content

Commit

Permalink
fixes on updater. some cosmetic layout changes in frm:myadmin. new ve…
Browse files Browse the repository at this point in the history
…rsion/release
  • Loading branch information
jonsito committed Jul 12, 2021
1 parent 3bdafc1 commit d024b3f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 4.5.1 20210712_1930
- Fix: messager.password behavior ( do not fire onchange when focus lost )
- Fix: updater should handle new naming convention from github
- New: show version and release on top right of screen
- New: ctrl-upgrade to force release upgrade regardless version
Version 4.5.0 20210707_1745
- Fix: Bugs in OrdenSalida,Results, and Training excel imports
Version 4.5.0 20210706_1920
Expand Down
5 changes: 4 additions & 1 deletion agility/console/dialogs/dlg_tools.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
</p>
<p>
<span style="display:inline-block;width:350px"><?php _e('Search for updates'); ?></span>
<!-- onclick event added later to track ctrl-meta keys -->
<a id="tools-upgradeBtn" href="#" class="easyui-linkbutton" style="width:85px"
data-options="iconCls:'icon-reload'" onclick="checkForUpgrades()"><?php _e('Upgrade')?></a>
data-options="iconCls:'icon-reload'"><?php _e('Upgrade')?></a>
</p>
<p>
<span style="display:inline-block;width:350px"><?php _e('Synchronize database with server'); ?></span>
Expand Down Expand Up @@ -105,6 +106,8 @@ addTooltip($('#tools-logResetBtn').linkbutton(),'<?php _e("Clear debugging and t
addTooltip($('#tools-logViewBtn').linkbutton(),'<?php _e("Download debug and trace file"); ?>');
addTooltip($('#tools-emptyTrashBtn').linkbutton(),'<?php _e("Remove every unneeded files from temporary directory"); ?>');

// bind click button to track ctrl and meta keys
$('#tools-upgradeBtn').bind('click',function(e){checkForUpgrades(e);});
// disable some buttons when running in server
if (checkForServer()) {
$('#tools-restoreBtn').linkbutton('disable'); // disable restore from app. use mysqldump'ed files to force reindexes
Expand Down
2 changes: 1 addition & 1 deletion agility/console/frm_myAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$config =Config::getInstance();
?>

<img class="mainpage" src="../ajax/images/getRandomImage.php" alt="wallpaper" width="700" height="480" align="middle" />
<img class="mainpage" src="../ajax/images/getRandomImage.php" alt="wallpaper" width="600" height="480" align="middle" />

<!-- FORMULARIO DE introduccion de usuario y contrasenya -->
<div id="myAdmin-window" style="position:relative;width:750px;height:auto;padding:10px 10px">
Expand Down
9 changes: 6 additions & 3 deletions agility/scripts/admin.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ function getProgress(){
setTimeout(getProgress,2000);
}

function checkForUpgrades() {
// e: click event. Ctrl-key means force update
function checkForUpgrades(e) {
var msg="<p>"+'<?php _e("Current Version"); ?>'+": "+ac_config.version_name+"<br />"+'<?php _e("Current Release"); ?>'+": "+ac_config.version_date+"</p>";
$.ajax({
url:"../ajax/adminFunctions.php",
Expand All @@ -736,12 +737,14 @@ function checkForUpgrades() {
$.messager.alert('<?php _e("Check for Upgrades"); ?>',data.errorMsg,"error");
return;
}
if (data.version_date==ac_config.version_date) {
if (data.version_date===ac_config.version_date) {
msg = msg +'<p style="text-align:center;">'+"<?php _e('AgilityContest is up to date'); ?>"+"</p>";
$.messager.alert("Version Info",msg,"info");
}
msg = msg +"<p>"+'<?php _e("Last Version"); ?>'+": "+data.version_name+"<br />"+'<?php _e('Last Release');?>'+": "+data.version_date+"</p>";
if (data.version_date>ac_config.version_date) askForUpgrade(msg,data.version_name,data.version_date);
if (data.version_date>ac_config.version_date) { askForUpgrade(msg,data.version_name,data.version_date); return; }
// also, on ctrl/meta key force askforupgrade
if (e.ctrlKey || e.metaKey) askForUpgrade(msg,data.version_name,data.version_date);
}
});
}
4 changes: 2 additions & 2 deletions config/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 = "4.5.0"
version_date = "20210707_1745"
version_name = "4.5.1"
version_date = "20210712_1930"
database_name = "agility"
database_host = "localhost"
database_user = "YWdpbGl0eV9vcGVyYXRvcg=="
Expand Down

0 comments on commit d024b3f

Please sign in to comment.