Browse Source

Bug 25282: Correct Bootstrap dropdown button markup

Incorrect markup surrounding Bootstrap dropdown buttons causes display
problems with the buttons are in a DataTable. Dropdown wrapper <div>s
must have a "btn-group" class.

To reproduce the problem, look at the MARC bibliographic frameworks
page. The "Actions" menu when triggered will not line up with the
button.

In almost all cases, dropdown buttons inside tables should also have the
"dropup" class on their wrapper so that the menu appears above the
button. This prevents the menu from disappearing off the bottom of the
window when the button is positioned low in the viewport.

To test, apply the patch and test the button menus in tables on the
following pages:

- Acquisitions -> Invoices
- Acquisitions -> Add to order -> From external source -> Results
- Acquisitions -> Suggestions
- Administration -> Budgets
- Administration -> Funds
- Administration -> Authority types
- Administration -> Authority types -> MARC structure
- Administration -> MARC bibliographic frameworks
- Administration -> MARC bibliographic frameworks -> MARC structure
- Administration -> OAI sets configuration
- Administration -> Z39.50/SRU servers
- Authorities -> Authority search results
- Authorities -> New from Z39.50/SRU -> Search results
- Cataloging -> Edit items
- Cataloging -> New from Z39.50/SRU -> Search results
- Circulation -> Article requests
- Reports -> Saved reports
- Tools -> Patron lists
- Tools -> Rotating collections
- Serials -> Serials search results

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Owen Leonard 3 years ago
committed by Martin Renvoize
parent
commit
58bec27564
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
  3. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
  4. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
  5. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt
  6. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt
  7. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
  8. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
  9. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt
  10. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
  11. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt
  12. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
  13. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt
  14. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
  15. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
  16. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt
  17. 46
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
  18. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt
  19. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
  20. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

2
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt

@ -74,7 +74,7 @@
</td>
<td>
<div class="dropdown dropup">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="invoiceactions[% invoice.invoiceid | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt

@ -136,7 +136,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
</td>
[% END %]
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="z3950preview[% breeding_loo.breedingid | uri %]" role="button" data-toggle="dropdown" href="#">
Preview <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt

@ -4,7 +4,7 @@
[% USE Price %]
[% SET footerjs = 1 %]
[%- BLOCK action_menu %]
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="budgetmenu_[% block_budget.budget_period_id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt

@ -170,7 +170,7 @@
<td> <span></span> </td>
[% ELSE %]
<td>
<div class="dropdown dropup">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="budgetactions[% budget.budget_id | html %]_[% budget.budget_period_id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt

@ -208,7 +208,7 @@
<td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% loo.authorised_value | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="authtagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtagactions[% loo.tagfield | html %]">

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt

