ColReorder not working with "bJQueryUI": true,
ColReorder not working with "bJQueryUI": true,
vgolf
Posts: 1Questions: 0Answers: 0
Hi,
Just started looking into this quite amazing and comprehensive tool...
Anyway I found when "bJQueryUI": false, ColReorder works like a charm but when set to true the styles are applied nicely but it doesn't work anymore.
When the header is grabbed with the mouse there is only a long white bar but still no error but trying to drop it produces and error in the console:
Uncaught TypeError: Cannot read property 'bVisible' of undefined
pointing to line 162 in the full version of ColReorder.js...
/*
* Move the DOM elements
*/
if ( oSettings.aoColumns[iFrom].bVisible )
Tried to trace back what is missing when the column is being grabbed but no success.
Maybe it's just a config issue if not a bug...
Any input appreciated.
All best,
Volker
Just started looking into this quite amazing and comprehensive tool...
Anyway I found when "bJQueryUI": false, ColReorder works like a charm but when set to true the styles are applied nicely but it doesn't work anymore.
When the header is grabbed with the mouse there is only a long white bar but still no error but trying to drop it produces and error in the console:
Uncaught TypeError: Cannot read property 'bVisible' of undefined
pointing to line 162 in the full version of ColReorder.js...
/*
* Move the DOM elements
*/
if ( oSettings.aoColumns[iFrom].bVisible )
Tried to trace back what is missing when the column is being grabbed but no success.
Maybe it's just a config issue if not a bug...
Any input appreciated.
All best,
Volker
This discussion has been closed.
Replies
Love datatables and am having a great time using it on a rails application. I too ran into this issue since I have enabled jquery ui styles. Can you give me some pointers to where I can look to resolve this? I would be happy to fork on github and work on a fix.
As an aside, I also was looking into implementing a new ColVis ui configuration option using jquery dialog and multiselect to allow you to select the columns you want to view and sort them all in one interaction, then submit. Since I am using the serverside integration I would like to avoid a lot of extra trips to the server when someone is changing visibility on multiple columns.
Thanks!
[code]
if (!$(e.target).is("th")) {
//For bJQueryUI
this.s.mouse.target = $(e.target).parents("th").first();
this.s.mouse.targetIndex = $('th', $(e.target).parents('tr').first())
.index($(e.target).parents("th").first());
} else {
//original line 590:
this.s.mouse.targetIndex = $('th', e.target.parentNode).index( e.target );
}
[/code]
This fix worked for me in the latest version I got with 1.7.5 :)
Allan