Hey,
Is it possible to make attachments clickable in list view?
I know I can do something like:
JS
frappe.listview_settings['Test Docktype'] = {
onload(listview) {
console.log("loaded", listview);
listview.page.add_action_item('My custom Action', () => my_action_handler());
listview.page.set_secondary_action('Open Attachment', () => OpenAttachment(), 'octicon octicon-sync');
}
};
function Compare(){
for (let check of event.view.cur_list.$checks) {
// #something like frappe.get_value('Test Docktype', check.dataset.name, 'attached_file');
// #then something like: window.open(response, '_blank');
// #which I couldn't bother to properly phrase its syntax
}
}
but then a user has to select only one line, otherwise he\she ends up with too many attachments opening at once.
What do you say? Is there an elegant way of achieving this?