mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX It is not possible to use more than one autosuggestion field from GridFieldRelationAdd per view
This commit is contained in:
parent
008ecf750a
commit
9b3af77637
@ -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');
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user