fixed bug #1454874 Javascript error in new (not framed) print window

This commit is contained in:
Sebastian Mendel
2006-04-12 11:50:19 +00:00
parent 12f2005466
commit 7aceb33643
2 changed files with 25 additions and 15 deletions

View File

@@ -6,6 +6,8 @@ $Id$
$Source$
2006-04-12 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* 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:

View File

@@ -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('<?php echo $GLOBALS['lang']; ?>', '<?php echo $GLOBALS['collation_connection']; ?>', '<?php echo $GLOBALS['server']; ?>', '<?php echo $GLOBALS['db']; ?>', '<?php echo $table; ?>');
if (window.parent.setAll) {
window.parent.setAll('<?php echo $GLOBALS['lang']; ?>', '<?php echo $GLOBALS['collation_connection']; ?>', '<?php echo $GLOBALS['server']; ?>', '<?php echo $GLOBALS['db']; ?>', '<?php echo $table; ?>');
}
<?php } ?>
<?php if (! empty($GLOBALS['reload'])) { ?>
// refresh navigation frame content
window.parent.refreshLeft();
if (window.parent.refreshLeft) {
window.parent.refreshLeft();
}
<?php } ?>
<?php
@@ -48,10 +52,12 @@ if (! isset($GLOBALS['no_history']) && empty($GLOBALS['error_message'])) {
}
?>
// set current db, table and sql query in the querywindow
window.parent.reload_querywindow(
if (window.parent.refreshLeft) {
window.parent.reload_querywindow(
"<?php echo isset($GLOBALS['db']) ? addslashes($GLOBALS['db']) : '' ?>",
"<?php echo isset($GLOBALS['table']) ? addslashes($GLOBALS['table']) : '' ?>",
"<?php echo isset($GLOBALS['sql_query']) ? urlencode($GLOBALS['sql_query']) : ''; ?>");
}
<?php } ?>
<?php if (! empty($GLOBALS['focus_querywindow'])) { ?>
@@ -61,16 +67,18 @@ if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.locat
}
<?php } ?>
// 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') {
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') {
}
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');
}
//window.parent.frames[1].setAttribute('name', 'frame_content');
//window.parent.frames[1].setAttribute('id', 'frame_content');
//]]>
</script>
<?php