mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE: Don't automatically set a default action on complex table fiels. It leads to too many accidental clicks when trying to click a non-default action. Still allow for people to explicitly select a default action. (from r88961)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89205 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
96e449225e
commit
dbe0cd925e
@ -14,10 +14,10 @@ ComplexTableField.prototype = {
|
|||||||
|
|
||||||
// Assume that the delete link uses the deleteRecord method
|
// Assume that the delete link uses the deleteRecord method
|
||||||
rules['#'+this.id+' table.data a.deletelink'] = {onclick: this.deleteRecord.bind(this)};
|
rules['#'+this.id+' table.data a.deletelink'] = {onclick: this.deleteRecord.bind(this)};
|
||||||
rules['#'+this.id+' table.data tbody td'] = {onclick: this.openPopup.bind(this)};
|
|
||||||
|
|
||||||
// invoke row action-link based on default-action set in classname
|
// invoke row action-link based on default-action set in classname
|
||||||
if(typeof defaultAction != 'undefined' && defaultAction) {
|
defaultAction = this.getDefaultAction();
|
||||||
|
if(defaultAction) {
|
||||||
rules['#'+this.id+' table.data tbody td'] = {
|
rules['#'+this.id+' table.data tbody td'] = {
|
||||||
onclick: function(e) {
|
onclick: function(e) {
|
||||||
var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].getAttribute('href');
|
var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].getAttribute('href');
|
||||||
|
Loading…
Reference in New Issue
Block a user