Sha256: 992aaaaadb4cc8f98b5c6b13add38b1817f0c9d33c2c883201e508ec43e8bbb9

Contents?: true

Size: 791 Bytes

Versions: 1

Compression:

Stored size: 791 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.blank?}.each_with_index do |g, i|
      = render 'tree', :entry => g, :level => 0

  = f.actions

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smartkiosk-server-0.9.0 app/views/admin/terminal_profiles/sort.html.haml