disable click on restore during restore or for corrupted

This commit is contained in:
Stephen Birarda 2018-02-22 11:03:31 -08:00
parent 07bbb33777
commit 99c419c315

View file

@ -271,10 +271,15 @@ $(document).ready(function(){
}
// handle click in table to restore a given content backup
$('body').on('click', '.' + BACKUP_RESTORE_LINK_CLASS, function(e){
$('body').on('click', '.' + BACKUP_RESTORE_LINK_CLASS, function(e) {
// stop the default behaviour
e.preventDefault();
// if this is a disabled link, don't proceed with the restore
if ($(this).parent().hasClass('disabled')) {
return false;
}
// grab the name of this backup so we can show it in alerts
var backupName = $(this).closest('tr').attr('data-backup-name');