Benji York wrote:
Martijn Faassen wrote:
[snip]
A second issue seems to me a bug in the javascript. When I use StandaloneSortFormatter I can click on the title of a column to sort
to see a sorted view. This works wonderfully well. Unfortunately the
 javascript is a bit simplistic in that it simply adds the
sort_on:list parameter over and over to the URL. This makes for very
long and ugly URLs. Want me to work on a bugfix?


Please.  The current JavaScript is very much "the simplest thing that
will possibly work".

I looked into it and have written some new JavaScript, but I realized that the sorting behavior currently is apparently dependent on the amount of items in the 'sort_on' list in the URL. As far as I can understand, getRequestSortOn flips the sorting order for each time a particular field is mentioned in the URL. I don't know how exactly this works in the case of form-based tables, where this information is, I believe, POSTed.

Encoding this information in the amount of times a particular item is present in the URL (or post body) seems odd. Was the motivation again "the simplest thing that will possibly work"? To really fix it, the sort order itself (forward or reversed) should be encoded in the URL (or POST), something like sort_forward=Column or sort_reversed=Column. I currently do not understand why this approach wasn't taken in the first place...

The third issue is more like a missing feature. I was playing with
the batching support, and I got it to work. Still, I had to write a
bit of batching code myself and to make it fully work, I'd have to
make sure of not showing 'previous' at the beginning of the fist
batch, not showing 'next' at the beginning of the last batch, and the
like.

Yes, when writing zc.table we weren't quite sure how the batching
should/would work and were using it in two independent projects.  Both
eventually grew code that's probably much like you wrote.  It would be
interesting to work on a "default batcher".

Maybe I'll get to look into this. I still need to consider how it all should work together with sorting. Any hints?

Regards,

Martijn
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to