correctly fix browse foreigners popup for search page
This commit is contained in:
@@ -49,9 +49,9 @@ PMA_setFontSizes();
|
|||||||
opener.document.insertForm.elements['field_' + field + '<?php echo (isset($pk) ? '[multi_edit][' . urlencode($pk) . ']' : ''); ?>[]'].value = key;
|
opener.document.insertForm.elements['field_' + field + '<?php echo (isset($pk) ? '[multi_edit][' . urlencode($pk) . ']' : ''); ?>[]'].value = key;
|
||||||
self.close();
|
self.close();
|
||||||
return false;
|
return false;
|
||||||
} else if (opener.document.insertForm.elements['field_' + field + '[1]']) {
|
} else if (opener.document.insertForm.elements['field_' + field + '[<?php echo isset($fieldkey) ? $fieldkey : 0; ?>]']) {
|
||||||
// Search form
|
// Search form
|
||||||
opener.document.insertForm.elements['field_' + field + '[1]'].value = key;
|
opener.document.insertForm.elements['field_' + field + '[<?php echo isset($fieldkey) ? $fieldkey : 0; ?>]'].value = key;
|
||||||
self.close();
|
self.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -87,6 +87,7 @@ require('./libraries/get_foreign.lib.php');
|
|||||||
<form action="browse_foreigners.php" method="post">
|
<form action="browse_foreigners.php" method="post">
|
||||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||||
<input type="hidden" name="field" value="<?php echo urlencode($field); ?>" />
|
<input type="hidden" name="field" value="<?php echo urlencode($field); ?>" />
|
||||||
|
<input type="hidden" name="field" value="<?php echo isset($fieldkey) ? $fieldkey : ''; ?>" />
|
||||||
<?php
|
<?php
|
||||||
if (isset($pk)) {
|
if (isset($pk)) {
|
||||||
$pk_uri = '&pk=' . urlencode($pk);
|
$pk_uri = '&pk=' . urlencode($pk);
|
||||||
@@ -112,7 +113,7 @@ $nbTotalPage = @ceil($the_total / $session_max_rows);
|
|||||||
|
|
||||||
if ($the_total > $per_page) {
|
if ($the_total > $per_page) {
|
||||||
$gotopage = '<br />' . $GLOBALS['strPageNumber']
|
$gotopage = '<br />' . $GLOBALS['strPageNumber']
|
||||||
. '<select name="goToPage" onchange="goToUrl(this, \'browse_foreigners.php?field=' . urlencode($field) . '&' . PMA_generate_common_url($db, $table) . $pk_uri . '&\');">';
|
. '<select name="goToPage" onchange="goToUrl(this, \'browse_foreigners.php?field=' . urlencode($field) . '&' . PMA_generate_common_url($db, $table) . $pk_uri . '&fieldkey=' . (isset($fieldkey) ? $fieldkey : '') . '&\');">';
|
||||||
if ($nbTotalPage < 200) {
|
if ($nbTotalPage < 200) {
|
||||||
$firstPage = 1;
|
$firstPage = 1;
|
||||||
$lastPage = $nbTotalPage;
|
$lastPage = $nbTotalPage;
|
||||||
|
@@ -830,7 +830,7 @@ function insertValueQuery() {
|
|||||||
/**
|
/**
|
||||||
* listbox redirection
|
* listbox redirection
|
||||||
*/
|
*/
|
||||||
function goToUrl(selObj, goToLocation){
|
function goToUrl(selObj, goToLocation) {
|
||||||
eval("document.location.href = '" + goToLocation + "pos=" + selObj.options[selObj.selectedIndex].value + "'");
|
eval("document.location.href = '" + goToLocation + "pos=" + selObj.options[selObj.selectedIndex].value + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -279,7 +279,7 @@ function PMA_tbl_select_operator(f, index, multiple) {
|
|||||||
?>
|
?>
|
||||||
<input type="text" name="fields[<?php echo $i; ?>]" id="field_<?php echo md5($field); ?>[<?php echo $i; ?>]" class="textfield" />
|
<input type="text" name="fields[<?php echo $i; ?>]" id="field_<?php echo md5($field); ?>[<?php echo $i; ?>]" class="textfield" />
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
document.writeln('<a target="_blank" onclick="window.open(this.href, \'foreigners\', \'width=640,height=240,scrollbars=yes\'); return false" href="browse_foreigners.php?<?php echo PMA_generate_common_url($db, $table); ?>&field=<?php echo urlencode($field); ?>"><?php echo str_replace("'", "\'", $titles['Browse']); ?></a>');
|
document.writeln('<a target="_blank" onclick="window.open(this.href, \'foreigners\', \'width=640,height=240,scrollbars=yes\'); return false" href="browse_foreigners.php?<?php echo PMA_generate_common_url($db, $table); ?>&field=<?php echo urlencode($field); ?>&fieldkey=<?php echo $i; ?>"><?php echo str_replace("'", "\'", $titles['Browse']); ?></a>');
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
} else if (strncasecmp($fields_type[$i], 'enum', 4) == 0) {
|
} else if (strncasecmp($fields_type[$i], 'enum', 4) == 0) {
|
||||||
|
Reference in New Issue
Block a user