[damned-lies] Use ISO date format for table sorting



commit d4ca363e9956aa67b8a56e015afbde5d3b8fd4a8
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Jun 24 12:05:30 2010 +0200

    Use ISO date format for table sorting

 templates/people/person_detail.html |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/templates/people/person_detail.html b/templates/people/person_detail.html
index 86830cf..2fa5ad4 100644
--- a/templates/people/person_detail.html
+++ b/templates/people/person_detail.html
@@ -8,7 +8,11 @@
 <script type="text/javascript">
 $(document).ready(function() 
     { 
-        $("#working_on").tablesorter(); 
+        $("#working_on").tablesorter({
+            headers: {
+                0: { sorter:'text' }
+            },
+            sortList: [[0,0]] });
     }
 );
 </script>
@@ -51,12 +55,12 @@ $(document).ready(function()
 
 <table class="tablesorter" id="working_on">
 <thead><tr>
-  <th class="header">{% trans "Date" %}</th><th>{% trans "Module" %}</th><th>{% trans "State" %}</th>
+  <th>{% trans "Date" %}</th><th>{% trans "Module" %}</th><th>{% trans "State" %}</th>
 </tr></thead>
 <tbody>
 {% for state in states %}
 <tr>
-  <td><span style="display: none;">{{ state.updated }}</span>{{ state.updated|naturalday:dateformat }}</td>
+  <td><span style="display: none;">{{ state.updated|date:"c" }}</span>{{ state.updated|naturalday:dateformat }}</td>
   <td><a href="{{ state.get_absolute_url }}">{{ state.branch.module.get_description }} - {{ state.branch.name }} - {{ state.domain.get_description }} - {{ state.language.get_name }}</a></td>
   <td>{{ state.get_state }}</td>
 </tr>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]