The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit a5cb9e45 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge branch 'release-2.3'

parents 20c314d9 f784564f
No related merge requests found
...@@ -90,9 +90,10 @@ var Lightbox = { ...@@ -90,9 +90,10 @@ var Lightbox = {
* Hide the header if it's empty to make more * Hide the header if it's empty to make more
* room for content and avoid double headers. * room for content and avoid double headers.
*/ */
changeContent: function(html, headline) { titleSet: false,
changeContent: function(html) {
var header = $('#modal .modal-header'); var header = $('#modal .modal-header');
if(typeof headline === "undefined") { if(!Lightbox.titleSet) {
var h2 = html.match(/<h2>([^<]*)<\/h2>/); var h2 = html.match(/<h2>([^<]*)<\/h2>/);
if(h2) { if(h2) {
header.find('.modal-title').html(h2[1]); header.find('.modal-title').html(h2[1]);
...@@ -102,8 +103,7 @@ var Lightbox = { ...@@ -102,8 +103,7 @@ var Lightbox = {
header.find('.modal-title').html(pLead[1]); header.find('.modal-title').html(pLead[1]);
} }
} }
} else { Lightbox.titleSet = false;
header.find('.modal-title').html(headline);
} }
if(header.find('.modal-title').html().length == 0) { if(header.find('.modal-title').html().length == 0) {
header.css('border-bottom-width', '0'); header.css('border-bottom-width', '0');
...@@ -406,5 +406,6 @@ $(document).ready(function() { ...@@ -406,5 +406,6 @@ $(document).ready(function() {
title = $(this).html(); title = $(this).html();
} }
$('#modal .modal-title').html(title); $('#modal .modal-title').html(title);
Lightbox.titleSet = true;
}); });
}); });
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment