BUGFIX Fixed drag link event handling on ComplexTableField.js (#4737)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93754 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-27 01:37:31 +00:00 committed by Sam Minnee
parent 6d9ea836c0
commit 73fb1acd65

View File

@ -20,6 +20,13 @@ ComplexTableField.prototype = {
if(defaultAction) {
rules['#'+this.id+' table.data tbody td'] = {
onclick: function(e) {
var elt = Event.element(e);
// Check the tag, as otherwise this
// function can take over checkbox
// click actions etc. See ticket #4737
if (elt.tagName != 'TD' && elt.tagName != 'TR') {
return;
}
var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].href;
this.openPopup(null, link);
return false;
@ -133,4 +140,4 @@ ComplexTableField.prototype = {
}
}
ComplexTableField.applyTo('div.ComplexTableField');
ComplexTableField.applyTo('div.ComplexTableField');