yii2-sortable icon indicating copy to clipboard operation
yii2-sortable copied to clipboard

Doesn't work without url rewrite

Open maxxer opened this issue 7 years ago • 1 comments

The $baseUrl property assumes /sort/ url is accessible, but if you don't have enablePrettyUrl = true it won't work

maxxer avatar Feb 02 '18 14:02 maxxer

More than this with the current behavior it won't work if the Yii app is not in the root of the webserver. I've changed the OrgSortableColumn initialization this way:

        $this->_origSortableColumn = Yii::createObject([
            'class' => OrigSortableColumn::className(),
            'grid' => $this->grid,
            'template' => $this->template,
            'buttons' => $this->buttons,
            'gridContainerId' => $this->gridContainerId,
            'confirmMove' => $this->confirmMove,
            'baseUrl' => Url::to([$this->baseUrl])."/",
        ]);

maxxer avatar Feb 02 '18 14:02 maxxer