Revision: 3265
          http://vexi.svn.sourceforge.net/vexi/?rev=3265&view=rev
Author:   clrg
Date:     2008-12-11 04:40:51 +0000 (Thu, 11 Dec 2008)

Log Message:
-----------
Use correct order for dynamic table demo (sort is no longer always set)

Modified Paths:
--------------
    trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/table_dynamic.t

Modified: trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/table_dynamic.t
===================================================================
--- trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/table_dynamic.t       
2008-12-10 20:06:21 UTC (rev 3264)
+++ trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/table_dynamic.t       
2008-12-11 04:40:51 UTC (rev 3265)
@@ -57,17 +57,16 @@
             return primes[n];
         }
 
-        $table.fetchData = function(start, count, sortcol, sortasc)
-        {
+        $table.fetchData = function(start, count, sortcol, sortasc) {
             var data = [count];
+            /* this only works because all columns obey same order
+             * i.e. this is a cheap example since typical usage of
+             * dynamic tables will be to grab data from a source
+             * that will handle any sorting */
             if (sortcol == 1) sortasc = !sortasc;
+            if (sortcol == null) sortasc = true;
             for (var i=0; count>i; i++) {
-                /* this only works because all columns obey same order
-                 * i.e. this is a cheap example since typical usage of
-                 * dynamic tables will be to grab data from a source
-                 * that will handle any sorting */
                 var ind = sortasc ? start + i : N_ROWS - (start + i);
-                //vexi.log.info("ind " + ind);
                 data[i] = [5];
                 data[i][0] = ind;
                 data[i][1] = 0 - ind;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to