Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
Fixed modal-title display
Browse files Browse the repository at this point in the history
Modified logic in updateTitleAndFooter() so modal-title always follows the "always_show_close" option.

Before, when "always_show_close" set to false, only first modal had hidden title - when navigating left/right the title showed, even when empty (because of "nbsp;").
  • Loading branch information
leibrug committed May 20, 2014
1 parent 2903872 commit 88be114
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ekko-lightbox.coffee
Expand Up @@ -178,10 +178,10 @@ EkkoLightbox.prototype = {
updateTitleAndFooter: -> updateTitleAndFooter: ->
header = @modal_content.find('.modal-header') header = @modal_content.find('.modal-header')
footer = @modal_content.find('.modal-footer') footer = @modal_content.find('.modal-footer')
title = @$element.data('title') || " " title = @$element.data('title') || ""
caption = @$element.data('footer') || "" caption = @$element.data('footer') || ""
header.css('display', '').find('.modal-title').html(title)
if title or @options.always_show_close then header.css('display', '') else header.css('display', 'none') if title or @options.always_show_close then header.css('display', '').find('.modal-title').html(title || " ") else header.css('display', 'none')
if caption then footer.css('display', '').html(caption) else footer.css('display', 'none') if caption then footer.css('display', '').html(caption) else footer.css('display', 'none')
@ @


Expand Down Expand Up @@ -278,4 +278,4 @@ $.fn.ekkoLightbox.defaults = {
onShown : -> onShown : ->
onHide : -> onHide : ->
onHidden : -> onHidden : ->
} }

0 comments on commit 88be114

Please sign in to comment.