From 42e635bff0948e3a8e7dc0003d17e709b7db2ce3 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Mon, 12 Jan 2009 07:57:13 +0000 Subject: Theme admin refinement. Make more room to show the preview by enlarging the iframe and removing the heading above it. --- lib/gallery.dialog.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/gallery.dialog.js') diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index fef44b38..d6511fd9 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -21,6 +21,7 @@ function handleDialogEvent(event) { */ function openDialog(element, on_success) { var sHref = $(element).attr("href"); + var sTitle = $(element).attr("title"); var eDialog = '
'; $("body").append(eDialog); @@ -48,11 +49,12 @@ function openDialog(element, on_success) { var parent = $("#gDialog").parent().parent(); parent.css("opacity", "0.0"); $("#gDialog").dialog("open"); - var title = $("#gDialog h1:eq(0)").html(); - if (!title) { - title = $("#gDialog fieldset legend:eq(0)").html(); + if ($("#gDialog h1").length) { + sTitle = $("#gDialog h1:eq(0)").html(); + } else if ($("#gDialog fieldset legend").length) { + sTitle = $("#gDialog fieldset legend:eq(0)").html(); } - $("#ui-dialog-title-gDialog").html(title); + $("#ui-dialog-title-gDialog").html(sTitle); if (parent.width() < 400) { parent.css("width", 400); } -- cgit v1.2.3