bug 981939 and problem with db dropdown in original theme

This commit is contained in:
Marc Delisle
2004-07-05 13:18:08 +00:00
parent 750890b04d
commit 03f052c23a
4 changed files with 26 additions and 10 deletions

View File

@@ -30,18 +30,28 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
$num_tables_disp = ' (-)';
}
?>
var dbBoxSetupDone = false;
function dbBoxSetup() {
if (dbBoxSetupDone != true) {
if (parent.frames.queryframe && parent.frames.queryframe.document.left && parent.frames.queryframe.document.left.lightm_db) {
parent.frames.queryframe.document.left.lightm_db.value = '<?php echo addslashes($db); ?>';
dbBoxSetupDone = true;
} else {
setTimeout("dbBoxSetup();",500);
}
}
}
if (parent.frames.queryframe && parent.frames.queryframe.document && parent.frames.queryframe.document.queryframeform) {
parent.frames.queryframe.document.queryframeform.db.value = "<?php echo (isset($db) ? addslashes($db) : ''); ?>";
parent.frames.queryframe.document.queryframeform.table.value = "<?php echo (isset($table) ? addslashes($table) : ''); ?>";
}
if (parent.frames.queryframe && parent.frames.queryframe.document && parent.frames.queryframe.document.left) {
parent.frames.queryframe.document.left.lightm_db.value = "<?php echo (isset($db) ? addslashes($db) : ''); ?>";
for (i=0;i<parent.frames.queryframe.document.left.lightm_db.options.length;i++) {
if (parent.frames.queryframe.document.left.lightm_db.options[i].selected) {
noption=new Option("<?php echo addslashes($db) . $num_tables_disp; ?>","<?php echo addslashes($db); ?>");
parent.frames.queryframe.document.left.lightm_db.options[i]=noption;
parent.frames.queryframe.document.left.lightm_db.value = "<?php echo (isset($db) ? addslashes($db) : ''); ?>";
}
if (parent.frames.queryframe && parent.frames.queryframe.document && parent.frames.queryframe.document.left && parent.frames.queryframe.document.left.lightm_db) {
selidx = parent.frames.queryframe.document.left.lightm_db.selectedIndex;
if (parent.frames.queryframe.document.left.lightm_db.options[selidx].value == "<?php echo addslashes($db); ?>") {
parent.frames.queryframe.document.left.lightm_db.options[selidx].text = "<?php echo addslashes($db) . $num_tables_disp; ?>";
} else {
parent.frames.queryframe.location.reload();
setTimeout("dbBoxSetup();",2000);
}
}
<?php