as we already use jQuery in admin, and to improve perf on both piwogo's installations and especially on pem,
why not using a table sorter jQuery script (for ex: http://tablesorter.com/docs/ ) instead of refreshing the whole page ?
Last edited by repie38 (2009-04-09 08:43:38)
Offline
If no conflict with other jQuery scripts, to be generalized...
+1
Offline
repie38 wrote:
[...] to improve perf on both piwogo's installations and especially on pem
I'm not sure to understand. You mean the plugin lists in Piwigo admin or the extensions you can found on piwigo.org/ext?
Adding more and more dynamic behaviors in Piwigo admin is a good idea :-)
In Piwigo [Administration>Specials>Plugins>Other Plugins], we should also think about paginated list. I don't know what would be the behaviour of jQuery with paginated list. Can jQuery manage the pagination itself? (or else I suppose the sorting will be made only on visible rows)
Offline
plg wrote:
repie38 wrote:
[...] to improve perf on both piwogo's installations and especially on pem
I'm not sure to understand. You mean the plugin lists in Piwigo admin or the extensions you can found on piwigo.org/ext?
I mean the plugin lists in piwigo admin. because each time we sort the list with an order parameter, the page is completely refreshed, and I suppose another request is made to pem.
for the last part of your post, I didn't really understand. could you tell it in french to be sure ?
Offline
repie38 wrote:
I mean the plugin lists in piwigo admin
OK
repie38 wrote:
[...] and I suppose another request is made to pem.
(PEM is the web application used to manage Piwigo extensions). Yes, you are right.
repie38 wrote:
for the last part of your post, I didn't really understand
The main problem I see with javascript sorting is when the list has more than 1 page. If you have a single page with 100 rows, no problem. But if you have 5 pages with 20 rows on each page, how will javascript behave? Piwigo is currently coded so that PHP return only the 20 first rows for the first page. The javascript can't know what are the 80 remaining rows.
Offline
plg wrote:
The main problem I see with javascript sorting is when the list has more than 1 page. If you have a single page with 100 rows, no problem. But if you have 5 pages with 20 rows on each page, how will javascript behave? Piwigo is currently coded so that PHP return only the 20 first rows for the first page. The javascript can't know what are the 80 remaining rows.
you're right, i didn't think to that. For those case, javascript need to have to whole list avaible, either by displaying the needed rows, or by using ajax.
but it seems that piwigo return all results in 1 page (on my test galery, more than 30, on a v.2.0.1).
am I wrong ?
Offline
You're right: the plugin list is displayed on a single page.
I have in mind the user list and this one comes with 20 rows a page by default:
$conf['users_page'] = 20;
Offline
ok, so before this feature, we need to define if plugin list comes all in one, or as the user list, by block.
in my point of view, we should not take care of displaying problems (I mean, wide lists) , but only of performances.
I don't really know what's behind the plugin list, so give your opinions
;)
Last edited by repie38 (2009-04-15 00:45:18)
Offline