Skip to content

Commit

Permalink
listview widget reload fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jirisvoboda committed Mar 19, 2016
1 parent 48079cc commit 546985b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions widgets/ListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ protected function initSortable()
$view = $this->getView();
$view->registerJs("jQuery('#{$this->id}').SortableListView('{$url}', {$options});");

$reload = ArrayHelper::getValue($this->sortable, 'reload', true);
$reload = ArrayHelper::getValue($this->sortable, 'reload', false);

if ($reload)
{
$view->registerJs("jQuery('#{$this->id}').on('sortableSuccess', function() {jQuery.pjax.reload(".json_encode($this->clientOptions).")})", \yii\web\View::POS_END);
$view->registerJs("jQuery('#{$this->id}').on('sortableSuccess', $reload)", \yii\web\View::POS_END);
}

ListViewSortableAsset::register($view);
Expand Down

0 comments on commit 546985b

Please sign in to comment.