Error:
Fatal error: Call to undefined method grocery_CRUD::set_js_lib() in assets/grocery_crud/themes/custom_checkbox_flexigrid/views/list_template.php on line 3
Code:
$this->set_css($this->default_theme_path.'/custom_checkbox_flexigrid/css/flexigrid.css');
$this->set_js_lib($this->default_javascript_path.'/'.grocery_CRUD::JQUERY);
$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/jquery.noty.js');
$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/config/jquery.noty.config.js');
$this->set_js_lib($this->default_javascript_path.'/common/lazyload-min.js');
if (!$this->is_IE7()) {
$this->set_js_lib($this->default_javascript_path.'/common/list.js');
}
$this->set_js($this->default_theme_path.'/custom_checkbox_flexigrid/js/cookies.js');
$this->set_js($this->default_theme_path.'/custom_checkbox_flexigrid/js/flexigrid.js');
$this->set_js($this->default_theme_path.'/custom_checkbox_flexigrid/js/jquery.form.js');
$this->set_js($this->default_javascript_path.'/jquery_plugins/jquery.numeric.min.js');
$this->set_js($this->default_theme_path.'/custom_checkbox_flexigrid/js/jquery.printElement.min.js');
/** Fancybox */
$this->set_css($this->default_css_path.'/jquery_plugins/fancybox/jquery.fancybox.css');
$this->set_js($this->default_javascript_path.'/jquery_plugins/jquery.fancybox-1.3.4.js');
$this->set_js($this->default_javascript_path.'/jquery_plugins/jquery.easing-1.3.pack.js');
/** Jquery UI */
$this->load_js_jqueryui();
?>
In controller page i use the below code:
$crud = new grocery_CRUD();
$crud->unset_jquery();
$crud->set_table('table name');
$crud->display_as('userName','User name')->display_as('userEmail','User email')->display_as('aboutMe','About me')->display_as('donateDate','Donate date')->display_as('signUpDate','Signup date');
$crud->set_theme('custom_checkbox_flexigrid');
$crud->change_field_type('status','true_false');
$crud->unset_add();
//$crud->unset_delete();
$crud->unset_export();
$crud->unset_print();
$crud->unset_columns('userpassword','albumOrder','albumsPerPage','albumsPerPageAdmin','friendsPerPage','keepUpdated','sendAdminUpdates','userType');
$crud->edit_fields('userName','userEmail','aboutMe','status');
$output =$crud->render();
$css_files=array();
$js_files=array();
$css_files=array_merge($css_files,$output->css_files);
$js_files=array_merge($js_files,$output->js_files);
$title="Search users";
$head_data = array('username'=>'','last_login'=>'','js_files' =>$js_files, 'css_files' =>$css_files,'title'=>$title);
$body_data=array('output' => $output->output);
$this->load->view('admin/header',$head_data);
$this->load->view('admin/searchuser',$body_data);
$this->load->view('admin/footer');
where grocery crud use that pages shows the same error . If i try to add $crud->unset_jquery(); i shows the same error
also add $crud->set_js_lib('admin/assets/grocery_crud/js/'.grocery_CRUD::JQUERY); $crud->set_default_javascript_path('admin/assets/grocery_crud/js'); it shows the eeror so i comment these two line and add unset_jquery but no effects, same error
try using this in your code..
$crud = new grocery_crud();
$crud->unset_jquery();