@@ -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 =`
-
+ 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
};