BUGFIX It is not possible to use more than one autosuggestion field from GridFieldRelationAdd per view

This commit is contained in:
Stig Lindqvist 2012-01-24 18:37:00 +01:00
parent 008ecf750a
commit 9b3af77637
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ class GridFieldRelationAdd implements GridField_HTMLProvider, GridField_ActionPr
// Apparently the data-* needs to be double qouted for the jQuery.meta data plugin
//
$searchField->setAttribute('data-search-url', '\''.Controller::join_links($gridField->Link('search').'\''));
$searchField->addExtraClass('relation-search');
$findAction = new GridField_Action($gridField, 'gridfield_relationfind', 'Find', 'find', 'find');
$addAction = new GridField_Action($gridField, 'gridfield_relationadd', 'Add Relation', 'addto', 'addto');

View File

@ -1,6 +1,6 @@
jQuery(function($){
$(document).delegate("#gridfield_relationsearch", "focus", function (event) {
$(document).delegate(".ss-gridfield .relation-search", "focus", function (event) {
$(this).autocomplete({
source: function(request, response){
var searchField = $(this.element);