| Summary: | Use anchor tag for DataTables configure button | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Owen Leonard <oleonard> |
| Component: | Templates | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | RESOLVED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | caroline.cyr-la-rose, david, emily.lamancusa, fridolin.somers, jonathan.druart, m.de.rooy, wainuiwitikapark |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes the "Configure" button for tables, so that you can now right-click and open the table settings in a new tab.
|
Version(s) released in: |
25.05.00,24.11.01,24.05.06
|
| Circulation function: | |||
| Attachments: |
Bug 38476: Make DT 'Configure' button a link
Bug 38476: Make DT 'Configure' button a link Bug 38476: Make DT 'Configure' button a link |
||
+1 for this! I've also thought many times that I wish I could click the configuration button to open the page in a new window. Created attachment 174765 [details] [review] Bug 38476: Make DT 'Configure' button a link So that we can open in a separate bug using right click. Why not keeping the 'action' to make regular clicks work? Created attachment 174849 [details] [review] Bug 38476: Make DT 'Configure' button a link So that we can open in a separate bug using right click. Signed-off-by: Owen Leonard <oleonard@myacpl.org> I was hoping we might find a solution which also works with a Ctrl+click, but that's probably the least common way the general user will interact with the button. (In reply to Jonathan Druart from comment #2) > So that we can open in a separate bug using right click. In a separate bug? :) Created attachment 174923 [details] [review] Bug 38476: Make DT 'Configure' button a link So that we can open in a separate bug using right click. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> (In reply to Marcel de Rooy from comment #6) > (In reply to Jonathan Druart from comment #2) > > So that we can open in a separate bug using right click. > > In a separate bug? :) Wonder if it should be a separate enhancment btw, haha Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.01 Backported to 24.05.x for 24.05.06 Great, but I prefer not backport to 23.11.x for UI stability (In reply to Owen Leonard from comment #5) > I was hoping we might find a solution which also works with a Ctrl+click, > but that's probably the least common way the general user will interact with > the button. That is also how I open things in new tabs. Right-click, what's that? ;) This feels like a bug fix, nothing to add/edit in the manual. |
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?