Sha256: 33542de5e9fa07a9ac8e5efa1856bedd0e771a7f3df3728e186f17ae858d129d
Contents?: true
Size: 1.08 KB
Versions: 16
Compression:
Stored size: 1.08 KB
Contents
// = require jquery // = require jquery_ujs // = require foundation // = require ./tab_focus // = require ./toggle_nav // = require ./sort_list.component // = require decidim/editor // = require foundation-datepicker // = require form_datepicker // = require moment.min // = require_self window.Decidim = window.Decidim || {}; const pageLoad = () => { const { toggleNav, createSortList } = window.DecidimAdmin; $(document).foundation(); toggleNav(); createSortList('#steps tbody', { placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4"> </td></tr>')[0], onSortUpdate: ($children) => { const sortUrl = $('#steps tbody').data('sort-url') const order = $children.map((index, child) => $(child).data('id')).toArray(); $.ajax({ method: 'POST', url: sortUrl, contentType: 'application/json', data: JSON.stringify({ items_ids: order }) }, // eslint-disable-line camelcase ); } }) }; $(() => { pageLoad(); if (window.Decidim.formDatePicker) { window.Decidim.formDatePicker(); } });
Version data entries
16 entries across 16 versions & 2 rubygems