简体   繁体   English

Grocery Crud Bootstrap 主题 4:所有排序、分页和过滤都不起作用

[英]Grocery Crud Bootstrap Theme 4: every sorting, paging and filtering do not work

I have successfully installed and used Grocery Crud on a project in Codeigniter;我已经在 Codeigniter 的一个项目上成功安装并使用了 Grocery Crud; the default theme works properly.默认主题正常工作。 I bought and installed the newest theme Bootstrap 4, and i have many troubles.我购买并安装了最新的主题Bootstrap 4,我遇到了很多麻烦。 The table is properly rendered as well as the forms for editing and inserting new rows.该表格以及用于编辑和插入新行的表格均已正确呈现。 But every button, whatever is the action behind, is not working: no paging working, no filtering, no columns sorting.但是每个按钮,无论背后的操作是什么,都不起作用:没有分页工作,没有过滤,没有列排序。 I have also tried to unset我也试过取消设置

    $crud->unset_bootstrap();
    $crud->unset_jquery();

as suggested somewhere.正如某处所建议的那样。 Any idea?任何的想法?

Solution from Jhon, the Grocery Crud creator来自 Grocery Crud 创建者 Jhon 的解决方案

It seems that the base_url is already defined at your template and that is the error that you are getting on the chrome console.似乎 base_url 已在您的模板中定义,这就是您在 chrome 控制台上遇到的错误。 In order to solve this issue go to:为了解决这个问题去:

assets/grocery_crud/themes/bootstrap-v4/views/list_template.php资产/grocery_crud/themes/bootstrap-v4/views/list_template.php

and change the line at around line 85:并更改第 85 行附近的行:

var base_url = ''; var base_url = '';

with this (we are basically just removing the var):有了这个(我们基本上只是删除了var):

base_url = ''; base_url = '';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM