Bugzilla – Attachment 174567 Details for
Bug 37946
Double menu when clicking the caret in Z39.50 search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37946: Double menu when clicking the caret in Z39.50 search
Bug-37946-Double-menu-when-clicking-the-caret-in-Z.patch (text/plain), 4.16 KB, created by
Marcel de Rooy
on 2024-11-15 11:02:34 UTC
(
hide
)
Description:
Bug 37946: Double menu when clicking the caret in Z39.50 search
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-11-15 11:02:34 UTC
Size:
4.16 KB
patch
obsolete
>From dcdd62eab90d440a319398d3cf8aa0657d7393af Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 18 Sep 2024 17:49:21 +0000 >Subject: [PATCH] Bug 37946: Double menu when clicking the caret in Z39.50 > search >Content-Type: text/plain; charset=utf-8 > >This patch makes some adjustments to the JS for the Z39.50 search >results page to correct the behavior of dropdown menus. If the split >button's menu trigger is clicked a cloned version of the menu shouldn't >appear along with the default one. > >To test, apply the patch and clear your browser cache if necessary. > >- Go to Cataloging -> New from Z39.50. >- Perform a search which will return multiple results. >- Click any table cell in the results except the last one. > - You should get a popup menu with "MARC preview," "Card preview," and > "Import." > - Each menu item should work correctly. >- Test the button in the last column to confirm that both the "primary" > button works correctly and that the popup menu works correctly. >- Test the process of adding a new authority from Z39.50 to confirm that > the authority search results table works the same as the bibliographic > one. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../intranet-tmpl/prog/js/z3950_search.js | 51 ++++++++----------- > 1 file changed, 22 insertions(+), 29 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >index 8a7c0ca596..96c9b1f8b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >@@ -78,37 +78,30 @@ $( document ).ready( function() { > var link = $( "a[title='" + tgt.text() + "']", row ); > if( link.length == 1) link.click(); > row.find('ul.dropdown-menu').hide(); >+ return; > } else { >- event.stopPropagation(); >- /* Remove the "open" class from all dropup menus in case one is open */ >- $(".dropup").removeClass("open"); >- /* Create a clone of the Bootstrap dropup menu in the "Actions" column */ >- var menu_clone = $(".dropdown-menu", row) >- .clone() >- .addClass("menu-clone") >- .css({ >- "display" : "block", >- "position" : "absolute", >- "top" : "auto", >- "bottom" : "100%", >- "right" : "auto", >- "left" : "0", >- }); >- /* Append the menu clone to the table cell which was clicked. >- The menu must first be wrapped in a block-level div to clear >- the table cell's text contents and then a relative-positioned >- div to allow the menu to be positioned correctly */ >- if( tgt.prop('nodeName') != 'TD' ) { >- // handling click on caret to improve menu position >- tgt = tgt.closest('td'); >- } >- tgt.append( >- $('<div/>', {'class': 'btn-wrapper'}).append( >- $('<div/>', {'class': 'btn-group'}).append( >- menu_clone >+ if( tgt.prop('nodeName') == 'TD' && !tgt.hasClass("actions") ){ >+ /* Create a clone of the Bootstrap dropup menu in the "Actions" column */ >+ var menu_clone = $(".dropdown-menu", row) >+ .clone() >+ .addClass("show") >+ .css({ >+ "display" : "block", >+ "position" : "absolute", >+ "top" : "auto", >+ "bottom" : "100%", >+ "right" : "auto", >+ "left" : "0", >+ }); >+ >+ tgt.append( >+ $('<div/>', {'class': 'btn-wrapper'}).append( >+ $('<div/>', {'class': 'btn-group'}).append( >+ menu_clone >+ ) > ) >- ) >- ); >+ ); >+ } > } > }); > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37946
:
171788
|
171806
|
171828
|
171843
|
171844
| 174567 |
174568