Revision: 4307 http://vexi.svn.sourceforge.net/vexi/?rev=4307&view=rev Author: clrg Date: 2011-12-19 01:53:32 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Fix monthfield/yearfield regression
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t trunk/org.vexi-vexi.widgets/src_poke/visualtest/datetime.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2011-12-13 06:44:35 UTC (rev 4306) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2011-12-19 01:53:32 UTC (rev 4307) @@ -1,11 +1,12 @@ <!-- Copyright 2011 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns:conf="vexi.conf" xmlns:lib="org.vexi.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" > + xmlns:classic="org.vexi.theme.classic" + xmlns="vexi.theme"> <meta:doc> <author>Charles Goodwin</author> @@ -14,7 +15,7 @@ <lib:role.popupable /> <lib:role.focusable /> <util:date /> - <bevel blockPress="true" form="down" margin="3" shrink="true"> + <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> <ui:box id="button" layout="layer" hshrink="true"> <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> @@ -168,6 +169,7 @@ thisbox.enabled ++= function(v) { cascade = v; + vexi.trace(new vexi.js.Exception(v)); var max = vexi.ui.maxdim; $button.maxheight = v ? max : 0; $select.enabled = v; @@ -176,6 +178,8 @@ $less.enabled = v; } + thisbox.form ++= function(v) { cascade = v; vexi.trace(new vexi.js.Exception(v)); } + thisbox.focused ++= function(v) { cascade = v; if (!focused and $editview.display) { @@ -273,7 +277,7 @@ selected = $day; </bevel> - <lib.finalize /> + <classic:lib.finalize /> static.init = { fill : .settings..fill }; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2011-12-13 06:44:35 UTC (rev 4306) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2011-12-19 01:53:32 UTC (rev 4307) @@ -1,11 +1,12 @@ <!-- Copyright 2011 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns:conf="vexi.conf" xmlns:lib="org.vexi.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" > + xmlns:classic="org.vexi.theme.classic" + xmlns="vexi.theme"> <meta:doc> <author>Charles Goodwin</author> @@ -13,8 +14,8 @@ <lib:role.popupable /> <lib:role.focusable /> - <bevel blockPress="true" form="down" margin="3" shrink="true"> - <ui:box layout="layer" hshrink="true"> + <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> + <ui:box id="button" layout="layer" hshrink="true"> <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> @@ -28,7 +29,7 @@ <lib:text.default id="edit" textalign="left" /> </ui:box> </lay:pad> - <ui:box orient="vertical" width="15"> + <ui:box id="moreless" orient="vertical" width="15"> <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> </classic:button> @@ -45,12 +46,12 @@ thisbox.dateview = $dateview; thisbox.sep = $sep; thisbox.th_bevel = thisbox; - thisbox.v_init = static.init; + thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; + thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; thisbox.value; ///> vexi.js.Date - thisbox.value ++= function(v) { cascade = v; @@ -111,12 +112,12 @@ thisbox.enabled ++= function(v) { cascade = v; + var max = vexi.ui.maxdim; + $button.maxheight = v ? max : 0; $select.enabled = v; + $moreless.maxheight = v ? max : 0; $more.enabled = v; $less.enabled = v; - $more.maxwidth = v ? vexi.ui.maxdim : 0; - $less.maxwidth = v ? vexi.ui.maxdim : 0; - $bg.fill = v ? "white" : "#d4d0c8"; } thisbox.focused ++= function(v) { @@ -216,9 +217,8 @@ thisbox.selected = $month; </bevel> + <classic:lib.finalize /> - static.init = .datefield..init; - var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box .datepicker(datepicker_box); Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2011-12-13 06:44:35 UTC (rev 4306) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2011-12-19 01:53:32 UTC (rev 4307) @@ -1,11 +1,12 @@ <!-- Copyright 2011 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns:conf="vexi.conf" xmlns:lib="org.vexi.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" > + xmlns:classic="org.vexi.theme.classic" + xmlns="vexi.theme"> <meta:doc> <author>Charles Goodwin</author> @@ -13,8 +14,8 @@ <lib:role.popupable /> <lib:role.focusable /> - <bevel blockPress="true" form="down" margin="3" shrink="true"> - <ui:box layout="layer" hshrink="true"> + <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> + <ui:box id="button" layout="layer" hshrink="true"> <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> @@ -26,7 +27,7 @@ <lib:text.default id="edit" textalign="left" /> </ui:box> </lay:pad> - <ui:box orient="vertical" width="15"> + <ui:box id="moreless" orient="vertical" width="15"> <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> </classic:button> @@ -43,8 +44,9 @@ thisbox.dateview = $dateview; thisbox.sep = $sep; thisbox.th_bevel = thisbox; - thisbox.v_init = static.init; + thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; + thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; thisbox.value; ///> vexi.js.Date @@ -105,12 +107,12 @@ thisbox.enabled ++= function(v) { cascade = v; + var max = vexi.ui.maxdim; + $button.maxheight = v ? max : 0; $select.enabled = v; + $moreless.maxheight = v ? max : 0; $more.enabled = v; $less.enabled = v; - $more.maxwidth = v ? vexi.ui.maxdim : 0; - $less.maxwidth = v ? vexi.ui.maxdim : 0; - $bg.fill = v ? "white" : "#d4d0c8"; } thisbox.focused ++= function(v) { @@ -211,9 +213,8 @@ thisbox.selected = $year; </bevel> + <classic:lib.finalize /> - static.init = .datefield..init; - var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box .datepicker(datepicker_box); Modified: trunk/org.vexi-vexi.widgets/src_poke/visualtest/datetime.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_poke/visualtest/datetime.t 2011-12-13 06:44:35 UTC (rev 4306) +++ trunk/org.vexi-vexi.widgets/src_poke/visualtest/datetime.t 2011-12-19 01:53:32 UTC (rev 4307) @@ -4,7 +4,25 @@ <w:timefield id="time"/> <w:datefield id="date"/> <w:datetime id="datetime"/> + <w:monthfield /> + <w:yearfield /> + <ui:box> + <w:button id="enable" text="Enable/Disable" /> + <w:button id="clear" text="Clear" /> + <vexi.theme.datefield /> + </ui:box> + $enable.action ++= function(v) { + var e = !$time.enabled; + for (var i,b in thisbox) + b.enabled = e; + } + + $clear.action ++= function(v) { + for (var i,b in thisbox) + b.value = null; + } + var printValueTrap = function(v){ cascade = v; vexi.trace(v); @@ -16,5 +34,6 @@ $datetime.value ++= printValueTrap; vexi.ui.frame = thisbox; + </ui:box> </vexi> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn