app/assets/javascripts/spina.coffee.erb in spina-template-0.4.0 vs app/assets/javascripts/spina.coffee.erb in spina-template-0.4.1

- old
+ new

@@ -28,15 +28,17 @@ $(document).on 'page:restore', -> NProgress.remove() # Clickable TR's $(document).on 'click', '.table-clickable tbody tr', (e) -> $row = $(this).closest('tr') - checkbox = $row.find('input[type="checkbox"]:first, input[type="radio"]:first') + $row.find('a.table-link:first')[0].click() +$(document).on 'click', '.table-clickable tbody tr td', (e) -> + checkbox = $(this).find('input[type="checkbox"]:first, input[type="radio"]:first') + if checkbox.length > 0 checkbox.prop("checked", !checkbox.prop("checked")) - else - $row.find('a.table-link:first')[0].click() + e.stopPropagation() $(document).on 'click', '.table-clickable tbody .table-link', (e) -> e.stopPropagation() $(document).on 'click', '.table-clickable tbody tr input', (e) -> \ No newline at end of file