From c27f41aee4b62d5dbeb254e5677fc11f31fc5a52 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 11 Aug 2018 14:38:17 +0200 Subject: [PATCH] Don't use buttons in tables with full row select as this is confusing when clicking a button of a not selected row --- public/viewjs/recipes.js | 7 ++----- views/recipes.blade.php | 17 +++++++---------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/public/viewjs/recipes.js b/public/viewjs/recipes.js index 042b4968..3782634a 100644 --- a/public/viewjs/recipes.js +++ b/public/viewjs/recipes.js @@ -1,9 +1,6 @@ var recipesTables = $('#recipes-table').DataTable({ 'paginate': false, - 'order': [[1, 'asc']], - 'columnDefs': [ - { 'orderable': false, 'targets': 0 } - ], + 'order': [[0, 'asc']], 'language': JSON.parse(L('datatables_localization')), 'scrollY': false, 'colReorder': true, @@ -32,7 +29,7 @@ $("#search").on("keyup", function() recipesTables.search(value).draw(); }); -$(document).on('click', '.recipe-delete-button', function(e) +$("#selectedRecipeDeleteButton").on('click', function(e) { var objectName = $(e.currentTarget).attr('data-recipe-name'); var objectId = $(e.currentTarget).attr('data-recipe-id'); diff --git a/views/recipes.blade.php b/views/recipes.blade.php index 2cc5899a..1158519a 100644 --- a/views/recipes.blade.php +++ b/views/recipes.blade.php @@ -21,10 +21,9 @@ - +
- @@ -32,14 +31,6 @@ @foreach($recipes as $recipe) - @@ -63,6 +54,12 @@ +    + + + + +
# {{ $L('Name') }} {{ $L('Requirements fulfilled') }}
- - - - - - - {{ $recipe->name }}