Skip to content

Commit

Permalink
Rename modal-image to modal-lightbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockowitz committed Oct 18, 2015
1 parent 7b9c2a5 commit 8444370
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% include widgets/modal-image.html %}
{% include widgets/modal-lightbox.html %}

{% if site.environment == 'development' %}
<script src="{{ site.baseurl }}/bower_components/jquery/dist/jquery.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _includes/style-guide/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ <h3><a href="http://stackoverflow.com/questions/25023199/bootstrap-open-image-in
<div><a href="http://placehold.it/800x600?1.png"><img src="http://placehold.it/200x150?1.png" title="My Custom Image Title" class="img-thumbnail"></a></div>

<!-- Creates the bootstrap modal where the image will appear -->
<div class="modal fade" id="modal-image" tabindex="-1" role="dialog" aria-labelledby="modal-image-label" aria-hidden="true">
<div class="modal fade" id="modal-lightbox" tabindex="-1" role="dialog" aria-labelledby="modal-lightbox-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="modal-image-label"></h4>
<h4 class="modal-title" id="modal-lightbox-label"></h4>
</div>
<div class="modal-body">
<img class="img-responsive">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="modal fade modal-image" id="modal-image" tabindex="-1" role="dialog" aria-labelledby="modal-image-label" aria-hidden="true">
<div class="modal fade modal-lightbox" id="modal-lightbox" tabindex="-1" role="dialog" aria-labelledby="modal-lightbox-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="modal-image-label"></h4>
<h4 class="modal-title" id="modal-lightbox-label"></h4>
</div>
<div class="modal-body">
<img class="img-responsive">
Expand Down
2 changes: 1 addition & 1 deletion _sass/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* Contains Bootstrap modal overrides.
*/

.modal-image .img-responsive {
.modal-lightbox .img-responsive {
margin: 0 auto;
}
2 changes: 1 addition & 1 deletion css/main.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
$('a[href$=".png"], a[href$=".jpg"]').click(function(event) {
var $img = $(this).find('img');
var title = $(this).attr('title') || ($img.length) ? ($img.attr('title') || $img.attr('alt')) : '';
$('#modal-image img').attr('src', $(this).attr('href'));
$('#modal-image h4').html(title);
$('#modal-image').modal('show');
$('#modal-lightbox img').attr('src', $(this).attr('href'));
$('#modal-lightbox h4').html(title);
$('#modal-lightbox').modal('show');
event.preventDefault();
});

Expand Down
2 changes: 1 addition & 1 deletion js/main.min.js

Large diffs are not rendered by default.

0 comments on commit 8444370

Please sign in to comment.