⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

DISECTED CRUD FUNCTIONS



norwild29

norwild29
  • profile picture
  • Member

Posted 27 April 2015 - 11:00 AM

Hi,

 

I have been playing around with this tool for 2 days and I find it very helpful.  Here is my thought, pulling of records ahead of time even

 

if the user doesn't need it system will exert resources for this specially for huge recordcount.  What if I want to go directly Adding new

 

record, Edit, View and Delete existing records without going thru the Flexigrid?  Is it possible in this tool? If yes, can you specify which

 

modules can I revise to have this done? (assuming that I am allowed to edit the source code :) )

 

 

Regards


titu

titu
  • profile picture
  • Member

Posted 27 April 2015 - 19:26 PM

Hi ,

 

I have my own listing jquery plugin, so I only use crud for add and edit.

 

On controller simply:

		    $state = $crud->getState();
	

		    if($state == 'add' || $state == 'view' )
		    {
                           //more stuff

$this->_example_output($output);

} elseif($state == 'edit' || $state == 'export' || $state == 'print') { //more stuff
$this->_example_output($output); }else{ //more stuff

$this->load->view('vProductos',$output);

}


norwild29

norwild29
  • profile picture
  • Member

Posted 28 April 2015 - 06:58 AM

Hello titu,

 

would you kind enough to share your listing of jquery plugin?


titu

titu
  • profile picture
  • Member

Posted 28 April 2015 - 11:35 AM

If I have time to prepare some documentation I will. It's something I'm willing to do for sometime now, but if I release it without documentation nobody would understand it. Above this, it's pretty messy in the sense that it grew without proper design so I'm not very proud of it. It works, but only with my own models and even my own template so it's not very generic.

 

I would encourage you do build your own. It doesn't have to be a jquery plugin on your view just create your listings and make sure your action buttons link to the grocercy crud method.