Permalink
Browse files

BUGFIX It is not possible to use more than one autosuggestion field f…

…rom GridFieldRelationAdd per view
  • Loading branch information...
1 parent 008ecf7 commit 9b3af77637fbd9c18e6fab59dafa435654bef35a @stojg stojg committed Jan 24, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 forms/gridfield/GridFieldRelationAdd.php
  2. +1 −1 javascript/GridFieldSearch.js
@@ -69,6 +69,7 @@ public function getHTMLFragments($gridField) {
// 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');
@@ -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);

0 comments on commit 9b3af77

Please sign in to comment.