mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 01:59:14 +00:00
[Bands] Added message saying that band has been saved.
This commit is contained in:
parent
84af5b83c6
commit
0366431975
@ -64,7 +64,7 @@
|
||||
<a href="javascript:deleteBand('<?php echo $band->id . '\',\'' . $band->band ?>');" class="btn btn-danger btn-sm" ><i class="fas fa-trash-alt"></i> Delete</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:saveBand('<?php echo $band->id . '\',\'' . $band->band ?>');" class="btn btn-primary btn-sm" ><i class="fas fa-save"></i></i> Save</a>
|
||||
<a href="javascript:saveBand('<?php echo $band->id . '\',\'' . $band->band ?>');" class="btn btn-primary btn-sm ld-ext-right btnband_<?php echo $band->id ?>" ><i class="fas fa-save"></i></i> Save<div class="ld ld-ring ld-spin"></div></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -141,6 +141,8 @@ function deactivateAllBands() {
|
||||
}
|
||||
|
||||
function saveBand(id) {
|
||||
$(".btnband_"+id).addClass('running');
|
||||
$(".btnband_"+id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/band/saveBand',
|
||||
type: 'post',
|
||||
@ -157,7 +159,10 @@ function saveBand(id) {
|
||||
'vucc': $(".vucc_"+id+" input[type='checkbox']").is(":checked")
|
||||
},
|
||||
success: function (html) {
|
||||
// Add an alert to say that it is saved. Vanish after 5 seconds.
|
||||
$(".alert").remove();
|
||||
$('.card-body').prepend('<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>'+$(".band_"+id).parent("tr:first").find("td:first").text()+' band has been saved!</div>');
|
||||
$(".btnband_"+id).removeClass('running');
|
||||
$(".btnband_"+id).prop('disabled', false);
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user