mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Added some fancy spinner to items loader
This commit is contained in:
parent
fb326d0354
commit
2ff56c17e3
@ -1,4 +1,26 @@
|
|||||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=items">
|
<form method="post" action="{{ constant('ADMIN_URL') }}?p=items" id="items_form">
|
||||||
<input type="hidden" name="reload" value="1"/>
|
<input type="hidden" name="reload" value="1"/>
|
||||||
<button type="submit" class="btn btn-info"><i class="fas fa-update"></i> Reload items and weapons</button><br/><small> (it may take some time to finish)</small>
|
<button type="submit" class="btn btn-info"><i class="fas fa-update"></i> Reload items and weapons</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div id="loader" class="spinner-border" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<small id="notice"> (it may take some time to finish)</small>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#loader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#items_form').on('submit', function (e) {
|
||||||
|
$('#loader').show();
|
||||||
|
|
||||||
|
var $notice = $('#notice');
|
||||||
|
$notice.html('Reloading...' + $('#notice').text());
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
Loading…
x
Reference in New Issue
Block a user