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

colspan in column header #21

Closed
surrealroad opened this issue Jan 25, 2013 · 6 comments
Closed

colspan in column header #21

surrealroad opened this issue Jan 25, 2013 · 6 comments
Assignees

Comments

@surrealroad
Copy link

the first column (in the table's header) in my table has a colspan set to 3, which causes the other columns to sort incorrectly, i.e. trying to sort any column results in the 2nd column before it actually being sorted.

@steveush
Copy link
Member

Hey surrealroad, could you paste a snippet of your table html so I can see your issue my side.

@surrealroad
Copy link
Author

here's an excerpt:

http://pastebin.com/1qF2zntd

steveush added a commit that referenced this issue Feb 5, 2013
First attempt to fix colspan issues.
steveush added a commit that referenced this issue Feb 5, 2013
Added in support for colspans and did a bit of refactoring.
@steveush
Copy link
Member

steveush commented Feb 5, 2013

Hi surrealroad,

I've created a new branch called Colspan and have made the changes which I think handle the colspans correctly. However I am still testing and fixing any issues as I find them so any feedback is welcome.

There are a two new attributes available for use now, the first is data-names which will accept a comma separated list of names for use in the detail view, one per column wrapped by the colspan.

The sorting plugin was also updated to handle colspans. The second new attribute is used to control which of the columns wrapped by the colspan is used for sorting and is called data-sort-match. The value for this is the zero based index of the column within the colspan. So if you have 3 columns a value of 1 would always sort using the middle column (0, 1, 2) no matter where this group was located within the table.

The data-class attribute will now be applied to all columns in the colspan.

To see these changes working on a table based on your pastebin example take a look at issue21.htm in the root and let me know if you find any issues.

Thanks
Steve

@ghost ghost assigned steveush Feb 5, 2013
@steveush steveush mentioned this issue Feb 6, 2013
@surrealroad
Copy link
Author

Thanks a lot Steve.

On Tue, Feb 5, 2013 at 8:18 PM, steveush notifications@github.com wrote:

Hi surrealroad,

I've created a new branch called Colspanhttps://github.com/bradvin/FooTable/tree/Colspanand have made the changes which I think handle the colspans correctly.
However I am still testing and fixing any issues as I find them so any
feedback is welcome.

There are a two new attributes available for use now, the first is *
data-names* which will accept a comma separated list of names for use in
the detail view, one per column wrapped by the colspan.

The sorting plugin was also updated to handle colspans. The second new
attribute is used to control which of the columns wrapped by the
colspan is used for sorting and is called data-sort-match. The value
for this is the zero based index of the column within the colspan. So if
you have 3 columns a value of 1 would always sort using the middle column
(0, 1, 2) no matter where this group was located within the table.

The data-class attribute will now be applied to all columns in the
colspan.

To see these changes working on a table based on your pastebin example
take a look at issue21.htm in the root and let me know if you find any
issues.

Thanks
Steve


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-13149565.

Sign up for the Synaesthesia beta: http://synaesthesia.surrealroad.com/beta

www.surrealroad.com

@steveush
Copy link
Member

steveush commented Feb 6, 2013

No problem, please take a look and let me know if you find any issues or have any suggestions. As it stands I think this will be moved across to the master if I can't find any problems while testing.

I would also just like to say sorry for the long delay for a response, I had some hardware issues and only got my new PC put together a few days ago.

Thanks
Steve

@steveush
Copy link
Member

Merged into master.

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

No branches or pull requests

2 participants