diff --git a/LICENSE-ICONS-3RD-PARTY.json b/LICENSE-ICONS-3RD-PARTY.json index 5172a8284..2877461d9 100644 --- a/LICENSE-ICONS-3RD-PARTY.json +++ b/LICENSE-ICONS-3RD-PARTY.json @@ -1,4 +1,14 @@ { + "draggable.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, + "zammad.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, "website.svg": { "author": "Pickin Studio", "url": "https:\/\/thenounproject.com\/search\/?q=website&i=16523", diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index 2444c798b..a9656dcaa 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -40,6 +40,13 @@ class App.ControllerTable extends App.Controller opacity: 0.6 forcePlaceholderSize: true 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 @el.find('table > tbody').sortable(dndOptions) @@ -285,6 +292,7 @@ class App.ControllerTable extends App.Controller class: @class destroy: destroy callbacks: @callbackAttributes + sortable: @dndCallback ) # convert to jquery object diff --git a/app/assets/javascripts/app/views/generic/checkbox.jst.eco b/app/assets/javascripts/app/views/generic/checkbox.jst.eco index e67ed3243..4576fab6f 100644 --- a/app/assets/javascripts/app/views/generic/checkbox.jst.eco +++ b/app/assets/javascripts/app/views/generic/checkbox.jst.eco @@ -1,5 +1,10 @@
<% for row in @attribute.options: %> - + <% end %>
\ No newline at end of file diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index 322af181b..6bbf33c01 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -1,6 +1,9 @@ "> + <% if @sortable: %> + + <% end %> <% if @checkbox: %> + <% if @sortable: %> + + <% end %> <% if @checkbox: %>
<%- @Icon('draggable') %>