bug #1477576 with rtl langs, navi links open in wrong frame
This commit is contained in:
@@ -6,8 +6,9 @@ $Id$
|
||||
$Source$
|
||||
|
||||
2006-07-03 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* libraries/footer.inc.php: bug #1477576 with rtl langs, navi links open in
|
||||
wrong frame
|
||||
* index.php, js\querywindow.js, querywindow.php, libraries\common.lib.php,
|
||||
libraries\footer.inc.php, libraries\sql_query_form.lib.php:
|
||||
bug #1477576 with rtl langs, navi links open in wrong frame
|
||||
|
||||
2006-07-02 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* db_operations.php: undefined $table when copying a db
|
||||
|
@@ -128,6 +128,13 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
|
||||
var db = '<?php echo $GLOBALS['db']; ?>';
|
||||
var text_dir = '<?php echo $GLOBALS['text_dir']; ?>';
|
||||
var pma_absolute_uri = '<?php echo $GLOBALS['cfg']['PmaAbsoluteUri']; ?>';
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
var frame_content = window.frames[1];
|
||||
var frame_navigation = window.frames[0];
|
||||
<?php } else { ?>
|
||||
var frame_content = window.frames[0];
|
||||
var frame_navigation = window.frames[1];
|
||||
<?php } ?>
|
||||
// ]]>
|
||||
</script>
|
||||
<script src="./js/querywindow.js" type="text/javascript" language="javascript">
|
||||
|
@@ -22,7 +22,7 @@ function setDb( new_db ) {
|
||||
var old_db = db;
|
||||
db = new_db;
|
||||
|
||||
if ( window.frames[0].document.getElementById(db) == null ) {
|
||||
if ( window.frame_navigation.document.getElementById(db) == null ) {
|
||||
// db is unknown, reload complete left frame
|
||||
refreshLeft();
|
||||
} else {
|
||||
@@ -50,7 +50,7 @@ function setTable( new_table ) {
|
||||
|
||||
table = new_table;
|
||||
|
||||
if ( window.frames[0].document.getElementById( db + '.' + table ) == null
|
||||
if ( window.frame_navigation.document.getElementById( db + '.' + table ) == null
|
||||
&& table != '' ) {
|
||||
// table is unknown, reload complete left frame
|
||||
refreshLeft();
|
||||
@@ -114,13 +114,13 @@ function removeClass(element, classname)
|
||||
|
||||
function unmarkDbTable(db, table)
|
||||
{
|
||||
var element_reference = window.frames[0].document.getElementById(db);
|
||||
var element_reference = window.frame_navigation.document.getElementById(db);
|
||||
if (element_reference != null) {
|
||||
//alert('remove from: ' + db);
|
||||
removeClass(element_reference.parentNode, 'marked');
|
||||
}
|
||||
|
||||
element_reference = window.frames[0].document.getElementById(db + '.' + table);
|
||||
element_reference = window.frame_navigation.document.getElementById(db + '.' + table);
|
||||
if (element_reference != null) {
|
||||
//alert('remove from: ' + db + '.' + table);
|
||||
removeClass(element_reference.parentNode, 'marked');
|
||||
@@ -129,7 +129,7 @@ function unmarkDbTable(db, table)
|
||||
|
||||
function markDbTable(db, table)
|
||||
{
|
||||
var element_reference = window.frames[0].document.getElementById(db);
|
||||
var element_reference = window.frame_navigation.document.getElementById(db);
|
||||
if (element_reference != null) {
|
||||
addClass(element_reference.parentNode, 'marked');
|
||||
// scrolldown
|
||||
@@ -138,7 +138,7 @@ function markDbTable(db, table)
|
||||
element_reference.blur();
|
||||
}
|
||||
|
||||
element_reference = window.frames[0].document.getElementById(db + '.' + table);
|
||||
element_reference = window.frame_navigation.document.getElementById(db + '.' + table);
|
||||
if (element_reference != null) {
|
||||
addClass(element_reference.parentNode, 'marked');
|
||||
// scrolldown
|
||||
@@ -148,7 +148,7 @@ function markDbTable(db, table)
|
||||
}
|
||||
|
||||
// return to main frame ...
|
||||
window.frames[1].focus();
|
||||
window.frame_content.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -172,8 +172,8 @@ function setAll( new_lang, new_collation_connection, new_server, new_db, new_tab
|
||||
db = new_db;
|
||||
table = new_table;
|
||||
|
||||
if ( window.frames[0].document.getElementById( db ) == null
|
||||
&& window.frames[0].document.getElementById( db + '.' + table ) == null ) {
|
||||
if ( window.frame_navigation.document.getElementById( db ) == null
|
||||
&& window.frame_navigation.document.getElementById( db + '.' + table ) == null ) {
|
||||
// table or db is unknown, reload complete left frame
|
||||
refreshLeft();
|
||||
} else {
|
||||
@@ -292,20 +292,12 @@ function refreshQuerywindow( url ) {
|
||||
function goTo( targeturl, target ) {
|
||||
//alert('goto');
|
||||
if ( target == 'main' ) {
|
||||
if (text_dir == 'ltr') {
|
||||
target = window.frames[1];
|
||||
} else {
|
||||
target = window.frames[0];
|
||||
}
|
||||
target = window.frame_content;
|
||||
} else if ( target == 'query' ) {
|
||||
target = querywindow;
|
||||
//return open_querywindow( targeturl );
|
||||
} else if ( ! target ) {
|
||||
if (text_dir == 'ltr') {
|
||||
target = window.frames[0];
|
||||
} else {
|
||||
target = window.frames[1];
|
||||
}
|
||||
target = window.frame_content;
|
||||
}
|
||||
|
||||
if ( target ) {
|
||||
@@ -336,8 +328,8 @@ function openDb( new_db ) {
|
||||
|
||||
function updateTableTitle( table_link_id, new_title ) {
|
||||
//alert('updateTableTitle');
|
||||
if ( window.parent.frames[0].document.getElementById(table_link_id) ) {
|
||||
var left = window.parent.frames[0].document;
|
||||
if ( window.parent.frame_navigation.document.getElementById(table_link_id) ) {
|
||||
var left = window.parent.frame_navigation.document;
|
||||
left.getElementById(table_link_id).title = new_title;
|
||||
new_title = left.getElementById('icon_' + table_link_id).alt + ': ' + new_title;
|
||||
left.getElementById('browse_' + table_link_id).title = new_title;
|
||||
|
@@ -1386,7 +1386,7 @@ if (!defined('PMA_MINIMUM_COMMON')) {
|
||||
<script type="text/javascript" language="javascript">
|
||||
//<![CDATA[
|
||||
if (typeof(window.parent) != 'undefined'
|
||||
&& typeof(window.parent.frames[0]) != 'undefined') {
|
||||
&& typeof(window.parent.frame_navigation) != 'undefined') {
|
||||
window.parent.goTo('<?php echo $reload_url; ?>');
|
||||
}
|
||||
//]]>
|
||||
|
@@ -65,26 +65,19 @@ if (window.parent.refreshLeft) {
|
||||
if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
|
||||
self.focus();
|
||||
}
|
||||
<?php }
|
||||
<?php } ?>
|
||||
|
||||
if ($GLOBALS['text_dir'] === 'ltr') {
|
||||
$mainframe_number = 1;
|
||||
} else {
|
||||
$mainframe_number = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
if (window.parent.frames[<?php echo $mainframe_number; ?>]) {
|
||||
if (window.parent.frame_content) {
|
||||
// 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[<?php echo $mainframe_number; ?>].name != 'frame_content') {
|
||||
window.parent.frames[<?php echo $mainframe_number; ?>].name = 'frame_content';
|
||||
if (window.parent.frame_content.name != 'frame_content') {
|
||||
window.parent.frame_content.name = 'frame_content';
|
||||
}
|
||||
if (window.parent.frames[<?php echo $mainframe_number; ?>].id != 'frame_content') {
|
||||
window.parent.frames[<?php echo $mainframe_number; ?>].id = 'frame_content';
|
||||
if (window.parent.frame_content.id != 'frame_content') {
|
||||
window.parent.frame_content.id = 'frame_content';
|
||||
}
|
||||
//window.parent.frames[<?php echo $mainframe_number; ?>].setAttribute('name', 'frame_content');
|
||||
//window.parent.frames[<?php echo $mainframe_number; ?>].setAttribute('id', 'frame_content');
|
||||
//window.parent.frame_content.setAttribute('name', 'frame_content');
|
||||
//window.parent.frame_content.setAttribute('id', 'frame_content');
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
@@ -104,9 +104,9 @@ function PMA_sqlQueryForm($query = true, $display_tab = false)
|
||||
?>
|
||||
<form method="post" id="sqlqueryform" target="frame_content"
|
||||
action="import.php"<?php echo $enctype; ?> name="sqlform"
|
||||
onsubmit="var save_name = window.opener.parent.frames[1].name;
|
||||
window.opener.parent.frames[1].name = save_name + '<?php echo time(); ?>';
|
||||
this.target = window.opener.parent.frames[1].name;
|
||||
onsubmit="var save_name = window.opener.parent.frame_content.name;
|
||||
window.opener.parent.frame_content.name = save_name + '<?php echo time(); ?>';
|
||||
this.target = window.opener.parent.frame_content.name;
|
||||
return checkSqlQuery( this );" >
|
||||
<?php
|
||||
} else {
|
||||
@@ -223,7 +223,7 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false)
|
||||
. '?' . PMA_generate_common_url($db) . '"';
|
||||
if ($is_querywindow) {
|
||||
$strDBLink .= ' target="_self"'
|
||||
. ' onclick="this.target=window.opener.frames[1].name"';
|
||||
. ' onclick="this.target=window.opener.frame_content.name"';
|
||||
}
|
||||
$strDBLink .= '>'
|
||||
. htmlspecialchars($db) . '</a>';
|
||||
@@ -248,7 +248,7 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false)
|
||||
. '?' . PMA_generate_common_url($db) . '"';
|
||||
if ($is_querywindow) {
|
||||
$strDBLink .= ' target="_self"'
|
||||
. ' onclick="this.target=window.opener.frames[1].name"';
|
||||
. ' onclick="this.target=window.opener.frame_content.name"';
|
||||
}
|
||||
$strDBLink .= '>'
|
||||
. htmlspecialchars($db) . '</a>';
|
||||
|
@@ -56,7 +56,7 @@ require_once('./libraries/header_meta_style.inc.php');
|
||||
<script type="text/javascript" language="javascript">
|
||||
//<![CDATA[
|
||||
function query_auto_commit() {
|
||||
document.getElementById( 'sqlqueryform' ).target = window.opener.frames[1].name;
|
||||
document.getElementById( 'sqlqueryform' ).target = window.opener.frame_content.name;
|
||||
document.getElementById( 'sqlqueryform' ).submit();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user