Hi,
I'm new to codeigniter. It's a great tool. But I still have some troubles to customize CI to my project needs.
I would like to change the background color of only one row in the list table to obtain this:
[attachment=1278:crud2.PNG]
Idealy i would like to use the bootstrap <tr class="success">...</tr>
But any other mean will be great.
So i succeeded with a callback to change the text to a link <a href>, to change the text color to green only for the row id which is corresponding to the id selected elsewhere.
here is the code:
$crud->callback_column('name',array($this,'_callback_webpage_url'));
and:
public function _callback_webpage_url($value, $row) { if ($this->session->userdata('company_select')==$row->id) { return "<a href='".site_url('page/company_edit/edit/'.$row->id)."' style='color: green;'>$value</a>"; } else { return "<a href='".site_url('page/company_edit/edit/'.$row->id)."'>$value</a>"; } }
But now, what can I do to change the entire row <tr> ?
Many thanks for your help!