Revision: 1073
Author: tim.bunce
Date: Sat Feb 20 07:58:06 2010
Log: Sort the sortable tables on-load so the sorted column gets a sort arrow. RT#47924

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1073

Modified:
 /trunk/bin/nytprofhtml

=======================================
--- /trunk/bin/nytprofhtml      Mon Jan  4 12:33:17 2010
+++ /trunk/bin/nytprofhtml      Sat Feb 20 07:58:06 2010
@@ -269,6 +269,7 @@
     # make table sortable if it contains all the subs
     push @on_ready_js, q{
         $("#subs_table").tablesorter({
+            sortList: [[3,1]],
             headers: {
                 3: { sorter: 'fmt_time' },
                 4: { sorter: 'fmt_time' }
@@ -1191,10 +1192,10 @@
     print $fh '</table>';
     push @on_ready_js, q{
         $("#filestable").tablesorter({
+            sortList: [[1,1]],
             headers: {
                 1: { sorter: 'fmt_time' },
-                2: { sorter: 'fmt_time' },
-                3: { sorter: false      }
+                2: { sorter: false      }
             }
         });
     };
@@ -1310,6 +1311,7 @@
         # XXX I've no idea why this workaround is needed (or works).
         # without it the file table on the index page isn't sortable
         @on_ready_js = reverse @on_ready_js;
+
         $js = sprintf q{
<script type="text/javascript"> $(document).ready(function() { %s } ); </script>
         }, join("\n", '', @on_ready_js, '');

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to