summaryrefslogtreecommitdiff
path: root/lib/gallery.dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r--lib/gallery.dialog.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index a3da41e3..fef44b38 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -21,7 +21,6 @@ function handleDialogEvent(event) {
*/
function openDialog(element, on_success) {
var sHref = $(element).attr("href");
- var sTitle = $(element).attr("title");
var eDialog = '<div id="gDialog"></div>';
$("body").append(eDialog);
@@ -49,7 +48,11 @@ function openDialog(element, on_success) {
var parent = $("#gDialog").parent().parent();
parent.css("opacity", "0.0");
$("#gDialog").dialog("open");
- $("#ui-dialog-title-gDialog").html($("#gDialog fieldset legend:eq(0)").html());
+ var title = $("#gDialog h1:eq(0)").html();
+ if (!title) {
+ title = $("#gDialog fieldset legend:eq(0)").html();
+ }
+ $("#ui-dialog-title-gDialog").html(title);
if (parent.width() < 400) {
parent.css("width", 400);
}