![]() |
Ignited DataTables - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Ignited DataTables (/showthread.php?tid=32173) |
Ignited DataTables - El Forum - 08-04-2011 [eluser]LoganPHP[/eluser] First i like to say thanks again for your great plugin. I have a problem in edit_column. Code: public function invoice_listener() It is working properly(return values are 0's or 1's). But i have a problem in following code. Code: public function invoice_listener() It returns 'Disable' for every rows. I have just added conditional statement in second one,otherwise same as first one.But i i don't know why this doesn't work properly. Please help me. Thanks in advance, Logan Ignited DataTables - El Forum - 08-04-2011 [eluser]ηυмвєяσηє[/eluser] Well, This is wrong Code: ->edit_column('inv.status', $this->status('$1'), 'inv.status') You need to use a helper file as i said before. Try: Code: ->edit_column('inv.status', '$1', 'status(inv.status)') and copy your function to in a helper file. I have explained how to do that in my previous post. Regards, Yusuf Ignited DataTables - El Forum - 08-04-2011 [eluser]Chauzu[/eluser] Hi, i got a problem with the last version, I'm using multifilter at the view to post parameters to the controller with sSearch vars. The problem is that these parameters automatically generate like conditions in the controller query. I need these parameters to establish a range for the query, but my query ends with something like: date>parameter1 date<parameter2 date like "%parameter1%" //generated automatically date like "%parameter2%" //generated automatically So there is no middle results. This don't happen with the version 0806c88(2011-06-22) so i suppose there has been a change in the functionality , any ideas how to remove that conditions? or a different approach to establish a range for the query? thanks for your help Ignited DataTables - El Forum - 08-04-2011 [eluser]ηυмвєяσηє[/eluser] can i see your javascript setup and ajax listener ? Ignited DataTables - El Forum - 08-04-2011 [eluser]Chauzu[/eluser] sure, Extract from the listener Code: if ($this->input->post('sSearch_8')) $date1=$this->input->post('sSearch_8'); cas_fingreso is the table field i need the range from, i repeated it at the query to be able to post the two range parameters from the view. i wonder if that is the problem, but works ok in this old version. extract from the view Code: $('#search').click(function() { I replaced datatables to datatablesold to keep using the old version that works in this particular case. thanks again Ignited DataTables - El Forum - 08-04-2011 [eluser]ηυмвєяσηє[/eluser] well, it's been added in 2011-07-14.. Code: "aoSearchCols": [ im thinking to improve functionality of the aoSearchCols. I wanna do: Code: "aoSearchCols": [ It is an idea for now. what do you think ? Ignited DataTables - El Forum - 08-04-2011 [eluser]ηυмвєяσηє[/eluser] I have committed a small fix for that. improved filtering. Can you download the library and try the codes below ? Code: $this->datatable Code: $('#search').click(function() { or you can do simply (it should work.) : Code: $('#search').click(function() { there is no need if ($this->input->post('sSearch_8')) $date1=$this->input->post('sSearch_8'); if ($this->input->post('sSearch_12'))$date2=$this->input->post('sSearch_12'); and if (isset($date1)){ $date1=fechaAdb($date1); $this->datatablesold->where('cas_fingreso >= "'.$date1.'"');} if (isset($date2)) {$date2=fechaAdb($date2);$this->datatablesold->where('cas_fingreso <= "'.$date2.'"');} Ignited DataTables - El Forum - 08-04-2011 [eluser]Chauzu[/eluser] Thanks a lot for your work, i downloaded the library and the range filter worked ok, but a new problem came out. I got a json response but no table is generated, checking the json response against JSONLint, i noticed that now the response is not valid, then i went back to the previous library and the response is valid. Some of my fields are texts and got carriage returns inside, I'm wondering if there is a change in the way the json response is made at your library. Ignited DataTables - El Forum - 08-05-2011 [eluser]cryogenix[/eluser] apparently, the charset detection function is buggy and unstable. we made changes and reverted back to making json encoding with charset selection optional. you may now download the latest release with these issues fixed. Ignited DataTables - El Forum - 08-05-2011 [eluser]Chauzu[/eluser] [quote author="cryogenix" date="1312553341"]apparently, the charset detection function is buggy and unstable. we made changes and reverted back to making json encoding with charset selection optional. you may now download the latest release with these issues fixed.[/quote] Thanks, now it's working ![]() |