diff options
-rw-r--r-- | lib/extensions/jquery.jtable.record-actions.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/extensions/jquery.jtable.record-actions.js b/lib/extensions/jquery.jtable.record-actions.js index 5f221c2..eaef5db 100644 --- a/lib/extensions/jquery.jtable.record-actions.js +++ b/lib/extensions/jquery.jtable.record-actions.js @@ -130,12 +130,16 @@ $a.html(fieldItem.text); } - if(fieldItem.action && (fieldItem.enabled && fieldItem.enabled({ record: record }))) { - $a.click(function(){ - fieldItem.action({ - record: record - }); - }); + if (fieldItem.action) { + $a.click(function (e) { + e.preventDefault(); + + if (!$(this).closest('li').hasClass('disabled')) { + fieldItem.action({ + record: record + }); + } + }); } $a.appendTo($li); |