From c3398ef77a78aff8f732d8768e4608c54404f51d Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Fri, 11 Jun 2021 19:03:37 +1000 Subject: [PATCH] for now made del/restore force a reload of main page, it still does not show you created the del/restore job, but it is better than nothing. Also fixed dumb bug I introduced when handling trash/restore icons and moved an if rather than copied it between the alert for dir in and buttons for del/restore --- templates/files.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/files.html b/templates/files.html index b127ec0..bf13ed7 100644 --- a/templates/files.html +++ b/templates/files.html @@ -16,7 +16,8 @@ {% elif "files_sp" in request.url %} {% set tmp_path=cwd | replace( "static/Storage", "" ) + "/" %} - {% else %} + {% elif "files_rbp" in request.url %} + {% set tmp_path=cwd | replace( "static/Bin", "" ) + "/" %} {% endif %} {{tmp_path}} @@ -249,7 +250,7 @@ function DelDBox(del_or_undel) div+="'/restore_files', " div+=` data: to_del, - success: function(data){ console.log('Delete/Restore File(s) succeeded - TODO: need a FE msg' ); return false; } })" class="btn btn-outline-danger col-lg-2">Ok + success: function(data){ window.location='/'; return false; } })" class="btn btn-outline-danger col-lg-2">Ok ` $('#dbox-content').html(div)