changeset 31:b5432d74841a

Update for key/mouse handler change
author Adam Chlipala <adam@chlipala.net>
date Sat, 21 Jul 2012 10:15:14 -0400
parents c1f06342c81f
children d32fb0f7b137
files calendar.ur datebox.ur popupNav.ur remotePager.ur togglePanel.ur
diffstat 5 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/calendar.ur	Sat May 12 10:07:45 2012 -0400
+++ b/calendar.ur	Sat Jul 21 10:15:14 2012 -0400
@@ -134,7 +134,7 @@
                                                        <xml><td class={selday}>{[day]}</td></xml>
                                                    else case month of
                                                             This => <xml><td class={curday}
-                                                                             onclick={SourceL.set t.Day thisDate}>{[day]}</td></xml>
+                                                                             onclick={fn _ => SourceL.set t.Day thisDate}>{[day]}</td></xml>
                                                           | _ => <xml><td class={otherday}>{[day]}</td></xml>)
                                        end}/>
                             {let
@@ -181,18 +181,18 @@
           <table class={calendar}>
             <tr>
               <th class={prev} colspan={2}
-                  onclick={minf <- rpc (monthInfo (if minf.ThisMonth = 1 then
-                                                       {Month = 12, Year = minf.Year - 1}
-                                                   else
-                                                       {Month = minf.ThisMonth - 1, Year = minf.Year}));
-                           set t.Month minf}>&lt;&lt; {[minf.PrevMonthName]}</th>
+                  onclick={fn _ => minf <- rpc (monthInfo (if minf.ThisMonth = 1 then
+                                                               {Month = 12, Year = minf.Year - 1}
+                                                           else
+                                                               {Month = minf.ThisMonth - 1, Year = minf.Year}));
+                              set t.Month minf}>&lt;&lt; {[minf.PrevMonthName]}</th>
                   <th class={this} colspan={3}>{[minf.ThisMonthName]} {[minf.Year]}</th>
                   <th class={next} colspan={2}
-                      onclick={minf <- rpc (monthInfo (if minf.ThisMonth = 12 then
-                                                           {Month = 1, Year = minf.Year + 1}
-                                                       else
-                                                           {Month = minf.ThisMonth + 1, Year = minf.Year}));
-                               set t.Month minf}>{[minf.NextMonthName]} >></th>
+                      onclick={fn _ => minf <- rpc (monthInfo (if minf.ThisMonth = 12 then
+                                                                   {Month = 1, Year = minf.Year + 1}
+                                                               else
+                                                                   {Month = minf.ThisMonth + 1, Year = minf.Year}));
+                                  set t.Month minf}>{[minf.NextMonthName]} >></th>
             </tr>
             <tr class={weekday}> <th>M</th> <th>Tu</th> <th>W</th> <th>Th</th> <th>F</th> <th>Sa</th> <th>Su</th> </tr>
             {rows (if minf.ThisMonth = 1 && (case minf.MondayMonth of This => False | _ => True) then
--- a/datebox.ur	Sat May 12 10:07:45 2012 -0400
+++ b/datebox.ur	Sat Jul 21 10:15:14 2012 -0400
@@ -10,8 +10,8 @@
 val format : TogglePanel.formatCtl body' = fn [[Dyn] ~ body'] =>
     TogglePanel.defaultFormat
         -- #OpenCtl -- #CloseCtl
-        ++ {OpenCtl = fn behaviour => <xml><button value="Choose" onclick={behaviour}/></xml>,
-            CloseCtl = fn behaviour => <xml><button value="Hide" onclick={behaviour}/></xml>}
+        ++ {OpenCtl = fn behaviour => <xml><button value="Choose" onclick={fn _ => behaviour}/></xml>,
+            CloseCtl = fn behaviour => <xml><button value="Hide" onclick={fn _ => behaviour}/></xml>}
 
 fun create tm =
     cal <- Calendar.create tm;
--- a/popupNav.ur	Sat May 12 10:07:45 2012 -0400
+++ b/popupNav.ur	Sat Jul 21 10:15:14 2012 -0400
@@ -7,8 +7,8 @@
 
 val defaultFormat = {FormatMenu = fn ctl menu => <xml>{ctl}{menu}</xml>,
                      WrapMenu = fn menu => <xml><ul>{menu}</ul></xml>,
-                     OpenCtl = fn behaviour => <xml><button value="Open" onclick={behaviour}/></xml>,
-                     CloseCtl = fn behaviour => <xml><button value="Close" onclick={behaviour}/></xml>}
+                     OpenCtl = fn behaviour => <xml><button value="Open" onclick={fn _ => behaviour}/></xml>,
+                     CloseCtl = fn behaviour => <xml><button value="Close" onclick={fn _ => behaviour}/></xml>}
 
 open Navbar
 
--- a/remotePager.ur	Sat May 12 10:07:45 2012 -0400
+++ b/remotePager.ur	Sat Jul 21 10:15:14 2012 -0400
@@ -13,15 +13,15 @@
 
 fun defaultFormatLbl {First = fLbl, Back = bLbl, Next = nLbl, Last = lLbl} =
     let
-        fun mkLink c txt = fn a => <xml><li onclick={a} class={c}><a class={c} onclick={return ()}>{[txt]}</a></li></xml>
+        fun mkLink c txt = fn a => <xml><li onclick={fn _ => a} class={c}><a class={c} onclick={fn _ => return ()}>{[txt]}</a></li></xml>
     in
         {Width = 5,
          RangeCtl = {First = mkLink firstCtl fLbl,
                      Back = mkLink backCtl bLbl,
                      Next = mkLink nextCtl nLbl,
                      Last = mkLink lastCtl lLbl},
-         PageCtl = {Unsel = fn n a => <xml><li onclick={a}><a onclick={return ()}>{[n + 1]}</a></li></xml>,
-                    Sel = fn n a => <xml><li onclick={a} class={curPage}><a class={curPage} onclick={return ()}>{[n + 1]}</a></li></xml>},
+         PageCtl = {Unsel = fn n a => <xml><li onclick={fn _ => a}><a onclick={fn _ => return ()}>{[n + 1]}</a></li></xml>,
+                    Sel = fn n a => <xml><li onclick={fn _ => a} class={curPage}><a class={curPage} onclick={fn _ => return ()}>{[n + 1]}</a></li></xml>},
          WrapPageCtl = fn x => x,
          Wrap = fn {First = f, Back = b, Pages = p, Next = n, Last = l} => <xml><ul class={rangeCtl}>{f}{b}{p}{n}{l}</ul></xml>}
     end
--- a/togglePanel.ur	Sat May 12 10:07:45 2012 -0400
+++ b/togglePanel.ur	Sat Jul 21 10:15:14 2012 -0400
@@ -9,8 +9,8 @@
 
 val defaultFormat [[Dyn] ~ body'] =
     {FormatPanel = fn ctl panel => <xml>{ctl}{panel}</xml>,
-     OpenCtl = fn behaviour => <xml><button value="Open" onclick={behaviour}/></xml>,
-     CloseCtl = fn behaviour => <xml><button value="Close" onclick={behaviour}/></xml>}
+     OpenCtl = fn behaviour => <xml><button value="Open" onclick={fn _ => behaviour}/></xml>,
+     CloseCtl = fn behaviour => <xml><button value="Close" onclick={fn _ => behaviour}/></xml>}
                     
 con togglePanel t ctx = {PanelState : source panelState,
                          FormatCtl : formatCtl ctx,