More javascript checks for querywindow.

This commit is contained in:
Garvin Hicking
2003-02-26 23:20:51 +00:00
parent 63c5582cba
commit bee0503ab7
2 changed files with 7 additions and 4 deletions

View File

@@ -19,7 +19,10 @@ $Source$
SQL-History. SQL-History.
Removed a dupe for inserting comments, fixed integrity check when Removed a dupe for inserting comments, fixed integrity check when
moving/renaming tables and keeping comments. moving/renaming tables and keeping comments.
* header.inc.php3: Added one more Javascript if-structure to make sure
the frameset is initialized when querying for an active window. Without
this, when starting phpMyAdmin for the first time, IE6 may complain
depending on the order it loads the framesets.
2003-02-25 Marc Delisle <lem9@users.sourceforge.net> 2003-02-25 Marc Delisle <lem9@users.sourceforge.net>
* db_details_structure.php3: undefined variable $comment * db_details_structure.php3: undefined variable $comment

View File

@@ -252,7 +252,7 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
} }
function reload_querywindow () { function reload_querywindow () {
if (top.frames.queryframe && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) { if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
<?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?> <?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>"; top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
@@ -268,9 +268,9 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
} }
function focus_querywindow() { function focus_querywindow() {
if (top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) { if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
top.frames.queryframe.querywindow.focus(); top.frames.queryframe.querywindow.focus();
} else { } else if (top.frames.queryframe) {
top.frames.queryframe.querywindow=window.open('querywindow.php3?<?php echo PMA_generate_common_url('', ''); ?>&db=<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>&table=<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>', 'js_querywindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>'); top.frames.queryframe.querywindow=window.open('querywindow.php3?<?php echo PMA_generate_common_url('', ''); ?>&db=<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>&table=<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>', 'js_querywindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>');
if (!top.frames.queryframe.querywindow.opener) { if (!top.frames.queryframe.querywindow.opener) {