https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38476

            Bug ID: 38476
           Summary: Use anchor tag for DataTables configure button
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Templates
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

I find it frustrating that I can't right-click or Ctrl+click a DataTable's
"Configure" button. I would rather open a new tab than have to find my way
back.

DataTables provides the option to define which element is used for a button,
but it seems like some default event-handling prevents the link from working
100% like a link:

        buttons.push(
            {
                tag: "a",
                attr: {
                    href: '/cgi-bin/koha/admin/columns_settings.pl?module=' +
table_settings['module'] + '&page=' + table_settings['page'] + '&table=' +
table_settings['table']
                },
                className: "dt_button_configure_table",
                fade: 100,
                titleAttr: __("Configure table"),
                text: '<i class="fa fa-lg fa-wrench"></i> <span
class="dt-button-text">' + __("Configure") + '</span>',
            }
        );

If you add only the href attribute, right-click and "Open in new tab" works,
but a regular click does not, and Ctrl+click does not.

If you include only the "action" event handler function, both right-click plus
"Open in new tab" and Ctrl+click do not work, but a regular click does.

If you include both the href attribute and the event handler, Ctrl+click
doesn't work.

I wonder if there is a way to override the default event handling so that a
regular link can work like a regular link?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to