@ -150,7 +150,7 @@
<td>[% authority_type.summary | html %]</td>
<td>[% authority_type.auth_tag_to_report | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="authtypeactions[% authority_type.authtypecode | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtypeactions[% authority_type.authtypecode | html %]">

4
koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt

@ -134,7 +134,7 @@
<td>&nbsp;</td>
<td>Default framework</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>
@ -202,7 +202,7 @@
<td>[% loo.frameworkcode | html %]</td>
<td>[% loo.frameworktext | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt

@ -212,7 +212,7 @@
<td>[% loo.ind1_defaultvalue | html %]</td>
<td>[% loo.ind2_defaultvalue | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt

@ -88,7 +88,7 @@
[% END %]
</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="oaisetsactions[% set.id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="oaisetsactions[% set.id | html %]">

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt

@ -177,7 +177,7 @@
</td>
<td>[% loo.attributes | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt

@ -53,7 +53,7 @@
[% END %]
[% IF ( CAN_user_editauthorities ) %]
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="authactions[% resul.authid | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authactions[% resul.authid | html %]">

2
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

@ -79,7 +79,7 @@
<td>&nbsp;</td>
[% ELSE %]
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="itemactions[% item_loo.itemnumber | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt

@ -88,7 +88,7 @@
<td>[% breeding_loo.heading | html %]</td>
<td>[% breeding_loo.heading_code | html %]</td>
<td class="actions">
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt

@ -155,7 +155,7 @@
</td>
[% END %]
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt

@ -10,7 +10,7 @@
</head>
[% BLOCK actions %]
<div id="[% menuid | html %]" class="dropdown">
<div id="[% menuid | html %]" class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle ar-actions" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

2
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt

@ -53,7 +53,7 @@
[% END %]
</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>

46
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

@ -321,29 +321,27 @@
[% END %]
</td>
<td>
<div class="dropup">
<div class="btn-group">
[%# There should be no space between these two buttons, it would render badly %]
<a class="btn btn-default btn-xs" role="button"
href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | html %]&amp;phase=Run%20this%20report"><i
class="fa fa-play"></i> Run</a><a
class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown"
href="#"><b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reportactions[% savedreport.id | html %]">
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | uri %]&amp;phase=Show%20SQL"><i class="fa fa-search"></i> Show</a></li>
[% IF ( CAN_user_reports_create_reports ) %]
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | uri %]&amp;phase=Edit%20SQL"><i class="fa fa-pencil"></i> Edit</a></li>
<li><a title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% savedreport.savedsql |uri %]&amp;reportname=[% savedreport.report_name |uri %]&amp;notes=[% savedreport.notes |uri %]"><i class="fa fa-copy"></i> Duplicate</a></li>
[% END %]
[% IF (Koha.Preference('Mana') == 1) %]
<li><a class="ShareButton" data-toggle="modal" href="#mana_share_report" title="Share your report with Mana Knowledge Base"><i class="fa fa-share-alt"></i> Share</a></li>
[% END %]
<li><a href="/cgi-bin/koha/tools/scheduler.pl?id=[% savedreport.id | uri %]"><i class="fa fa-clock-o"></i> Schedule</a></li>
[% IF ( CAN_user_reports_delete_reports ) %]
<li><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | html %]&amp;phase=Delete%20Saved"><i class="fa fa-trash"></i> Delete</a></li>
[% END %]
</ul>
</div>
<div class="btn-group dropup">
[%# There should be no space between these two buttons, it would render badly %]
<a class="btn btn-default btn-xs" role="button"
href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | html %]&amp;phase=Run%20this%20report"><i
class="fa fa-play"></i> Run</a><a
class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown"
href="#"><b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reportactions[% savedreport.id | html %]">
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | uri %]&amp;phase=Show%20SQL"><i class="fa fa-search"></i> Show</a></li>
[% IF ( CAN_user_reports_create_reports ) %]
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | uri %]&amp;phase=Edit%20SQL"><i class="fa fa-pencil"></i> Edit</a></li>
<li><a title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% savedreport.savedsql |uri %]&amp;reportname=[% savedreport.report_name |uri %]&amp;notes=[% savedreport.notes |uri %]"><i class="fa fa-copy"></i> Duplicate</a></li>
[% END %]
[% IF (Koha.Preference('Mana') == 1) %]
<li><a class="ShareButton" data-toggle="modal" href="#mana_share_report" title="Share your report with Mana Knowledge Base"><i class="fa fa-share-alt"></i> Share</a></li>
[% END %]
<li><a href="/cgi-bin/koha/tools/scheduler.pl?id=[% savedreport.id | uri %]"><i class="fa fa-clock-o"></i> Schedule</a></li>
[% IF ( CAN_user_reports_delete_reports ) %]
<li><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id | html %]&amp;phase=Delete%20Saved"><i class="fa fa-trash"></i> Delete</a></li>
[% END %]
</ul>
</div>
</td>
</tr>
@ -934,7 +932,7 @@
[% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
<p>
<div class="dropdown">
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Batch operations with [% IF unlimited_total > limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
<span class="caret"></span>

2
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt

@ -39,7 +39,7 @@
<td>[% collectionsLoo.colDesc | html %]</td>
<td>[% Branches.GetName( collectionsLoo.colBranchcode ) | html %]</td>
<td>
<div class="dropdown">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs" dropdown-toggle" id="collectionsactions[% collectionsLoo.colId | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="collectionsactions[% collectionsLoo.colId | html %]">

2
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt

@ -133,7 +133,7 @@
[% END %]
<td>
<div class="dropdown">
<div class="btn-group dropup">
[% IF closed %]
<a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>

4
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

@ -626,8 +626,7 @@
[% END %]
</td>
<td class="actions">
<div class="dropup">
<div class="btn-group">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
@ -638,7 +637,6 @@
[% END %]
</ul>
</div>
</div>
</td>
</tr>
[% END %]</tbody>

Loading…
Cancel
Save