⚠ 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

grocerycrud and bootstrap



nullart
  • profile picture
  • Member

Posted 01 October 2012 - 21:18 PM

Hi,

I seem to be having some issues with grocerycrud messing some bootstrap styles:

1. using both themes, the bootstrap popover or dropdown menus will not work anymore. (reference for dropdown: http://bootsnipp.com/snipps/admin-nav-bar-with-popup-sign-in)

2. using flexigrid, some bootstrap styles are overwritten (ie. link styles, fonts, etc).

I guess I have to stick to datatables theme to solve #2. As for #1, kindly assist me with the dropdown issue.

Cheers!

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 01 October 2012 - 21:49 PM

Hello [member='nullart'] and welcome to the forum,

1. For both themes if you have problems with the dropdown you definitely have a problem with the JavaSript, you can debug it by following the errors from the firebug. Just to remind you that if you already use the jquery in your template you have to add this line of code:

$crud->unset_jquery();


If you have any online page you can have a link as a post, so I can check what is happening there, probably you are missing something.

2. As for flexigrid, I have to write some more CSS to be strict with other general CSS, but you can still right some more CSS just to make it more beautiful with your template. Don't forget that datatables theme is only client side scripting so in many cases you have to use the flexigrid for more data.

Regards
Johnny

nullart
  • profile picture
  • Member

Posted 02 October 2012 - 06:37 AM

Thanks Web-Johnny. My JS was the cause of #1. It helped when I used unset_jquery.
Cheers!

MarkC
  • profile picture
  • Member

Posted 07 February 2013 - 13:09 PM

Can someone help me how can I use bootstrap theme for my admin? Now I'm using the default theme, and really simple header with plain links... and I really don't like it :)

 

Fatal error: Call to undefined method grocery_CRUD::set_js_lib() in /home/xxxxxxx/public_html/assets/grocery_crud/themes/twitter-bootstrap/views/list_template.php on line 11

 

I guess there is a problem with the paths in this line, and every similar line

 

$this->set_js_lib($this->default_javascript_path.'/'.grocery_CRUD::JQUERY);


victor
  • profile picture
  • Member

Posted 07 February 2013 - 14:22 PM

the render method returns an object. have look at that object and you will see all js, css, html. you can change it (set/unset new properties ).

mnish
  • profile picture
  • Member

Posted 03 September 2013 - 17:02 PM

I think No Need to unset js Plz tell me if i am wrong.

 

You can use bootstrap theme by using some line of code.

 

$this->load->library('grocery_CRUD');

 

$crud = new grocery_crud();

 

$crud->set_theme('twitter_bootstrap');

 

where twitter_bootstrap is the folder name in  root folder/assets/grocery_crud/thems/twitter_bootstrap.

 

All the css , js related to bootstrap are save in this folder.

 

you can also override bootstrap by adding some custom css and javascript.


davidoster
  • profile picture
  • Member

Posted 04 September 2013 - 02:46 AM



I think No Need to unset js Plz tell me if i am wrong.

 

 

 

[member=mnish], the core developer refers to unset_jquery() for debug purposes and not that there is a need to do this for setting the bootstrap theme!

Probably you have misunderstood the answer. Check again.


mnish
  • profile picture
  • Member

Posted 04 September 2013 - 13:14 PM

Thanks Mr. Davidoster for clarifying me.


salfredogonzalez
  • profile picture
  • Member

Posted 03 June 2015 - 18:20 PM

I would like some help about this issue also.

 

I install the bootstrap theme as the manual says, i am not using the jquery or jquery ui from grocery_crud.

 

When i use flexigrid, bootstrap_twitter, or any other, everything is fine.

 

When i select bootstrap theme i get an error on the list_template line 10.

 

I will post the error later ...

 

Does anyone know why is different if is working with the others?


Hemant Randive
  • profile picture
  • Member

Posted 20 November 2015 - 07:27 AM

Hello we are using bootstrap theme for our web application,but the functionallity like sorting of records,editing,deleting not working also it is disturbing other UI too.Please suggest some solutions 


xale07
  • profile picture
  • Member

Posted 20 November 2015 - 08:36 AM

Hello we are using bootstrap theme for our web application,but the functionallity like sorting of records,editing,deleting not working also it is disturbing other UI too.Please suggest some solutions 

 

Try to see if your UI is already using bootstrap. Mayby bootstrap js and css are loaded twice (as the GC Bootstrap thene  already load bootstrap).

If this is the case remove bootstrap from the GC theme or your UI.


Hemant Randive
  • profile picture
  • Member

Posted 20 November 2015 - 09:13 AM

Yes my UI is not using bootstrap but what about other functions of the theme even i am not able to sort column by clicking on them...nothing is working 


Hemant Randive
  • profile picture
  • Member

Posted 20 November 2015 - 09:35 AM

How to sort the table in grocery crud view on basis of two columns....like i want to sort the table on 'status' and 'creation_date' column  


xale07
  • profile picture
  • Member

Posted 20 November 2015 - 10:56 AM

How to sort the table in grocery crud view on basis of two columns....like i want to sort the table on 'status' and 'creation_date' column  

 

Try this : http://www.grocerycrud.com/documentation/options_functions/order_by

You can try to make your own query also.


xale07
  • profile picture
  • Member

Posted 20 November 2015 - 10:58 AM

Yes my UI is not using bootstrap but what about other functions of the theme even i am not able to sort column by clicking on them...nothing is working 

 

Check your browser console to see if you have errors.