karthikponkam / jquery-datatables-row-grouping

Automatically exported from code.google.com/p/jquery-datatables-row-grouping
0 stars 0 forks source link

Suggestion for fixing bug on creating class of group #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Group a table by a column that has more than one space char in its text

What is the expected output? What do you see instead?
Grouped rows with grouping column containing more than one space char inside 
won't be folded / unfolded

What version of the product are you using? On what operating system?
1.0 on Linux os

Please provide any additional information below.

I fixed this problem with these lines of code:

function _fnGetCleanedGroup(sGroup) {
 return sGroup.toLowerCase().replace(/[^a-zA-Z0-9]+/g,'-');
}

Original issue reported on code.google.com by francesc...@gmail.com on 16 Dec 2011 at 1:03

GoogleCodeExporter commented 8 years ago
Hi,

Could you try first to use latest version from the trunk 1.1.2+. I think that 
similar issue is already fixed.

            function _fnGetCleanedGroup(sGroup) {
                //return sGroup.toLowerCase().replace(" ", "-");
                //return sGroup.toLowerCase().replace(/\s/g, "-"); //Fix provided by danilo.t (Issue 3)
                return sGroup.toLowerCase().replace(/\W/g, "-"); //Fix provided by bmathews (Issue 7)
            }

Regards,
Jovan

Original comment by joc...@gmail.com on 11 Feb 2012 at 10:38

GoogleCodeExporter commented 8 years ago

Original comment by joc...@gmail.com on 25 Feb 2012 at 10:31