Skip to content
Browse files

bug #3411038 Zoom search and inserting foreign values

  • Loading branch information...
1 parent 4a48e5d commit dcc9b2c71f0141a08a64584e2549fd12d5c60285 @lem9 lem9 committed Jan 8, 2012
Showing with 10 additions and 2 deletions.
  1. +5 −1 browse_foreigners.php
  2. +5 −1 libraries/tbl_select.lib.php
View
6 browse_foreigners.php
@@ -95,9 +95,13 @@ function formupdate(fieldmd5, key) {
var $inline = window.opener.jQuery('.browse_foreign_clicked');
if ($inline.length != 0) {
$inline.removeClass('browse_foreign_clicked')
+ // for grid editing,
// puts new value in the previous element which is
// a span with class curr_value
- .prev().text(key);
+ .prev('.curr_value').text(key);
+ // for zoom-search editing, puts new value in the previous
+ // element which is an input field
+ $inline.prev('input[type=text]').val(key);
self.close();
return false;
}
View
6 libraries/tbl_select.lib.php
@@ -167,7 +167,11 @@ class="textfield" />' ;
$str .= <<<EOT
<a target="_blank" onclick="window.open(this.href, 'foreigners', 'width=640,height=240,scrollbars=yes'); return false" href="browse_foreigners.php?
EOT;
- $str .= '' . PMA_generate_common_url($db, $table) . '&amp;field=' . urlencode($field) . '&amp;fieldkey=' . $i . '">' . str_replace("'", "\'", $titles['Browse']) . '</a>';
+ $str .= '' . PMA_generate_common_url($db, $table) . '&amp;field=' . urlencode($field) . '&amp;fieldkey=' . $i . '"';
+ if ($in_edit) {
+ $str .= ' class="browse_foreign"';
+ }
+ $str .= '>' . str_replace("'", "\'", $titles['Browse']) . '</a>';
// ]]
$str .= '</script>';

0 comments on commit dcc9b2c

Please sign in to comment.
Something went wrong with that request. Please try again.