Add file manager refresh without reload; ❤️ @parkervcp
This commit is contained in:
parent
6b89dbd451
commit
6b011fcd36
3 changed files with 11 additions and 2 deletions
|
@ -43,6 +43,7 @@ class FileManager {
|
|||
this.loader(false);
|
||||
$('#load_files').slideUp().html(data).slideDown(100, () => {
|
||||
ContextMenu.run();
|
||||
this.reloadFilesButton();
|
||||
if (_.isFunction(next)) {
|
||||
return next();
|
||||
}
|
||||
|
@ -59,7 +60,7 @@ class FileManager {
|
|||
text: 'An error occured while attempting to process this request. Please try again.',
|
||||
});
|
||||
console.log(jqXHR);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
loader(show) {
|
||||
|
@ -83,6 +84,13 @@ class FileManager {
|
|||
}
|
||||
}
|
||||
|
||||
reloadFilesButton() {
|
||||
$('i[data-action="reload-files"]').unbind().on('click', () => {
|
||||
$('i[data-action="reload-files"]').addClass('fa-spin');
|
||||
this.list();
|
||||
});
|
||||
}
|
||||
|
||||
decodeHash() {
|
||||
return decodeURIComponent(window.location.hash.substring(1));
|
||||
}
|
||||
|
|
Reference in a new issue