Add file deletion support, fix renaming deleting URL hash
This commit is contained in:
parent
72a57604df
commit
cf9a70ddca
3 changed files with 47 additions and 5 deletions
|
@ -77,10 +77,12 @@ class ContextMenuClass {
|
|||
// Handle Events
|
||||
const Actions = new ActionsClass(parent, menu);
|
||||
$(menu).find('li[data-action="move"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.move();
|
||||
});
|
||||
|
||||
$(menu).find('li[data-action="rename"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.rename();
|
||||
});
|
||||
|
||||
|
@ -89,6 +91,11 @@ class ContextMenuClass {
|
|||
Actions.download();
|
||||
});
|
||||
|
||||
$(menu).find('li[data-action="delete"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.delete();
|
||||
});
|
||||
|
||||
$(window).on('click', () => {
|
||||
$(menu).remove();
|
||||
if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');
|
||||
|
@ -103,7 +110,6 @@ class ContextMenuClass {
|
|||
const path = $(this).parent().data('path') || '';
|
||||
const name = $(this).parent().data('name') || '';
|
||||
|
||||
console.log('changing hash');
|
||||
window.location.hash = encodeURIComponent(path + name);
|
||||
Files.list();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue