mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 15:05:39 +00:00
Applies changes from silverstripe-australia/silverstripe-gridfieldextensions#177
JS fix for "Initialising button before attempting to enable or disable it" Thanks @JackOconnor21
This commit is contained in:
parent
1b5e83b7f6
commit
cbcb6e57e0
@ -239,9 +239,9 @@
|
|||||||
var btn = this.parents(".ss-gridfield-add-new-multi-class").find(".ss-ui-button");
|
var btn = this.parents(".ss-gridfield-add-new-multi-class").find(".ss-ui-button");
|
||||||
|
|
||||||
if(this.val() && this.val().length) {
|
if(this.val() && this.val().length) {
|
||||||
btn.button("enable");
|
btn.button().button("enable");
|
||||||
} else {
|
} else {
|
||||||
btn.button("disable");
|
btn.button().button("disable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $itemRequestClass = 'SilverStripe\\Forms\\GridField\\GridFieldAddNewMultiClassHandler';
|
protected $itemRequestClass = 'SilverStripe\\GridFieldExtensions\\GridFieldAddNewMultiClassHandler';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $fragment the fragment to render the button in
|
* @param string $fragment the fragment to render the button in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user