[jQuery] Re: Tablesorter 2.0 : Problem with Sort Direction
Pretty sure that's just how it works. Clicking on a column always makes it run the opposite of the last sort that was used. On Apr 2, 9:30 am, cl4ncy <[EMAIL PROTECTED]> wrote: > Hi, > > I'm finding this plugin very useful, however i have one major problem > with it (i dont know if its just me). > > When i click to sort on a column it sorts it ascending, which is > correct. Then i sort on another column ascendng, fine. If i click to > sort the first column again it sorts it descending, even though i > moved columns. I would expect all columns to sort ascending unless i > was already sorting on that column. > > Is this a bug in the plugin and is there a way around this? > > Thanks
[jQuery] Re: Tablesorter 2.0
Hi Guys, I have been stuck on a small island in Greece the last two weeks working on project called "vacation". I will be releasing a 2.0.1 version of tablesorter (tonight or tomorrow) that takes care of these issues. /christian 2007/9/16, Rodrigo Moraes <[EMAIL PROTECTED]>: > > > On 9/14/07, James Dempster wrote: > > > > The problem with Zebra Striping widget in tablesorter is because it > > uses a little bit of xpath, which has been taken out of jQuery 1.2, to > > fix this replace the format function on line 819 or around there with > > > > $("> tbody:first > tr:visible",table) > > .filter(':even') > > .removeClass(table.config.widgetZebra.css[1]).addClass( > table.config.widgetZebra.css[0]) > > .end().filter(':odd') > > .removeClass(table.config.widgetZebra.css[0]).addClass( > table.config.widgetZebra.css[1]) > > ; > > Could you describe the problem with zebra stripes? My TableSorter is > working with jQuery 1.2, except that when you sort the table the > stripes aren't updated. Is this the problem? > > Anyway, I don't see any functional difference using your code, but > probably I'm missing something. > > Once I get some time, I'll implement two features I need: > > 1. Allow to define which thead row will be used to trigger sorting. By > default, use the first row. This would allow multiple thead rows > without breaking TableSorter execution. > > 2. Implement an Ajax pagination widget, to reload tbody rows with > server-side data. > > Of course, I'll keep an eye on the community hacks to see if something > similar appears. > > Hey, thanks for the plugin. It is super "simple but slick". Lovely stuff. > :) > > -- rodrigo moraes >
[jQuery] Re: Tablesorter 2.0
On 9/14/07, James Dempster wrote: > > The problem with Zebra Striping widget in tablesorter is because it > uses a little bit of xpath, which has been taken out of jQuery 1.2, to > fix this replace the format function on line 819 or around there with > > $("> tbody:first > tr:visible",table) > .filter(':even') > > .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]) > .end().filter(':odd') > > .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]) > ; Could you describe the problem with zebra stripes? My TableSorter is working with jQuery 1.2, except that when you sort the table the stripes aren't updated. Is this the problem? Anyway, I don't see any functional difference using your code, but probably I'm missing something. Once I get some time, I'll implement two features I need: 1. Allow to define which thead row will be used to trigger sorting. By default, use the first row. This would allow multiple thead rows without breaking TableSorter execution. 2. Implement an Ajax pagination widget, to reload tbody rows with server-side data. Of course, I'll keep an eye on the community hacks to see if something similar appears. Hey, thanks for the plugin. It is super "simple but slick". Lovely stuff. :) -- rodrigo moraes
[jQuery] Re: Tablesorter 2.0
The problem with Zebra Striping widget in tablesorter is because it uses a little bit of xpath, which has been taken out of jQuery 1.2, to fix this replace the format function on line 819 or around there with $("> tbody:first > tr:visible",table) .filter(':even') .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]) .end().filter(':odd') .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]) ; I've changed the way it works, benchmarks show that this method is faster If you want to keep the same function the simpler change is to replace the / with > in the jQuery expression its around about the same line. I've also noticed that if you have any events bound to items within the table, they are lost on sort. After some kind help from Brandon Aron we worked out that the changes to the empty() in 1.2 is much better on memory management and cleans the bound events from the browser. To fix this change around line 245 to tableBody = $("tbody:first",table), rows = []; tableBody.innerHTML = ''; This has been tested in most browsers but needs to be checked out fully by Christian Bach developer of tablesorter, I've not seen him online for a while, but as soon as I do I'll point him in this direction. Hope this helps. On Sep 14, 9:39 pm, pixelwizzard <[EMAIL PROTECTED]> wrote: > Hi all I just ran into a problem with Tablesorter and JQuery 1.2 now > working with the zebra. had to go back to JQuery 1.1.3. Anyone know > what happened? > > On Sep 11, 9:09 am, rortelli <[EMAIL PROTECTED]> wrote: > > > Hi all,tablesorter2.0 has some strange behaviours with jQuery 1.2, thezebra > > stripes seems not to work correctly... ;) > > > On Sep 10, 11:55 am, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > On 20 aug, 11:33, lukek <[EMAIL PROTECTED]> wrote: > > > > > By the way I had another question. -- In the unpacked version of the > > > > latest script your comment on line 555 says "apply easy methods that > > > > trigger binded events". > > > > > Does this mean I can insert function calls in here - ie around line > > > > 560? > > > > > I say this because I have added a call to applyWidget() as I reckon > > > > all the widgets should be reloaded when the update event is triggered > > > > - eg after I insert rows I want to reapply thezebrawidget. > > > > I'm not sure if this helps anyone, but as this thread gave some > > > pointers for my issue, here goes: > > > > I also wanted to reapply thezebrawidget each time I add rows to the > > > table. However in my case the rows are coming from an AJAX query, > > > similar tohttp://tablesorter.com/docs/example-ajax.html > > > The example there just applies a defined sorting when new data arrives > > > with triggering "sorton" (after "update") - this will also reapply the > > >zebrafrom the sort operation. However I didn't want to loose the > > > sorting that the user might have had already changed to, away from the > > > default, and I wanted the arriving data to get sorted into the pre- > > > existing data according to the sort selection. I didn't find a good > > > way to get to the configuration saved, so I just ended up with this: > > > > $("table").trigger("update"); > > > var current_sort = $("table.tablesorter").get(0).config.sortList; > > > $("table").trigger("sorton", [current_sort]); > > > > Hopefully there already is (that I don't know of yet), or will be, a > > > good way to keep the sorting selection in tact. Maybe something like > > > this in tablesorter2 itself: > > > > $this.bind("resort", function(e) { > > > // update header count index > > > updateHeaderSortCount(this,sortList); > > > > //set css for headers > > > setHeadersCss(this,$headers,config.sortList,sortCSS); > > > > // sort the table and append it to the dom > > > appendToTable(this,multisort(this,config.sortList,cache)); > > > > }); > > > > Some of these calls (like setHeadersCss) is probably not necessary > > > from just a resort, as everything in the headers remains the same. > > > > Best Regards, > > > Mart Raudsepp
[jQuery] Re: Tablesorter 2.0
Hi all I just ran into a problem with Tablesorter and JQuery 1.2 now working with the zebra. had to go back to JQuery 1.1.3. Anyone know what happened? On Sep 11, 9:09 am, rortelli <[EMAIL PROTECTED]> wrote: > Hi all,tablesorter2.0 has some strange behaviours with jQuery 1.2, thezebra > stripes seems not to work correctly... ;) > > On Sep 10, 11:55 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hello, > > > On 20 aug, 11:33, lukek <[EMAIL PROTECTED]> wrote: > > > > By the way I had another question. -- In the unpacked version of the > > > latest script your comment on line 555 says "apply easy methods that > > > trigger binded events". > > > > Does this mean I can insert function calls in here - ie around line > > > 560? > > > > I say this because I have added a call to applyWidget() as I reckon > > > all the widgets should be reloaded when the update event is triggered > > > - eg after I insert rows I want to reapply thezebrawidget. > > > I'm not sure if this helps anyone, but as this thread gave some > > pointers for my issue, here goes: > > > I also wanted to reapply thezebrawidget each time I add rows to the > > table. However in my case the rows are coming from an AJAX query, > > similar tohttp://tablesorter.com/docs/example-ajax.html > > The example there just applies a defined sorting when new data arrives > > with triggering "sorton" (after "update") - this will also reapply the > >zebrafrom the sort operation. However I didn't want to loose the > > sorting that the user might have had already changed to, away from the > > default, and I wanted the arriving data to get sorted into the pre- > > existing data according to the sort selection. I didn't find a good > > way to get to the configuration saved, so I just ended up with this: > > > $("table").trigger("update"); > > var current_sort = $("table.tablesorter").get(0).config.sortList; > > $("table").trigger("sorton", [current_sort]); > > > Hopefully there already is (that I don't know of yet), or will be, a > > good way to keep the sorting selection in tact. Maybe something like > > this in tablesorter2 itself: > > > $this.bind("resort", function(e) { > > // update header count index > > updateHeaderSortCount(this,sortList); > > > //set css for headers > > setHeadersCss(this,$headers,config.sortList,sortCSS); > > > // sort the table and append it to the dom > > appendToTable(this,multisort(this,config.sortList,cache)); > > > }); > > > Some of these calls (like setHeadersCss) is probably not necessary > > from just a resort, as everything in the headers remains the same. > > > Best Regards, > > Mart Raudsepp
[jQuery] Re: Tablesorter 2.0
Hi all, tablesorter 2.0 has some strange behaviours with jQuery 1.2, the zebra stripes seems not to work correctly... ;) On Sep 10, 11:55 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > On 20 aug, 11:33, lukek <[EMAIL PROTECTED]> wrote: > > > By the way I had another question. -- In the unpacked version of the > > latest script your comment on line 555 says "apply easy methods that > > trigger binded events". > > > Does this mean I can insert function calls in here - ie around line > > 560? > > > I say this because I have added a call to applyWidget() as I reckon > > all the widgets should be reloaded when the update event is triggered > > - eg after I insert rows I want to reapply the zebra widget. > > I'm not sure if this helps anyone, but as this thread gave some > pointers for my issue, here goes: > > I also wanted to reapply the zebra widget each time I add rows to the > table. However in my case the rows are coming from an AJAX query, > similar tohttp://tablesorter.com/docs/example-ajax.html > The example there just applies a defined sorting when new data arrives > with triggering "sorton" (after "update") - this will also reapply the > zebra from the sort operation. However I didn't want to loose the > sorting that the user might have had already changed to, away from the > default, and I wanted the arriving data to get sorted into the pre- > existing data according to the sort selection. I didn't find a good > way to get to the configuration saved, so I just ended up with this: > > $("table").trigger("update"); > var current_sort = $("table.tablesorter").get(0).config.sortList; > $("table").trigger("sorton", [current_sort]); > > Hopefully there already is (that I don't know of yet), or will be, a > good way to keep the sorting selection in tact. Maybe something like > this in tablesorter2 itself: > > $this.bind("resort", function(e) { > // update header count index > updateHeaderSortCount(this,sortList); > > //set css for headers > setHeadersCss(this,$headers,config.sortList,sortCSS); > > // sort the table and append it to the dom > appendToTable(this,multisort(this,config.sortList,cache)); > > }); > > Some of these calls (like setHeadersCss) is probably not necessary > from just a resort, as everything in the headers remains the same. > > Best Regards, > Mart Raudsepp
[jQuery] Re: Tablesorter 2.0
Hello, On 20 aug, 11:33, lukek <[EMAIL PROTECTED]> wrote: > By the way I had another question. -- In the unpacked version of the > latest script your comment on line 555 says "apply easy methods that > trigger binded events". > > Does this mean I can insert function calls in here - ie around line > 560? > > I say this because I have added a call to applyWidget() as I reckon > all the widgets should be reloaded when the update event is triggered > - eg after I insert rows I want to reapply the zebra widget. I'm not sure if this helps anyone, but as this thread gave some pointers for my issue, here goes: I also wanted to reapply the zebra widget each time I add rows to the table. However in my case the rows are coming from an AJAX query, similar to http://tablesorter.com/docs/example-ajax.html The example there just applies a defined sorting when new data arrives with triggering "sorton" (after "update") - this will also reapply the zebra from the sort operation. However I didn't want to loose the sorting that the user might have had already changed to, away from the default, and I wanted the arriving data to get sorted into the pre- existing data according to the sort selection. I didn't find a good way to get to the configuration saved, so I just ended up with this: $("table").trigger("update"); var current_sort = $("table.tablesorter").get(0).config.sortList; $("table").trigger("sorton", [current_sort]); Hopefully there already is (that I don't know of yet), or will be, a good way to keep the sorting selection in tact. Maybe something like this in tablesorter2 itself: $this.bind("resort", function(e) { // update header count index updateHeaderSortCount(this,sortList); //set css for headers setHeadersCss(this,$headers,config.sortList,sortCSS); // sort the table and append it to the dom appendToTable(this,multisort(this,config.sortList,cache)); }); Some of these calls (like setHeadersCss) is probably not necessary from just a resort, as everything in the headers remains the same. Best Regards, Mart Raudsepp
[jQuery] Re: TableSorter 2.0 force update?
Actually it maybe should be as below, in case the function for the update-event ever changes :) .bind("reSort",function() { $this.trigger('update'); var sortList = config.sortList; $this.trigger('sorton', [sortList]); })
[jQuery] Re: TableSorter 2.0 force update?
I still didn't find a built-in easy way to do this so I added a new method to the tablesorter (around line 576 where all the other bindings are): .bind("reSort",function() { cache = buildCache(this); var sortList = config.sortList; $this.trigger('sorton', [sortList]); }) And then just call $('#myTable').trigger('reSort'); when you need to refresh the sort while keeping the current sorting order. Another way would have been to first trigger 'update' manually and the trigger 'sorton' without any parameters. For some reason the sorton event requires the list-parameter though, so it would have still required a tweak there to use config.sortList if the list-parameter was empty. HTH -- Suni
[jQuery] Re: TableSorter 2.0 force update?
I've been trying to solve this too. I'm dynamically altering the table contents, and would like to force a refresh / update, but couldn't find a direct way to do that. Got to dig deeper I guess. -- Suni On 19 elo, 23:26, Chris <[EMAIL PROTECTED]> wrote: > I'm playing with adding a filtering widget to table sorting, e.g. > "hide any row where column 7 < 500." Users can keep add or remove > filters dynamically. When they do, I'd like the table toupdate > immediately, but I don't see how to do that. Calling click() on a > header would change the current sort order. Callingtablesorter() > again seems to break sorting when clicking on columns.
[jQuery] Re: tablesorter 2.0: problems with multiple rows in
E-mail has been sent. For others who may be interested, the test page is at: http://www.garethphipps.com/tablesorttest/index.html Thanks for looking into this! On Aug 28, 3:36 pm, "Christian Bach" <[EMAIL PROTECTED]> wrote: > Hi Travis, > > Would it be possible to send me a test-case of your table, "off-list"? > > Makes spotting the bug easier for me. > > Regards > Christian > > 2007/8/28, tlphipps <[EMAIL PROTECTED]>: > > > > > Tablesorter 2.0 rocks! But I think I've uncovered a bug. > > > I have a table with two rows in the section, but the > > tablesorter doesn't work on this table. I've narrowed the issue down > > to the checkCellColSpan() function. If I bypass that function, then > > everything works correctly. I've discovered that the arr.push (line > > 302) command is never executed if there is more than one in the > > of the table. Also, I can't figure out why the call to this > > function at line 268 includes 4 parameters when the function only uses/ > > needs 3. I'm definitely not a javascript guru, so any help or insight > > that you all can provide would be greatly appreciated. > > > FWIW, my table does NOT use colspans in the , so I don't need > > that function, but if there's an official fix for this I would prefer > > that instead of creating a customized version of the tablesorter for > > my needs.
[jQuery] Re: tablesorter 2.0: problems with multiple rows in
Hi Travis, Would it be possible to send me a test-case of your table, "off-list"? Makes spotting the bug easier for me. Regards Christian 2007/8/28, tlphipps <[EMAIL PROTECTED]>: > > > Tablesorter 2.0 rocks! But I think I've uncovered a bug. > > I have a table with two rows in the section, but the > tablesorter doesn't work on this table. I've narrowed the issue down > to the checkCellColSpan() function. If I bypass that function, then > everything works correctly. I've discovered that the arr.push (line > 302) command is never executed if there is more than one in the > of the table. Also, I can't figure out why the call to this > function at line 268 includes 4 parameters when the function only uses/ > needs 3. I'm definitely not a javascript guru, so any help or insight > that you all can provide would be greatly appreciated. > > FWIW, my table does NOT use colspans in the , so I don't need > that function, but if there's an official fix for this I would prefer > that instead of creating a customized version of the tablesorter for > my needs. > >
[jQuery] Re: Tablesorter 2.0
"it appears > that the widgets are only called when the tablesorter is initially > attached to the table, and then again when the sort is complete." I have found this to be a problem also. Two approaches I have looked at - neither of them satisfying are: 1. insert a call to applyWidget() on line 560 of the tablesorter source or 2. make a widget which handles the events of the table ie Update and Sorton. for the point about blocking the during an update - it would be nice to see a mash widget with the blockUI plugin (if you use that). Luke On Aug 21, 8:14 pm, tlphipps <[EMAIL PROTECTED]> wrote: > I have what I guess would be a feature request for the tablesorter. > > Some of our larger tables take a few seconds to sort and I would like > to be able to display a message for our users to indicate that a sort > is in progress. So basically, user clicks on , message overlays > table saying "sort in progress", then when sort finishes, message is > removed. I explored the options available via widgets, but it appears > that the widgets are only called when the tablesorter is initially > attached to the table, and then again when the sort is complete. > Would it be possible to have a 'callforward' (don't know what to call > the opposite of a callback) that would allow for writing a widget to > display this user notification message? > > Or can anyone suggest another method for doing this type of > notification? > > On Aug 21, 4:09 am, lukek <[EMAIL PROTECTED]> wrote: > > > This is interesting. I was thinking along these lines but was > > interested to know how you - being the designer - would implement it. > > > Thanks for you help. > > > I'll tell you what I am working on at the moment. I'd be interested to > > know what you thoughts are, if you have any pointers or have thought > > about this kind of thing yourself. > > > I have a sortable "Document History" table for a collaborative > > document-writing app (eg the table has columns such as Doc name, last > > mod timestamp, last user, link to D/L the doc). There will eventually > > be history tables for multiple documents on one page. I am mashing up > > your Tablesorter with Remy Sharp's Spy. > > > What has been interesting so far is: > > * reloading all the widgets after an ajax prependage to the table. I > > am having trouble deciding the best way to update the widgets this > > when the 'update' event is triggered. > > * These other widgets bind clicks events to elements in the new table > > rows as well as doing things like zebra striping the rows. This makes > > the browser go crazy as its trying to handle events and adding rows > > all at once. > > * The point of mashing other plugins with the tablesorter using the > > widget system:- Currently the mashed widget has to be added before the > > settings for for said plugin are added to tablesorter. ie > > > $("table").tablesorter({ > > > widgets: ["mashWidget"], > > widgetMashSettings : { > >url : 'somejson.php', > >callback : insertJsonIntoTable, > >timeout : 3000 > > } > > > }); > > > I haven't even started on resorting the table after rows are added > > yet... > > > This widget thing is so exciting to me. Hopefully it will encourage a > > whole load of activity form the community - a widget repository might > > be nice! > > > cheers > > > Luke > > > Oh yeah - and I have a plan dynamically loading date parsers based on > > locale settings. > > > On 20 Aug, 23:17, "Christian Bach" <[EMAIL PROTECTED]> > > wrote: > > > > Hi Lukek, > > > > I took an other approach to this. > > > > Check out:http://tablesorter.com/docs/example-extending-defaults.html > > > > Regards > > > Christian > > > > 2007/8/20, lukek <[EMAIL PROTECTED]>: > > > > > Been having a further poke around. > > > > > I have done what Christian suggested and merged the widgets and parser > > > > arrays of this.config with those in settings. However now I have > > > > realised the constructor is being called twice - or the number of > > > > levels of inheritance. > > > > > So many options not sure what to do... > > > > > On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > > > > > Thanks for getting back Christian - only just seen you post. > > > > > > I look forward to the fix. I will tinker with it and see what I come > > > > > up with until then. > > > > > > By the way I had another question. -- In the unpacked version of the > > > > > latest script your comment on line 555 says "apply easy methods that > > > > > trigger binded events". > > > > > > Does this mean I can insert function calls in here - ie around line > > > > > 560? > > > > > > I say this because I have added a call to applyWidget() as I reckon > > > > > all the widgets should be reloaded when the update event is triggered > > > > > - eg after I insert rows I want to reapply the zebra widget. Unless I > > > > > missed something or your plan was to control this a
[jQuery] Re: Tablesorter 2.0
I have a second feature request as well. Would it be possible to support multiple rows in the ? I have a table setup with a second row in the , but this seems to break the tablesorter when I try to sort anything. I get the following error: o has no properties Line 395: o.count = s[1]; For this particular implementation, I have no need for sorting on anything in the second row, I just need it to always stay at the top just below the first header row. If I move it out of the it becomes are part of the sortable data which is not what I'm after. BTW, I didn't say so before, but this plugin is AWESOME! I am using it in conjunction with the tablesorter.cookie plugin that James wrote and they are both incredible for our environment. Thanks to everyone who has contributed thus far! On Aug 21, 2:14 pm, tlphipps <[EMAIL PROTECTED]> wrote: > I have what I guess would be a feature request for the tablesorter. > > Some of our larger tables take a few seconds to sort and I would like > to be able to display a message for our users to indicate that a sort > is in progress. So basically, user clicks on , message overlays > table saying "sort in progress", then when sort finishes, message is > removed. I explored the options available via widgets, but it appears > that the widgets are only called when the tablesorter is initially > attached to the table, and then again when the sort is complete. > Would it be possible to have a 'callforward' (don't know what to call > the opposite of a callback) that would allow for writing a widget to > display this user notification message? > > Or can anyone suggest another method for doing this type of > notification? > > On Aug 21, 4:09 am, lukek <[EMAIL PROTECTED]> wrote: > > > This is interesting. I was thinking along these lines but was > > interested to know how you - being the designer - would implement it. > > > Thanks for you help. > > > I'll tell you what I am working on at the moment. I'd be interested to > > know what you thoughts are, if you have any pointers or have thought > > about this kind of thing yourself. > > > I have a sortable "Document History" table for a collaborative > > document-writing app (eg the table has columns such as Doc name, last > > mod timestamp, last user, link to D/L the doc). There will eventually > > be history tables for multiple documents on one page. I am mashing up > > your Tablesorter with Remy Sharp's Spy. > > > What has been interesting so far is: > > * reloading all the widgets after an ajax prependage to the table. I > > am having trouble deciding the best way to update the widgets this > > when the 'update' event is triggered. > > * These other widgets bind clicks events to elements in the new table > > rows as well as doing things like zebra striping the rows. This makes > > the browser go crazy as its trying to handle events and adding rows > > all at once. > > * The point of mashing other plugins with the tablesorter using the > > widget system:- Currently the mashed widget has to be added before the > > settings for for said plugin are added to tablesorter. ie > > > $("table").tablesorter({ > > > widgets: ["mashWidget"], > > widgetMashSettings : { > >url : 'somejson.php', > >callback : insertJsonIntoTable, > >timeout : 3000 > > } > > > }); > > > I haven't even started on resorting the table after rows are added > > yet... > > > This widget thing is so exciting to me. Hopefully it will encourage a > > whole load of activity form the community - a widget repository might > > be nice! > > > cheers > > > Luke > > > Oh yeah - and I have a plan dynamically loading date parsers based on > > locale settings. > > > On 20 Aug, 23:17, "Christian Bach" <[EMAIL PROTECTED]> > > wrote: > > > > Hi Lukek, > > > > I took an other approach to this. > > > > Check out:http://tablesorter.com/docs/example-extending-defaults.html > > > > Regards > > > Christian > > > > 2007/8/20, lukek <[EMAIL PROTECTED]>: > > > > > Been having a further poke around. > > > > > I have done what Christian suggested and merged the widgets and parser > > > > arrays of this.config with those in settings. However now I have > > > > realised the constructor is being called twice - or the number of > > > > levels of inheritance. > > > > > So many options not sure what to do... > > > > > On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > > > > > Thanks for getting back Christian - only just seen you post. > > > > > > I look forward to the fix. I will tinker with it and see what I come > > > > > up with until then. > > > > > > By the way I had another question. -- In the unpacked version of the > > > > > latest script your comment on line 555 says "apply easy methods that > > > > > trigger binded events". > > > > > > Does this mean I can insert function calls in here - ie around line > > > > > 560? > > > > > > I say this because I have added a call to app
[jQuery] Re: Tablesorter 2.0
I have what I guess would be a feature request for the tablesorter. Some of our larger tables take a few seconds to sort and I would like to be able to display a message for our users to indicate that a sort is in progress. So basically, user clicks on , message overlays table saying "sort in progress", then when sort finishes, message is removed. I explored the options available via widgets, but it appears that the widgets are only called when the tablesorter is initially attached to the table, and then again when the sort is complete. Would it be possible to have a 'callforward' (don't know what to call the opposite of a callback) that would allow for writing a widget to display this user notification message? Or can anyone suggest another method for doing this type of notification? On Aug 21, 4:09 am, lukek <[EMAIL PROTECTED]> wrote: > This is interesting. I was thinking along these lines but was > interested to know how you - being the designer - would implement it. > > Thanks for you help. > > I'll tell you what I am working on at the moment. I'd be interested to > know what you thoughts are, if you have any pointers or have thought > about this kind of thing yourself. > > I have a sortable "Document History" table for a collaborative > document-writing app (eg the table has columns such as Doc name, last > mod timestamp, last user, link to D/L the doc). There will eventually > be history tables for multiple documents on one page. I am mashing up > your Tablesorter with Remy Sharp's Spy. > > What has been interesting so far is: > * reloading all the widgets after an ajax prependage to the table. I > am having trouble deciding the best way to update the widgets this > when the 'update' event is triggered. > * These other widgets bind clicks events to elements in the new table > rows as well as doing things like zebra striping the rows. This makes > the browser go crazy as its trying to handle events and adding rows > all at once. > * The point of mashing other plugins with the tablesorter using the > widget system:- Currently the mashed widget has to be added before the > settings for for said plugin are added to tablesorter. ie > > $("table").tablesorter({ > > widgets: ["mashWidget"], > widgetMashSettings : { >url : 'somejson.php', >callback : insertJsonIntoTable, >timeout : 3000 > } > > }); > > I haven't even started on resorting the table after rows are added > yet... > > This widget thing is so exciting to me. Hopefully it will encourage a > whole load of activity form the community - a widget repository might > be nice! > > cheers > > Luke > > Oh yeah - and I have a plan dynamically loading date parsers based on > locale settings. > > On 20 Aug, 23:17, "Christian Bach" <[EMAIL PROTECTED]> > wrote: > > > Hi Lukek, > > > I took an other approach to this. > > > Check out:http://tablesorter.com/docs/example-extending-defaults.html > > > Regards > > Christian > > > 2007/8/20, lukek <[EMAIL PROTECTED]>: > > > > Been having a further poke around. > > > > I have done what Christian suggested and merged the widgets and parser > > > arrays of this.config with those in settings. However now I have > > > realised the constructor is being called twice - or the number of > > > levels of inheritance. > > > > So many options not sure what to do... > > > > On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > > > > Thanks for getting back Christian - only just seen you post. > > > > > I look forward to the fix. I will tinker with it and see what I come > > > > up with until then. > > > > > By the way I had another question. -- In the unpacked version of the > > > > latest script your comment on line 555 says "apply easy methods that > > > > trigger binded events". > > > > > Does this mean I can insert function calls in here - ie around line > > > > 560? > > > > > I say this because I have added a call to applyWidget() as I reckon > > > > all the widgets should be reloaded when the update event is triggered > > > > - eg after I insert rows I want to reapply the zebra widget. Unless I > > > > missed something or your plan was to control this action in some other > > > > way. > > > > > Thanks > > > > > Luke > > > > > On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Lukek, > > > > > > I will supply a fix for this after the weekend. If you cant wait that > > > > > long a tip is that if this.config exists that should be extended > > > > > instead of the defaults. /christian > > > > > 2007/8/17, lukek <[EMAIL PROTECTED]>: > > > > > > > Hi, > > > > > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach! > > > > > > Great piece of work. > > > > > > > I am having problems getting tables to inherit widgets. I am not > > > sure > > > > > > if its the way $.extend() merges arrays when passing the settings > > > > > > object to thetablesorter.construct() func
[jQuery] Re: Tablesorter 2.0
This is interesting. I was thinking along these lines but was interested to know how you - being the designer - would implement it. Thanks for you help. I'll tell you what I am working on at the moment. I'd be interested to know what you thoughts are, if you have any pointers or have thought about this kind of thing yourself. I have a sortable "Document History" table for a collaborative document-writing app (eg the table has columns such as Doc name, last mod timestamp, last user, link to D/L the doc). There will eventually be history tables for multiple documents on one page. I am mashing up your Tablesorter with Remy Sharp's Spy. What has been interesting so far is: * reloading all the widgets after an ajax prependage to the table. I am having trouble deciding the best way to update the widgets this when the 'update' event is triggered. * These other widgets bind clicks events to elements in the new table rows as well as doing things like zebra striping the rows. This makes the browser go crazy as its trying to handle events and adding rows all at once. * The point of mashing other plugins with the tablesorter using the widget system:- Currently the mashed widget has to be added before the settings for for said plugin are added to tablesorter. ie $("table").tablesorter({ widgets: ["mashWidget"], widgetMashSettings : { url : 'somejson.php', callback : insertJsonIntoTable, timeout : 3000 } }); I haven't even started on resorting the table after rows are added yet... This widget thing is so exciting to me. Hopefully it will encourage a whole load of activity form the community - a widget repository might be nice! cheers Luke Oh yeah - and I have a plan dynamically loading date parsers based on locale settings. On 20 Aug, 23:17, "Christian Bach" <[EMAIL PROTECTED]> wrote: > Hi Lukek, > > I took an other approach to this. > > Check out:http://tablesorter.com/docs/example-extending-defaults.html > > Regards > Christian > > 2007/8/20, lukek <[EMAIL PROTECTED]>: > > > > > > > Been having a further poke around. > > > I have done what Christian suggested and merged the widgets and parser > > arrays of this.config with those in settings. However now I have > > realised the constructor is being called twice - or the number of > > levels of inheritance. > > > So many options not sure what to do... > > > On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > > > Thanks for getting back Christian - only just seen you post. > > > > I look forward to the fix. I will tinker with it and see what I come > > > up with until then. > > > > By the way I had another question. -- In the unpacked version of the > > > latest script your comment on line 555 says "apply easy methods that > > > trigger binded events". > > > > Does this mean I can insert function calls in here - ie around line > > > 560? > > > > I say this because I have added a call to applyWidget() as I reckon > > > all the widgets should be reloaded when the update event is triggered > > > - eg after I insert rows I want to reapply the zebra widget. Unless I > > > missed something or your plan was to control this action in some other > > > way. > > > > Thanks > > > > Luke > > > > On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]> > > > wrote: > > > > > Lukek, > > > > > I will supply a fix for this after the weekend. If you cant wait that > > > > long a tip is that if this.config exists that should be extended > > > > instead of the defaults. /christian > > > > 2007/8/17, lukek <[EMAIL PROTECTED]>: > > > > > > Hi, > > > > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach! > > > > > Great piece of work. > > > > > > I am having problems getting tables to inherit widgets. I am not > > sure > > > > > if its the way $.extend() merges arrays when passing the settings > > > > > object to thetablesorter.construct() function or what but when I add > > > > > more widgets it seems to overwrite the ones I added previously. > > > > > > EXAMPLE: > > > > > > ... > > > > > > ... > > > > > > > > > > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget', > > > > > 'anotherWidget'] } ); > > > > > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] } > > ); > > > > > > > > > > > > Do you see what I'm doing? "#myTable2" should now have all four > > > > > widgets. > > > > > > But that's not what happens. > > > > > > Can anyone kindle point me in the right direction > > > > > > cheers > > > > > > Luke- Hide quoted text - > > - Show quoted text -
[jQuery] Re: TableSorter 2.0 documentation notes
Thanks Chris, The docs are know updated. /christian 2007/8/19, Chris <[EMAIL PROTECTED]>: > > > Two easy to fix errors: > > The example code in Getting Started uses tableSorter() several times > rather than tablesorter(). Threw me off till I compared my code with > other examples. > > http://tablesorter.com/docs/#Getting-Started > > The example code for text extraction has comments left over from > forced sorting. > > http://tablesorter.com/docs/example-option-text-extraction.html > >
[jQuery] Re: Tablesorter 2.0
Hi Lukek, I took an other approach to this. Check out: http://tablesorter.com/docs/example-extending-defaults.html Regards Christian 2007/8/20, lukek <[EMAIL PROTECTED]>: > > > Been having a further poke around. > > I have done what Christian suggested and merged the widgets and parser > arrays of this.config with those in settings. However now I have > realised the constructor is being called twice - or the number of > levels of inheritance. > > So many options not sure what to do... > > > > On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > > Thanks for getting back Christian - only just seen you post. > > > > I look forward to the fix. I will tinker with it and see what I come > > up with until then. > > > > By the way I had another question. -- In the unpacked version of the > > latest script your comment on line 555 says "apply easy methods that > > trigger binded events". > > > > Does this mean I can insert function calls in here - ie around line > > 560? > > > > I say this because I have added a call to applyWidget() as I reckon > > all the widgets should be reloaded when the update event is triggered > > - eg after I insert rows I want to reapply the zebra widget. Unless I > > missed something or your plan was to control this action in some other > > way. > > > > Thanks > > > > Luke > > > > On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]> > > wrote: > > > > > Lukek, > > > > > I will supply a fix for this after the weekend. If you cant wait that > > > long a tip is that if this.config exists that should be extended > > > instead of the defaults. /christian > > > 2007/8/17, lukek <[EMAIL PROTECTED]>: > > > > > > Hi, > > > > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach! > > > > Great piece of work. > > > > > > I am having problems getting tables to inherit widgets. I am not > sure > > > > if its the way $.extend() merges arrays when passing the settings > > > > object to thetablesorter.construct() function or what but when I add > > > > more widgets it seems to overwrite the ones I added previously. > > > > > > EXAMPLE: > > > > > > ... > > > > > > ... > > > > > > > > > > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget', > > > > 'anotherWidget'] } ); > > > > > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] } > ); > > > > > > > > > > > > Do you see what I'm doing? "#myTable2" should now have all four > > > > widgets. > > > > > > But that's not what happens. > > > > > > Can anyone kindle point me in the right direction > > > > > > cheers > > > > > > Luke > >
[jQuery] Re: Tablesorter 2.0
Been having a further poke around. I have done what Christian suggested and merged the widgets and parser arrays of this.config with those in settings. However now I have realised the constructor is being called twice - or the number of levels of inheritance. So many options not sure what to do... On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote: > Thanks for getting back Christian - only just seen you post. > > I look forward to the fix. I will tinker with it and see what I come > up with until then. > > By the way I had another question. -- In the unpacked version of the > latest script your comment on line 555 says "apply easy methods that > trigger binded events". > > Does this mean I can insert function calls in here - ie around line > 560? > > I say this because I have added a call to applyWidget() as I reckon > all the widgets should be reloaded when the update event is triggered > - eg after I insert rows I want to reapply the zebra widget. Unless I > missed something or your plan was to control this action in some other > way. > > Thanks > > Luke > > On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]> > wrote: > > > Lukek, > > > I will supply a fix for this after the weekend. If you cant wait that > > long a tip is that if this.config exists that should be extended > > instead of the defaults. /christian > > 2007/8/17, lukek <[EMAIL PROTECTED]>: > > > > Hi, > > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach! > > > Great piece of work. > > > > I am having problems getting tables to inherit widgets. I am not sure > > > if its the way $.extend() merges arrays when passing the settings > > > object to thetablesorter.construct() function or what but when I add > > > more widgets it seems to overwrite the ones I added previously. > > > > EXAMPLE: > > > > ... > > > > ... > > > > > > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget', > > > 'anotherWidget'] } ); > > > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] } ); > > > > > > > > Do you see what I'm doing? "#myTable2" should now have all four > > > widgets. > > > > But that's not what happens. > > > > Can anyone kindle point me in the right direction > > > > cheers > > > > Luke
[jQuery] Re: Tablesorter 2.0
Thanks for getting back Christian - only just seen you post. I look forward to the fix. I will tinker with it and see what I come up with until then. By the way I had another question. -- In the unpacked version of the latest script your comment on line 555 says "apply easy methods that trigger binded events". Does this mean I can insert function calls in here - ie around line 560? I say this because I have added a call to applyWidget() as I reckon all the widgets should be reloaded when the update event is triggered - eg after I insert rows I want to reapply the zebra widget. Unless I missed something or your plan was to control this action in some other way. Thanks Luke On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]> wrote: > Lukek, > > I will supply a fix for this after the weekend. If you cant wait that > long a tip is that if this.config exists that should be extended > instead of the defaults. /christian > 2007/8/17, lukek <[EMAIL PROTECTED]>: > > > > > Hi, > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach! > > Great piece of work. > > > I am having problems getting tables to inherit widgets. I am not sure > > if its the way $.extend() merges arrays when passing the settings > > object to thetablesorter.construct() function or what but when I add > > more widgets it seems to overwrite the ones I added previously. > > > EXAMPLE: > > > ... > > > ... > > > > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget', > > 'anotherWidget'] } ); > > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] } ); > > > > > > Do you see what I'm doing? "#myTable2" should now have all four > > widgets. > > > But that's not what happens. > > > Can anyone kindle point me in the right direction > > > cheers > > > Luke
[jQuery] Re: TableSorter 2.0 pager bug
Re my second point (two page display containers), perhaps another approach would be to let users specify optional separate top and bottom containers. That could also remove the need for positionFixed, if one assumes a bottom container always needs to be moved. On Aug 19, 4:15 pm, Chris <[EMAIL PROTECTED]> wrote: > Simple, I think. I tried putting the page view control at the top of > my table and setting positionFixed to false, but it still jumped to > the bottom when I changed page size. > > Either savePage() or fixPosition() should check positionFixed before > moving the page number container. > > if fixPosition() checks positionFixed, then the check on positionFixed > inside renderTable() can be removed,so that seems like the better > change. > > Or did I miss the point? > > What I'd actually like even better is allowing a page view control at > both the top and bottom of the table.
[jQuery] Re: Tablesorter 2.0
Lukek, I will supply a fix for this after the weekend. If you cant wait that long a tip is that if this.config exists that should be extended instead of the defaults. /christian 2007/8/17, lukek <[EMAIL PROTECTED]>: > > Hi, > > I have just been playing with the new Tablesorter 2.0. Thanks Mr Bach! > Great piece of work. > > I am having problems getting tables to inherit widgets. I am not sure > if its the way $.extend() merges arrays when passing the settings > object to the tablesorter.construct() function or what but when I add > more widgets it seems to overwrite the ones I added previously. > > EXAMPLE: > > ... > > ... > > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget', > 'anotherWidget'] } ); > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] } ); > > > > Do you see what I'm doing? "#myTable2" should now have all four > widgets. > > But that's not what happens. > > Can anyone kindle point me in the right direction > > cheers > > Luke > >
[jQuery] Re: tablesorter 2.0 released
A great plugin that is now even better. You have put a lot of time into this it seems and it has come on a long way since the first table sorter release. You managed to get a good url for it as well.
[jQuery] Re: tablesorter 2.0 - Shiny Brand new documentation!
Christian Bach wrote: > After many late night i have managed to sort out a documentation/FAQ, > for the new 2.0 release. > > The new tablesorter will be released next week. It's all looking great! Thanks!
[jQuery] Re: tablesorter 2.0 - Shiny Brand new documentation!
On Jul 16, 10:02 pm, "Christian Bach" <[EMAIL PROTECTED]> wrote: > The new documentation is located > here:http://lovepeacenukes.com/tablesorter/2.0/docs/ Slick :). A quick bug report for you: Under: "Disabling headers, with inline options" Clicking the "Major" column sorts by a different column (maybe the "Sex" column?), not the Major column. (i would recommend renaming "Sex" to "Gender", by the way.) :)