Revision: 3376
http://vexi.svn.sourceforge.net/vexi/?rev=3376&view=rev
Author: clrg
Date: 2009-01-29 15:32:45 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
Add table.sort() to re-sort using the last sort preferences
Modified Paths:
--------------
trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t
2009-01-26 14:32:19 UTC (rev 3375)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t
2009-01-29 15:32:45 UTC (rev 3376)
@@ -347,6 +347,16 @@
c.action = true;
}
+ /** re-sort based on the current sort column */
+ thisbox.sort = function() {
+ if (sortby==null) {
+ sortby = th_head[0];
+ if (sortby==null) return;
+ sortasc = true;
+ }
+ sortby.action = true;
+ }
+
/** sort by column when activated */
var actionWrite = function(v) {
vexi.thread = function(v) {
@@ -445,6 +455,7 @@
if (c and c.v_table_type == "body") {
th_body = c;
c.shrink = false;
+ c.sort = sort;
util.redirect..addRedirect(thisbox, c, "selected",
"selectedindex");
if (!fetchData) c.selected ++= scrollToSelected;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn