mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
FIX: Make sure inline adding to correct GridField
I work with nested GridFields, and without this the inline button adds to all GridFields that are nested within one.
This commit is contained in:
parent
4855ac5ec0
commit
a073707162
@ -90,7 +90,10 @@
|
|||||||
if(success) success.apply(grid, arguments);
|
if(success) success.apply(grid, arguments);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onaddnewinline: function() {
|
onaddnewinline: function(e) {
|
||||||
|
if(e.target != this[0])
|
||||||
|
return;
|
||||||
|
|
||||||
var tmpl = window.tmpl;
|
var tmpl = window.tmpl;
|
||||||
var row = this.find(".ss-gridfield-add-inline-template");
|
var row = this.find(".ss-gridfield-add-inline-template");
|
||||||
var num = this.data("add-inline-num") || 1;
|
var num = this.data("add-inline-num") || 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user