make delete/restore button in viewer be the right colour, and go back to / when the success for the delete or restore finishes
This commit is contained in:
@@ -177,7 +177,7 @@ function DelDBox(del_or_undel)
|
||||
div+=`
|
||||
'/delete_files',
|
||||
success: function(data){
|
||||
if( $(location).attr('pathname').match('search') !== null ) { window.location='/' }; CheckForJobs() } }); return false" class="btn btn-outline-danger col-2">Ok</button>
|
||||
if( $(location).attr('pathname').match('search') !== null || document.viewing ) { window.location='/' }; CheckForJobs() } }); return false" class="btn btn-outline-danger col-2">Ok</button>
|
||||
</div>
|
||||
`
|
||||
else
|
||||
@@ -186,7 +186,7 @@ function DelDBox(del_or_undel)
|
||||
div+=`
|
||||
'/restore_files',
|
||||
success: function(data){
|
||||
if( $(location).attr('pathname').match('search') !== null ) { window.location='/' }; CheckForJobs() } }); return false" class="btn btn-outline-success col-2">Ok</button>
|
||||
if( $(location).attr('pathname').match('search') !== null || document.viewing ) { window.location='/' }; CheckForJobs() } }); return false" class="btn btn-outline-success col-2">Ok</button>
|
||||
</div>
|
||||
`
|
||||
$('#dbox-content').html(div)
|
||||
|
||||
Reference in New Issue
Block a user