From 7aceb33643d0d09de12b564001b7531dc262baec Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 12 Apr 2006 11:50:19 +0000 Subject: [PATCH] fixed bug #1454874 Javascript error in new (not framed) print window --- ChangeLog | 2 ++ libraries/footer.inc.php | 38 +++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fcc1c164..943a9a449 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ $Id$ $Source$ 2006-04-12 Sebastian Mendel + * libraries/footer.inc.php: + fixed bug #1454874 Javascript error in new (not framed) print window * css\phpmyadmin.css.php, scripts\setup.php, test\theme.php themes\darkblue_orange\css\theme_right.css.php, themes\original\css\theme_right.css.php: diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index de1b17031..8fefe120e 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -24,12 +24,16 @@ if (! isset($GLOBALS['no_history']) && isset($GLOBALS['db']) && strlen($GLOBALS['db']) && empty($GLOBALS['error_message'])) { $table = isset($GLOBALS['table']) ? $GLOBALS['table'] : ''; ?> // updates current settings -window.parent.setAll('', '', '', '', ''); +if (window.parent.setAll) { + window.parent.setAll('', '', '', '', ''); +} // refresh navigation frame content -window.parent.refreshLeft(); +if (window.parent.refreshLeft) { + window.parent.refreshLeft(); +} // set current db, table and sql query in the querywindow -window.parent.reload_querywindow( - "", - "", - ""); +if (window.parent.refreshLeft) { + window.parent.reload_querywindow( + "", + "", + ""); +} @@ -61,16 +67,18 @@ if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.locat } -// reset content frame name, as querywindow needs to set a unique name -// before submitting form data, and navigation frame needs the original name -if (window.parent.frames[1].name != 'frame_content') { - window.parent.frames[1].name = 'frame_content'; +if (window.parent.frames[1]) { + // reset content frame name, as querywindow needs to set a unique name + // before submitting form data, and navigation frame needs the original name + if (window.parent.frames[1].name != 'frame_content') { + window.parent.frames[1].name = 'frame_content'; + } + if (window.parent.frames[1].id != 'frame_content') { + window.parent.frames[1].id = 'frame_content'; + } + //window.parent.frames[1].setAttribute('name', 'frame_content'); + //window.parent.frames[1].setAttribute('id', 'frame_content'); } -if (window.parent.frames[1].id != 'frame_content') { - window.parent.frames[1].id = 'frame_content'; -} -//window.parent.frames[1].setAttribute('name', 'frame_content'); -//window.parent.frames[1].setAttribute('id', 'frame_content'); //]]>