cause of the deleteFunction issue, the ajax support removed
This commit is contained in:
parent
5dcf5211a8
commit
f0906bf5c4
|
|
@ -124,6 +124,7 @@ class CategoryDataGrid extends DataGrid
|
|||
'route' => 'admin.catalog.categories.delete',
|
||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||
'icon' => 'icon trash-icon',
|
||||
'function' => 'deleteFunction($event, "delete")'
|
||||
]);
|
||||
|
||||
$this->addMassAction([
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.categories.list.before') !!}
|
||||
|
||||
<div class="page-content">
|
||||
<datagrid-plus src="{{ route('admin.catalog.categories.index') }}"></datagrid-plus>
|
||||
@inject('products', 'Webkul\Admin\DataGrids\CategoryDataGrid')
|
||||
{!! $products->render() !!}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.categories.list.after') !!}
|
||||
|
|
@ -30,6 +31,13 @@
|
|||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function reloadPage(getVar, getVal) {
|
||||
let url = new URL(window.location.href);
|
||||
url.searchParams.set(getVar, getVal);
|
||||
|
||||
window.location.href = url.href;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("input[type='checkbox']").change(deleteFunction);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ class CategoryController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->ajax()) {
|
||||
return app(CategoryDataGrid::class)->toJson();
|
||||
}
|
||||
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue