Fix #238 installer freezing in Chrome

This commit is contained in:
Kijin Sung 2016-02-09 09:44:19 +09:00
parent a499aa0d1f
commit f038091b37
4 changed files with 16 additions and 5 deletions

View file

@ -59,7 +59,7 @@
<a href="{getUrl('', 'act','dispInstallCheckEnv')}" class="button grey">&laquo; {$lang->cmd_back}</a>
</div>
<div class="align-right">
<button type="submit" id="task-db-select" value="">{$lang->cmd_next} &raquo;</button>
<button type="submit" id="task-db-select" value="" data-checking="{$lang->msg_db_checking}">{$lang->cmd_next} &raquo;</button>
</div>
</div>
</form>

View file

@ -37,11 +37,20 @@ jQuery(function($){
}
});
}
if($("#task-db-select").size()) {
$("#task-db-select").parents("form").on("submit", function() {
setTimeout(function() {
$("#task-db-select").text($("#task-db-select").data("checking"));
$("#task-db-select").prop("disabled", true);
}, 100);
});
}
if($("#task-complete-install").size()) {
$("#task-complete-install").click(function() {
$("#task-complete-install").text($("#task-complete-install").data("installing"));
$("#task-complete-install").prop("disabled", true);
$(window).on("beforeunload", function() { return ""; });
$("#task-complete-install").parents("form").on("submit", function() {
setTimeout(function() {
$("#task-complete-install").text($("#task-complete-install").data("installing"));
$("#task-complete-install").prop("disabled", true);
}, 100);
});
}
});