Sorted table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorted table

minitoma
Hello guys,

I would like to know if there is some kind of way to sort a table by name by cliking on a header column, so rows would be sorted by name according to this column.

Thomas
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Sorted table

Ted
No, not with Asciidoctor.


You might be able to use Asciidoctor to generate HTML and create links in your table header. Then use a JavaScript framework like jQuery DataTables to enable the column sorting.

Take a look at using the docinfo.html file when generating HTML http://asciidoctor.org/docs/user-manual/#docinfo-file That's a way you could add JavaScript.




- Ted @TedAtCIS
Reply | Threaded
Open this post in threaded view
|

Re: Sorted table

mojavelinux
Administrator
That's exactly what Neo did in GraphGist. For an example, see:


The cells in the header row of the table are clickable.

I wouldn't say that this isn't supported in Asciidoctor. I would say that it is a UI feature that requires the correct JavaScript in the page. We've certainly considered adding an option to include this JavaScript by default...but such an interactive feature does rely on support from JavaScript.

-Dan

On Fri, Apr 28, 2017 at 9:56 AM, Ted [via Asciidoctor :: Discussion] <[hidden email]> wrote:
No, not with Asciidoctor.


You might be able to use Asciidoctor to generate HTML and create links in your table header. Then use a JavaScript framework like jQuery DataTables to enable the column sorting.

Take a look at using the docinfo.html file when generating HTML http://asciidoctor.org/docs/user-manual/#docinfo-file That's a way you could add JavaScript.




- Ted @TedAtCIS



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Sorted-table-tp5542p5549.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux