Skip to content

Commit

Permalink
Fix modal header display order; fixes #1620
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 1, 2017
1 parent 7634cbc commit cc271c0
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 12 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/blacklight/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ Blacklight.modal.modalCloseSelector = "[data-blacklight-modal~=close]";
// network errors.
Blacklight.modal.onFailure = function(data) {
var contents = "<div class='modal-header'>" +
"<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button>" +
"Network Error</div>";
"<div class='modal-title'>Network Error</div>" +
'<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="Close">' +
' <span aria-hidden="true">&times;</span>' +
'</button>';
$(Blacklight.modal.modalSelector).find('.modal-content').html(contents);
$(Blacklight.modal.modalSelector).modal('show');
}
Expand Down
4 changes: 3 additions & 1 deletion app/views/catalog/citation.js.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3><%= t('blacklight.tools.citation') %></h3>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<%= render :partial => 'citation' -%>
Expand Down
8 changes: 5 additions & 3 deletions app/views/catalog/email.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="modal-header">
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="modal-title"><%= t('blacklight.email.form.title') %></h1>
</div>
<h1 class="modal-title"><%= t('blacklight.email.form.title') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= render :partial => 'email_form' %>
4 changes: 3 additions & 1 deletion app/views/catalog/email_success.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1><%= t('blacklight.email.form.title') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>

<div class="modal-body">
Expand Down
5 changes: 3 additions & 2 deletions app/views/catalog/facet.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
</div>

<div class="modal-header">
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>

<h3 class="modal-title"><%= facet_field_label(@facet.key) %></h3>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
<%= render partial: 'facet_index_navigation' if @facet.index_range && @display_facet.index? %>

</div>
Expand Down
4 changes: 3 additions & 1 deletion app/views/catalog/sms.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="modal-header">
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="modal-title"><%= t('blacklight.sms.form.title') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= render :partial => 'sms_form' %>
4 changes: 3 additions & 1 deletion app/views/catalog/sms_success.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="modal-title"><%= t('blacklight.sms.form.title') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>

<div class="modal-body">
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_modal.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="blacklight-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal menu" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions config/locales/blacklight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ en:
and: 'and'
or: 'or'

modal:
close: "Close"

bookmarks:
title: 'Bookmarks'
page_title: 'Bookmarks - %{application_name}'
Expand Down

0 comments on commit cc271c0

Please sign in to comment.