Does the order of the application of the css files matter?
Does the order of the application of the css files matter?
I have an instance of the editor which works nearly perfectly with the single exception of the even rows not displaying the selector highlight properly. When an even row is selected, only the first cell of the table row is highlighted and not the entire row. The odd rows select properly.
I am using the bootstrap framework, and I am loading all of the extension js and css per the examples but not in the same order as the examples. Unfortunately I am unable to post code as this is an in-house app with proprietary foo in it.
This question has an accepted answers - jump to answer
Answers
Incidentally, changing the tr class from 'odd DTTT_selected_selected' to 'even DTTT_selected_selected' does not make the problem go away.
Furthermore, the calculated styles for both odd and even rows is the same with the single exception of the color of the selector highlighting (as expected).
What I would suggest is to use the "Inspect element" option in your browser to take a look at the styles applied to the uncoloured rows and see what is overriding them. It is possible it is the file ordering, but it could also be some other included style that is causing the issue.
You could also try comparing the styles applied to those in the Editor / Bootstrap example.
Regards,
Allan
The example cited above appears to be using an entirely different class named 'active' which does not appear in my instance. In my instance the class name is 'DTTT_selected__selected."
I'm using the same versions of all libraries as the example, so I'm not sure why the difference in class names. Maybe that's the problem?
Indeed, changing the class name to 'active' in my instance corrects the problem, so I must be either loading up the wrong css or some such.
Are you loading the DataTables / Bootstrap integration files? And also ensure that you aren't loading the default DataTables CSS since that isn't needed and could conflict.
Allan
Yes, I load the integration files.
Here is the opening section of the page which includes the various css and js includes. Maybe you can see something I'm missing. Removing the local css file 'dashboard.css' does not correct the problem.
I think you need to load TableTools before the Bootstrap integration file. Otherwise the integration file can't modify TableTools' defaults.
This load ordering is a huge pain! On the bright side I had a plan to counter it. On the downside, it is dependent on a few other things, so it will be a few months before I can implement it - but keep an eye out on the blog if you are interested :-)
Allan
That did it!
Thanks a million, Allan. Both for the fine product and the great support!
Chris
So just for future reference for anyone having similar issues: The order both css and js are loaded is important. My issue was finally resolved by loading them in the exact order given in the example found here:
http://editor.datatables.net/examples/styling/bootstrap.html
I include that order here for easy reference: