From 90876c517dde76b0b327575dda09099160544492 Mon Sep 17 00:00:00 2001
From: samueloph <samueloph@gmail.com>
Date: Thu, 3 Sep 2015 11:36:42 -0300
Subject: [PATCH] Change modal's h4 title to non breaking space

This will prevent VuFind from generating an empty h4 tag.
---
 themes/bootstrap3/js/lightbox.js                | 4 ++--
 themes/bootstrap3/templates/layout/layout.phtml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index ebb551ab47d..2b25b1fbd3f 100644
--- a/themes/bootstrap3/js/lightbox.js
+++ b/themes/bootstrap3/js/lightbox.js
@@ -135,7 +135,7 @@ var Lightbox = {
     if(this.XHR) { this.XHR.abort(); }
     // Reset content so we start fresh when we open a lightbox
     $('#modal').removeData('modal');
-    $('#modal').find('.modal-title').html('');
+    $('#modal').find('.modal-title').html('&nbsp;');
     $('#modal').find('.modal-body').html(vufindString.loading + "...");
   },
   /**
@@ -416,7 +416,7 @@ $(document).ready(function() {
   $('#modal').on('hidden.bs.modal', Lightbox.closeActions);
   /**
    * If a link with the class .modal-link triggers the lightbox,
-   * look for a title="" to use as our lightbox title.
+   * look for a title attribute to use as our lightbox title.
    */
   $('.modal-link,.help-link').click(function() {
     var title = $(this).attr('title');
diff --git a/themes/bootstrap3/templates/layout/layout.phtml b/themes/bootstrap3/templates/layout/layout.phtml
index dc3bb65dcde..a2dc8427e8e 100644
--- a/themes/bootstrap3/templates/layout/layout.phtml
+++ b/themes/bootstrap3/templates/layout/layout.phtml
@@ -149,7 +149,7 @@
         <div class="modal-content">
           <div class="modal-header">
             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-            <h4 id="modalTitle" class="modal-title"></h4>
+            <h4 id="modalTitle" class="modal-title">&nbsp;</h4>
           </div>
           <div class="modal-body"><?=$this->transEsc('Loading') ?>...</div>
         </div>
-- 
GitLab