diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 76c0e82549..0c4322382d 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -1083,7 +1083,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { } setup_list_click() { - this.$result.on("click", ".list-row, .image-view-header", (e) => { + this.$result.on("click", ".list-row, .image-view-header, .file-header", (e) => { const $target = $(e.target); // tick checkbox if Ctrl/Meta key is pressed if (e.ctrlKey || (e.metaKey && !$target.is("a"))) { @@ -1101,6 +1101,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { $target.is(":checkbox") || $target.is("a") ) { + e.stopPropagation(); return; } // open form diff --git a/frappe/public/js/frappe/views/file/file_view.js b/frappe/public/js/frappe/views/file/file_view.js index 5c88d9a536..a19286c962 100644 --- a/frappe/public/js/frappe/views/file/file_view.js +++ b/frappe/public/js/frappe/views/file/file_view.js @@ -243,66 +243,38 @@ frappe.views.FileView = class FileView extends frappe.views.ListView { } } - get_item_html(d, draggable) { - const icon_class = d.icon_class + '-large'; - let file_body_html = - d._type == 'image' + render_grid_view() { + let html = this.data.map(d => { + const icon_class = d.icon_class + '-large'; + let file_body_html = d._type == 'image' ? `