We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a8d1f4 + 9b952da commit 8e593f5Copy full SHA for 8e593f5
assets/files/js/sortable-widgets.js
@@ -4,8 +4,13 @@ function initSortableWidgets() {
4
handle: '.sortable-widget-handler',
5
dataIdAttr: 'data-sortable-id',
6
onEnd: function (e) {
7
- $.post($(this.el).parents('[data-sortable-widget=1]').data('sortable-url'), {
+ var context = $(this.el).parents('[data-sortable-widget=1]');
8
+ $.post(context.data('sortable-url'), {
9
sorting: this.toArray()
10
+ }).done(function () {
11
+ if (context.data('pjax')) {
12
+ $.pjax.reload({container: context.data('pjax-container'), timeout: context.data('pjax-timeout')})
13
+ }
14
});
15
}
16
0 commit comments