table drag and drop: keep row width
This commit is contained in:
parent
7fcb2699b8
commit
0f02b440d4
1 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,13 @@ class App.ControllerTable extends App.Controller
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
forcePlaceholderSize: true
|
forcePlaceholderSize: true
|
||||||
items: 'tr'
|
items: 'tr'
|
||||||
|
helper: (e, tr) ->
|
||||||
|
originals = tr.children()
|
||||||
|
helper = tr.clone()
|
||||||
|
helper.children().each (index) ->
|
||||||
|
# Set helper cell sizes to match the original sizes
|
||||||
|
$(this).width( originals.eq(index).outerWidth() )
|
||||||
|
return helper
|
||||||
update: @dndCallback
|
update: @dndCallback
|
||||||
@el.find('table > tbody').sortable(dndOptions)
|
@el.find('table > tbody').sortable(dndOptions)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue