(2016-04-17, 21:40:15)lokothodida Wrote:(2016-04-16, 18:45:42)DesruX Wrote:(2016-04-16, 05:52:57)lokothodida Wrote: The current beta addresses a) and b). c) seems like it should be implemented with Javascript, but have the option controlled server-side.
datiswous is also right about Client Files.
Thanks this is really usefull!! I have implemented the beta and it have not found any issues. I think you are right regarding c) . The setting could be controlled like a) and b) e.g.
(% simpledir key="subdir1" dirpath="somepath" urlpath="somepath" columns="name" order="-name" showinitial="5" %)
I will take a look at some jquery, must be something similar exsiting already that could be used.
Current beta now implements this with pagination from DataTables. There are now options for client-side filtering of results (and how many results to show per page), and sorting by clicking on the column.
I think the added features are sufficient for a v0.4 draft. If it is stable, I will publish it as a release.
Thanks for the update! I got some strange "-->" just before my head tag with the new update, but If I uncomment "queue_script('jquery', GSFRONT);" line 37 in simpledir.php then it goes away. Does not seem to break anything leaving it out.
Code:
queue_style('jquery-datatables', GSFRONT);
//queue_script('jquery', GSFRONT);
queue_script('jquery-datatables', GSFRONT);
I have been thinking a bit about the functionality. Let me describe my usecase, example:
Lets say I have 4 folders with different files, something like in each folder:
001_somefile
002_someotherfile
...files 003 to 079
080_alsoafile
081_latestfile
For each folder I have a page that displays the content of the folder, saying something like:
"Here are the relevant file, newest on top:"
081_latestfile
080_alsoafile
...files 003 to 079
002_someotherfile
001_somefile
For this I use the new features to sort and only have the name column, which works very also on phones:
(% simpledir key="subdir1" dirpath="somedir/folder1/" urlpath="somedir/folder1/" columns="name" order="-name" %)
What I would now like to have is an overview page that just shows me the 3 newest files from each folder and a link to page with the full file list, so something like:
"Here are the most recent files from folder1"
081_latestfile
080_alsoafile
079_thirdnewestfile
"See all files here" (link to my other page, just put manually in the page)
Regarding implementation I am thinking of a "showonly="3" parameter that only shows the 3 first files based on a given sort e.g:
(% simpledir key="subdir1" dirpath="somedir/folder1/" urlpath="somedir/folder1/" columns="name" order="-name" showonly="3" %)
Let me know what you think