diff --git a/javascript/ComplexTableField.js b/javascript/ComplexTableField.js index b50d9de0e..6904b3aea 100755 --- a/javascript/ComplexTableField.js +++ b/javascript/ComplexTableField.js @@ -16,7 +16,8 @@ ComplexTableField.prototype = { rules['#'+this.id+' table.data a.deletelink'] = {onclick: this.deleteRecord.bind(this)}; // invoke row action-link based on default-action set in classname - defaultAction = this.getDefaultAction(); + var defaultAction = this.getDefaultAction(); + if(defaultAction) { rules['#'+this.id+' table.data tbody td'] = { onclick: function(e) { @@ -27,6 +28,7 @@ ComplexTableField.prototype = { if (elt.tagName != 'TD' && elt.tagName != 'TR') { return; } + var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].href; this.openPopup(null, link); return false; diff --git a/templates/Includes/TableListField_Item.ss b/templates/Includes/TableListField_Item.ss index 734d78afa..e43b413f3 100755 --- a/templates/Includes/TableListField_Item.ss +++ b/templates/Includes/TableListField_Item.ss @@ -1,19 +1,19 @@ - class="$HighlightClasses"<% end_if %>> - <% if Markable %>$MarkingCheckbox<% end_if %> - <% control Fields %> - $Value - <% end_control %> - <% control Actions %> - - <% if IsAllowed %> - title="$TitleText"<% end_if %>> - <% if Icon %>$Label<% else %>$Label<% end_if %> - - <% else %> - - <% if IconDisabled %>$Label<% else %>$Label<% end_if %> - - <% end_if %> - - <% end_control %> - \ No newline at end of file + class="$HighlightClasses"<% end_if %>> + <% if Markable %>$MarkingCheckbox<% end_if %> + <% control Fields %> + $Value + <% end_control %> + <% control Actions %> + + <% if IsAllowed %> + title="$TitleText"<% end_if %>> + <% if Icon %>$Label<% else %>$Label<% end_if %> + + <% else %> + + <% if IconDisabled %>$Label<% else %>$Label<% end_if %> + + <% end_if %> + + <% end_control %> + \ No newline at end of file