some tricky changes to the table it does #665

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

Comments

Projects
None yet
2 participants

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.

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 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 closed this Jul 2, 2014

makc commented Jul 2, 2014

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

Owner

Mottie commented Jul 2, 2014

imgres

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 ?).

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 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.

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 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.

Owner

Mottie commented Jul 2, 2014

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

Mottie reopened this Jul 2, 2014

Mottie added the Enhancement label Jul 2, 2014

Mottie added the Next Update label Jul 3, 2014

Mottie closed this in 7be358f Jul 4, 2014

makc commented Jul 4, 2014

Thank you!

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 removed the Next Update label Jul 4, 2014

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?

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