diff --git a/templates/files.html b/templates/files.html index fc0f84d..88347b4 100644 --- a/templates/files.html +++ b/templates/files.html @@ -17,7 +17,6 @@ {% set tmp_path=cwd | replace( "static/Storage", "" ) + "/" %} {% else %} - {% set tmp_path=cwd | replace( "static/Bin", "" ) + "/" %} {% endif %} {{tmp_path}} @@ -47,7 +46,14 @@
- + {% if "files_rbp" in request.url %} +
@@ -224,22 +230,26 @@ function GetSelnAsData() return to_del } -function DelDBox() +function DelDBox(del_or_undel) { + console.log(del_or_undel) to_del = GetSelnAsData() - console.log(to_del) - $('#dbox-title').html('Delete Selected File(s)') - div =` -
-

Delete the following files?

-
` + $('#dbox-title').html(del_or_undel+' Selected File(s)') + div ='

' + del_or_undel + ' the following files?

' div+=GetSelnAsDiv() - div+=` -
+ div+=`
- + ` + div+=` +
` $('#dbox-content').html(div) @@ -295,6 +305,8 @@ function ChangeSize(clicked_button,sz) // whether you click after highlight or before function DoSel(e, el) { + console.log(e) + console.log(el) if( e.ctrlKey ) { $(el).toggleClass('highlight') @@ -321,6 +333,7 @@ $(document).on('click', function(e) { $('.highlight').removeClass('highlight') } $.contextMenu({ selector: '.figure', build: function($triggerElement, e){ + DoSel(e, e.currentTarget ) if (e.currentTarget.getAttribute('path_type') == 'Bin' ) { item_list = { details: { name: "Details..." }, @@ -343,9 +356,10 @@ $.contextMenu({ callback: function( key, options) { console.log( $(this).attr('id') ) console.log( $(this).attr('path_type') ) - if( key == "view" ) { - document.location.href = $(this).find('a').attr('href'); - } + if( key == "view" ) { document.location.href = $(this).find('a').attr('href'); } + if( key == "move" ) { MoveDBox() } + if( key == "del" ) { DelDBox('Delete') } + if( key == "undel" ) { DelDBox('Restore') } }, items: item_list };