From ecdca2f202e0e03ae9b2e05bc3e6d9f13acf69ca Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 14 Mar 2016 23:18:53 +0100 Subject: [PATCH] Fixed delete if sortable is active. --- .../app/controllers/_application_controller_table.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index a297a0424..67d4e1b2b 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -292,7 +292,7 @@ class App.ControllerTable extends App.Controller class: @class destroy: destroy callbacks: @callbackAttributes - sortable: @dndCallback + sortable: @dndCallback ) # convert to jquery object @@ -308,9 +308,11 @@ class App.ControllerTable extends App.Controller for name, item of @bindCol if item.events position = 0 + if @dndCallback + position += 1 if @checkbox position += 1 - hit = false + hit = false for headerName in @headers if !hit