Sha256: 5718251f6d5e158b5edec39022c7335314a6549326abdef049f4fd3a10153c70

Contents?: true

Size: 402 Bytes

Versions: 13

Compression:

Stored size: 402 Bytes

Contents

import createSortList from "src/decidim/admin/sort_list.component"

// Once in DOM
$(() => {
  const selector = ".js-sortable"
  const $sortable = $(selector)

  $sortable.each((index, elem) => {
    const item = (elem.id)
      ? `#${elem.id}`
      : selector

    createSortList(item, {
      handle: "li",
      forcePlaceholderSize: true,
      placeholderClass: "sort-placeholder"
    })
  })
})

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.4 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.29.0 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.3 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.29.0.rc4 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.29.0.rc3 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.29.0.rc2 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.29.0.rc1 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.2 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.1 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.0 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.0.rc5 app/packs/src/decidim/admin/sortable.js
decidim-admin-0.28.0.rc4 app/packs/src/decidim/admin/sortable.js