diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 0517c896..e9eeffae 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -107,6 +107,11 @@ $(function() { return false; }); + // Disable action of disabled buttons + $(document).on('click', 'a.disabled', function() { + return false; + }); + // Show and hide loader on ajax callbacks $('*[data-remote]').bind('ajax:beforeSend', function() { $('#loader').show(); diff --git a/app/views/orders/index.html.haml b/app/views/orders/index.html.haml index c288de84..c705384a 100644 --- a/app/views/orders/index.html.haml +++ b/app/views/orders/index.html.haml @@ -57,7 +57,7 @@ = link_to t('.action_receive'), receive_order_path(order), class: 'btn btn-small btn-success' %td - = link_to t('ui.edit'), '#', class: 'btn btn-small disabled' + = link_to t('ui.edit'), '#', class: 'btn btn-small disabled', tabindex: -1 = link_to t('ui.show'), order, class: 'btn btn-small' = link_to t('ui.delete'), order, confirm: t('.confirm_delete'), method: :delete, class: 'btn btn-small btn-danger'