HTML Tablesorter Package in Dart

Between trying to remember the Hurwitz criterion for stability, how a thyristor works and minimizing functions with Veitch-Karnaugh diagrams for my bachelor's degree exam (I major in Software Engineering, but the final exam also included topics from physics, analog circuits, control theory, etc), I managed to get some free time to work a little bit on improving the design of my blog.


This resulted in a simple HTML Tablesorter package for my Projects and Tutorials pages.

I have chosen Dart because I was really curious to see what was all the fuss about. Overall, I'm quite pleased with the language (reminds me of C\C++\Java).

How to use:

Dart

import "dart:html";
import "package:iskernel_html_tablesorter/html_tablesorter.dart";
void main()
{
TableSorter sorter = new TableSorter("#sortableTable");
sorter.enableSorting(true);
}

HTML

<!DOCTYPE html>
<html>
<head>
<title>example</title>
</head>
<body>
<table border="1" id="sortableTable">
<thead>
<th>Name</th><th>Age</th>
</thead>
<tbody>
<tr><td>John</td><td>20</td></tr>
<tr><td>Jim</td><td>51</td></tr>
<tr><td>Amy</td><td>40</td></tr>
<tr><td>Malcom</td><td>60</td></tr>
</tbody>
</table>
<script type="application/dart" src="iskernel_tablesorter_example.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>

The package is available on:

Pub (the package manager for Dart)
Github (source)

Q: How do you think the package can be improved? Do you have any new features in mind? Leave me a comment!

No comments :

Post a Comment