groceryCRUD and Bootstrap
- Single Page
Posted 02 March 2012 - 16:00 PM
Where do I have to include the lines (add-function/view)
Thank you!!!
Posted 02 March 2012 - 22:36 PM
$crud->change_field_type('my_date_field','date');
For more about the change_field_type function you can see at: http://www.grocerycrud.com/documentation/options_functions/change_field_type
Posted 04 March 2012 - 11:07 AM
Well, my problem ist datepicker doesn't work. Also something else. May be a result by the same mistake.
All JQuery-files are there and they are connected. I can open then from browser-sourcecode, so the path seems ok.
Everything looks all right, but datepicker does not appear.
Second thing is, that I get a mysterious view after i edit something.
[img]http://jan-kube.com/where_from.png[/img]
So is that by the same cause?
Appriciate any help. Greetings from Hamburg, jan
Posted 04 March 2012 - 12:01 PM
Error: "js_date_format is not defined"
Posted 04 March 2012 - 13:02 PM
But perhaps it is more simple than that. As I see you have the index as your function. The index is a known issue of grocery CRUD ( http://www.grocerycrud.com/documentation/known-issues ) So try to move your code to another function. So for example if you have:
function index()
{
$this->grocery_crud->set_table('customers');
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
try to move it to another function named for example test or whatever but not index. Is it a known issue for grocery CRUD.
function test()
{
$this->grocery_crud->set_table('customers');
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
If this don't work can you add at the forum an attachement of the view page source of your page? Only the HTML page source of the first list page. I think I will totally understand what the problem is with is. Also please write what grocery CRUD version do you use, what Codeigniter version and what PHP version.
Posted 07 March 2012 - 20:40 PM
Dont't load Jquery twice. Datepicker and other things won't work any more.
So don't write in your footer
<script src="<?=base_url()?>assets/bootstrap/js/jquery.js"></script>like normally for bootstrap.
Just not that line, the remaining JQuery-lines are ok.
(PS: Thank you for the answer above, John)
Posted 07 March 2012 - 21:13 PM
$crud->unset_jquery();
The reason I created it is for similar situations as the bootstrap. When you already have the jquery inserted to your template.
But it has a bug on 1.1.8 (fixed for 1.2 you can fix it with the line 1398 at: [url="https://github.com/scoumbourdis/grocery-crud/commit/cef90a2fdd1cd8aa0870209c1726238f599e3289"]https://github.com/scoumbourdis/grocery-crud/commit/cef90a2fdd1cd8aa0870209c1726238f599e3289[/url] ) to fix it to your 1.1.8 version. So you will not have to change anything . Just add this line of code to your methods/functions.
Posted 08 March 2012 - 08:31 AM
So we just have to take care that
is in the head and not in the footer.
<script src="<?=base_url()?>assets/bootstrap/js/jquery.js"></script>
Posted 08 March 2012 - 19:19 PM