Browse foreign values did not work with inline edit

Use known message "Browse foreign values" instead of "Search foreign
data"
Use jQuery to attach handler instead of "onclick" for
browse_foreigners.php when called from sql.php
This commit is contained in:
Marc Delisle
2010-12-24 07:50:42 -05:00
parent ef8687b5de
commit c72cc2c8f5
3 changed files with 52 additions and 7 deletions

View File

@@ -98,6 +98,16 @@ require_once './libraries/header_scripts.inc.php';
//<![CDATA[
self.focus();
function formupdate(fieldmd5, key) {
var $inline = window.opener.jQuery('.browse_foreign_clicked');
if ($inline.length != 0) {
$inline.removeClass('browse_foreign_clicked')
// puts new value in the previous element which is
// a span with class curr_value
.prev().text(key);
self.close();
return false;
}
if (opener && opener.document && opener.document.insertForm) {
var field = 'fields';