summaryrefslogtreecommitdiff
path: root/lib/gallery.dialog.js
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-01-12 07:57:13 +0000
committerChad Kieffer <chad@2tbsp.com>2009-01-12 07:57:13 +0000
commit42e635bff0948e3a8e7dc0003d17e709b7db2ce3 (patch)
tree97a530281a99306a0e77b0eb30820ef47261a7e1 /lib/gallery.dialog.js
parentf4d5681faa0f17a402f387b2b4ea201e9b2f9615 (diff)
Theme admin refinement. Make more room to show the preview by enlarging the iframe and removing the heading above it.
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r--lib/gallery.dialog.js10
1 files changed, 6 insertions, 4 deletions
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 = '<div id="gDialog"></div>';
$("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);
}