Sha256: 376e28bc9cecf8aca587e5adf1b9e79264ac809221e6920f7170dce5c67e6418

Contents?: true

Size: 794 Bytes

Versions: 38

Compression:

Stored size: 794 Bytes

Contents

:coffeescript
  $ ->
    $('fieldset.sortable > ol').nestedSortable
      handle: 'div'
      items: 'li'
      toleranceElement: '> div'
      update: ->
        sortInputs = $("fieldset.sortable > ol input[name$='[priority]']")
        sortInputs.each (index) -> $(this).val index
      isAllowed: (item, parent) ->
        item   = $(item).attr('data-parent')
        parent = $(parent).attr('data-id')

        item == parent

= semantic_form_for [:admin, @terminal_profile], :html => { :multipart => true } do |f|
  = f.inputs :class => 'sortable', :style => 'padding: 0px; margin: 0px' do
    - @terminal_profile.terminal_profile_provider_groups.select{|x| x.provider_group.provider_group_id.blank?}.each_with_index do |g, i|
      = render 'tree', :entry => g, :level => 0

  = f.actions

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
smartkiosk-server-0.13.1 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.13 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.12.1 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.12 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.11 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.10 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.9 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.8 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.7 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.6 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.5 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.4 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.3 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.2 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11.1 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.11 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.10.19 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.10.18 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.10.17 app/views/admin/terminal_profiles/sort.html.haml
smartkiosk-server-0.10.16 app/views/admin/terminal_profiles/sort.html.haml