Sha256: 2b2c74fe50ae5521b1f1863b22f4b2eafd54be4a6a2520e3fb913ec28cfac85f
Contents?: true
Size: 1.07 KB
Versions: 40
Compression:
Stored size: 1.07 KB
Contents
#= require jquery-ui/sortable #= require ./jquery.mjs.nestedSortable.js $ -> $('[data-sort-tree]').each -> $this = $(this) opts = $this.data('sort-tree') if $.isPlainObject( opts ) && opts.url url = opts.url delete opts.url else if (typeof opts == 'string') && opts != "" url = opts opts = {} unless url? || url == "" url = location.pathname + "/sort" defs = # disableNesting: 'no-nest' # handle: '[data-sort-tree-handle]' # listType: 'ol' forcePlaceholderSize: true helper: 'clone' items: '[data-sort-tree-item]' maxLevels: 2 opacity: .6 placeholder: 'sort-tree__placeholder' revert: 250 rootID: 'root' tabSize: 25 tolerance: 'pointer' toleranceElement: '[data-sort-tree-tolerance]' errorClass: 'sort-tree__error' update: -> serialized = $this.nestedSortable('serialize') $.ajax method: 'POST' url: url data: serialized $this.nestedSortable $.extend( {}, defs, opts ) return return
Version data entries
40 entries across 40 versions & 1 rubygems