Revision: 1929
http://svn.sourceforge.net/vexi/?rev=1929&view=rev
Author: clrg
Date: 2007-07-06 00:09:32 -0700 (Fri, 06 Jul 2007)
Log Message:
-----------
Update datechooser to work with new grid layout widget
Modified Paths:
--------------
widgets/trunk/org.vexi.widgets/src/vexi/util/date/monthview.t
Modified: widgets/trunk/org.vexi.widgets/src/vexi/util/date/monthview.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/vexi/util/date/monthview.t
2007-07-06 07:09:14 UTC (rev 1928)
+++ widgets/trunk/org.vexi.widgets/src/vexi/util/date/monthview.t
2007-07-06 07:09:32 UTC (rev 1929)
@@ -1,6 +1,6 @@
<!-- Copyright 2006 Charles Goodwin -->
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
xmlns:win2k="org.vexi.theme.win2k.image" xmlns="vexi.widget">
+<vexi xmlns:ui="vexi://ui" xmlns:layout="vexi.layout" xmlns:meta="vexi://meta"
xmlns:win2k="org.vexi.theme.win2k.image" xmlns="vexi.widget">
<pad orient="vertical" fill="black" padding="1">
<ui:box fill="white" vshrink="true">
<button id="decmonth" fill="#d4d0c8" hshrink="true" margin="0"
padding="4 2">
@@ -21,8 +21,9 @@
<ui:box win2k:fill=".close" />
</button>
</ui:box>
- <ui:box fill="black" height="1" />
- <ui:box id="dategrid" cols="7" fill="white">
+ <ui:box fill="black" height="1" vshrink="true" />
+ <layout:grid id="dategrid" cols="7" fill="white" />
+ <ui:box id="holder" display="false">
<ui:box text="S" />
<ui:box text="M" />
<ui:box text="T" />
@@ -30,7 +31,13 @@
<ui:box text="T" />
<ui:box text="F" />
<ui:box text="S" />
- <ui:box colspan="7" fill="black" height="1" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
+ <ui:box fill="black" height="1" vshrink="true" />
</ui:box>
// public properties used to get the current seleted date */
@@ -90,11 +97,11 @@
var i=0;
var j=0;
// reset leading days
- while (weekday>i) { $dategrid[8+i].text = ""; i++; }
+ while (weekday>i) { $dategrid.getChild(14+i).text = ""; i++; }
// set active day dates
- while (numdays+weekday>i) { $dategrid[8+i].text = i+1-weekday;
i++; }
+ while (numdays+weekday>i) { $dategrid.getChild(14+i).text =
i+1-weekday; i++; }
// reset trailing days
- while (42>i) { $dategrid[8+i].text = ""; i++; }
+ while (42>i) { $dategrid.getChild(14+i).text = ""; i++; }
$month.text = toName(month);
$year.text = year;
@@ -105,7 +112,7 @@
olddate.textcolor = "black";
}
- olddate = $dategrid[8+weekday+day-1];
+ olddate = $dategrid.getChild(14+weekday+day-1);
if (olddate and isCurrent(day))
{
olddate.fill = "darkblue";
@@ -152,6 +159,9 @@
return true;
}
+ while ($holder.numchildren)
+ $dategrid[$dategrid.numchildren] = $holder[0];
+
// create boxes to contain the dates
for (var i=0; 42>i; i++)
{
@@ -192,7 +202,7 @@
olddate.textcolor = "black";
}
- olddate = $dategrid[8+weekday+day-1];
+ olddate = $dategrid.getChild(14+weekday+day-1);
if (olddate and isCurrent(day)) {
olddate.fill = "darkblue";
olddate.textcolor = "white";
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn