Showing
2 changed files
with
22 additions
and
16 deletions
| ... | ... | @@ -2177,23 +2177,29 @@ jQuery(document).ready(function(){ |
| 2177 | 2177 | }); |
| 2178 | 2178 | |
| 2179 | 2179 | $('.dropdown-toggle').dropdown(); |
| 2180 | - $('.nestable-page-list').nestable({ | |
| 2181 | - group: 1 | |
| 2182 | - }).on('change', function(){ | |
| 2183 | - var url = $(this).data('sort-url'); | |
| 2184 | - | |
| 2185 | - jQuery.ajax({ | |
| 2186 | - type: 'POST', | |
| 2187 | - url: url, | |
| 2188 | - dataType: 'json', | |
| 2189 | - data: {sort: $('.nestable-page-list').nestable('serialize')}, | |
| 2190 | - success: function(data){ | |
| 2180 | + $('.nestable-page-list').each(function(){ | |
| 2181 | + var $wrapper = $(this); | |
| 2191 | 2182 | |
| 2192 | - } | |
| 2193 | - }); | |
| 2183 | + $wrapper.nestable({ | |
| 2184 | + group: 1 | |
| 2185 | + }).on('change', function(){ | |
| 2186 | + var url = $(this).data('sort-url'); | |
| 2187 | + | |
| 2188 | + jQuery.ajax({ | |
| 2189 | + type: 'POST', | |
| 2190 | + url: url, | |
| 2191 | + dataType: 'json', | |
| 2192 | + data: {sort: $wrapper.nestable('serialize')}, | |
| 2193 | + success: function(data){ | |
| 2194 | + | |
| 2195 | + } | |
| 2196 | + }); | |
| 2197 | + | |
| 2198 | + console.log($wrapper.nestable('serialize')); | |
| 2199 | + }); // activate Nestable for list 2 | |
| 2200 | + | |
| 2201 | + }); | |
| 2194 | 2202 | |
| 2195 | - console.log($('.nestable-page-list').nestable('serialize')); | |
| 2196 | - }); // activate Nestable for list 2 | |
| 2197 | 2203 | |
| 2198 | 2204 | $('body').on( 'click', function(e) { |
| 2199 | 2205 | $('[data-toggle=popover], .popover-link').each(function () { | ... | ... |