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

some tricky changes to the table it does #665

Closed
makc opened this issue Jul 1, 2014 · 14 comments
Closed

some tricky changes to the table it does #665

makc opened this issue Jul 1, 2014 · 14 comments

Comments

@makc
Copy link

makc commented Jul 1, 2014

unlike original tablesorter :) in this fiddle $("table").tablesorter(); goes before $(".resizable").resizableColumns(); and columns are both resizeable/sortable. in this other fiddle it goes after that, and columns are no longer resizeable. however, if I replace your fork with original sorter (fiddle) it is again both resizeable/sortable.

@Mottie
Copy link
Owner

Mottie commented Jul 2, 2014

Hi @makc!

I think the issue stems from this fork of tablesorter wrapping the contents of each header in a div (class name "tablesorter-header-inner"). The main reason for this change is that Firefox will not accept a position:relative setting on th elements; the need arose for positioning the sort arrows in different themes.

Another reason, that I'm sure you noticed, is that using float:right on the resize handle is not ideal when the header contains more than one row. Using position is the best method (in my opinion).

Anyway, I was wondering if you have tried out the resizable widget?

@makc
Copy link
Author

makc commented Jul 2, 2014

Nah, I had no idea tablesorter has built-in resizer widget. I have only found it yesterday and wasted lots of time trying to make it work with 3rd party resizers.

@makc makc closed this as completed Jul 2, 2014
@makc
Copy link
Author

makc commented Jul 2, 2014

On the bright side, thanks to me the next submitted issue gets the magic number.

@Mottie
Copy link
Owner

Mottie commented Jul 2, 2014

imgres

@makc
Copy link
Author

makc commented Jul 2, 2014

Btw, in that demo page last column of 2nd table only resizes to the left and not to the right (and from the text it looks like without shift I should not be able to resize it at all ?).

@Mottie
Copy link
Owner

Mottie commented Jul 2, 2014

The resizable widget attempts to detect when a table is set to full width (within 20px of it's parent). If that is the case, as it is in the second table, it won't allow you to resize the right edge of the table. Which oddly enough was just mentioned in issue #662.

@makc
Copy link
Author

makc commented Jul 2, 2014

Not sure if I was clear, I drag the edge between Discount and Date to the left, Date columns gets bigger. But I can't drag it to the right. It kind of feels (from the end user pov) that you could have shrinked Date column back without resizing the table.

@Mottie
Copy link
Owner

Mottie commented Jul 2, 2014

Odd, I can drag it to the right.

There is a difference in the way this resizable script is written when compared to others... if the mouse pointer leaves the table header area, it releases the resizer; most other resizable scripts continue to work.

@makc
Copy link
Author

makc commented Jul 2, 2014

That's it! My pointer gets out of table a couple of pixels as I drag it to the right all the time. I guess I am shitty touchpad user ) Is there widget option to control this? If not, there should be.

@Mottie
Copy link
Owner

Mottie commented Jul 2, 2014

Ok, I'll add that option. It might take a while since I'm busy with other things.

@makc
Copy link
Author

makc commented Jul 4, 2014

Thank you!

@Mottie
Copy link
Owner

Mottie commented Jul 4, 2014

No problem! But please note that setting the resizable_throttle option to any number greater than 10 (maybe even lower depending on your browser) makes the resizer essentially unusable.

@Mottie Mottie removed the Next Update label Jul 4, 2014
@makc
Copy link
Author

makc commented Jul 4, 2014

I don't see resizable_throttle anywhere in the diff. Should I worry if I do not set it / leave default?

@Mottie
Copy link
Owner

Mottie commented Jul 4, 2014

Sorry! that comment was meant for issue #662.

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