Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap theme #21

Closed
rcorzogutierrez opened this issue Dec 3, 2013 · 8 comments
Closed

Bootstrap theme #21

rcorzogutierrez opened this issue Dec 3, 2013 · 8 comments
Labels

Comments

@rcorzogutierrez
Copy link
Contributor

I have tried adding a theme and can not
Is there any way to add the theme "Twitter Bootstrap"?
thank

@tiliv
Copy link
Contributor

tiliv commented Dec 4, 2013

@7wonders uses https://github.com/Jowin/Datatables-Bootstrap3/ with some success. You can use the default dataTables.js, and then just add these Bootstrap customized files.

There is also an official integration "plugin" hosted by @DataTables at https://github.com/DataTables/Plugins/tree/master/integration/bootstrap — these are also just JS and CSS files.

Good luck!

@tiliv tiliv closed this as completed Dec 4, 2013
@ScottEAdams
Copy link

👍

@rcorzogutierrez
Copy link
Contributor Author

achievement data show no style "bootstrap3" only shows the search stylish, paginate and the number of records per page. I've tried multiple variations but I get no result. Any tips?

@ScottEAdams
Copy link

Not in front of my box at the moment but I believe that I added to my custom js to add the required table, table-striped, table-bordered classes or something similar using jquery addclass.

@tiliv
Copy link
Contributor

tiliv commented Dec 9, 2013

Also, if you'd like to set up a different HTML structure for the table, you can override the template datatableview/default_structure.html in your project, or else specify a custom template as part of the datatable_options object:

datatable_options = {
    'columns': [ ... ],
    'structure_template': "template/path/name.html",
}

When we migrated to use bootstrap, we defined a common template so that all of our DatatableViews updated across the board.

@rcorzogutierrez
Copy link
Contributor Author

I did it the way of the "datatable_options" and only shows me the headers of the table (with style "twitter bootstrap") but no data.

@tiliv
Copy link
Contributor

tiliv commented Dec 9, 2013

Do you see a message about "No data available in table", or not?

If no, then it's probably not being initialized, and you should make sure you're including the following in the template:

<script type="text/javascript" charset="utf8" src="{{ STATIC_URL }}js/datatableview.js"></script>

This is the script that handles the automatic initialization.

@rcorzogutierrez
Copy link
Contributor Author

me everything works fine, just when I try to change the theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants