Mercurial > urweb
diff demo/more/dragList.ur @ 917:321a2d6feb40
dragList demo working, save for Gecko load delay and highlighting
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 08 Sep 2009 10:55:49 -0400 |
parents | b873feb3eb52 |
children | 6a77c3e33908 |
line wrap: on
line diff
--- a/demo/more/dragList.ur Tue Sep 08 10:18:19 2009 -0400 +++ b/demo/more/dragList.ur Tue Sep 08 10:55:49 2009 -0400 @@ -10,11 +10,12 @@ onmouseover={di <- get draggingItem; case di of None => return () - | Some di => item1 <- get di; - item2 <- get itemSource; - set di item2; - set itemSource item1}> - <dyn signal={s <- signal itemSource; return <xml>{[s]}</xml>}/> + | Some di => original <- get di; + movedOver <- get itemSource; + set di movedOver; + set itemSource original; + set draggingItem (Some itemSource)}> + <dyn signal={Monad.mp (fn s => <xml>{[s]}</xml>) (signal itemSource)}/> </li></xml>) itemSources} </ul> </xml> @@ -26,8 +27,13 @@ :: "Sus scrofa ussuricus" :: "Sus scrofa cristatus" :: "Sus scrofa taiwanus" :: []); - return <xml><body> - {bears} - {beers} - {boars} - </body></xml> + return <xml> + <head> + <link rel="stylesheet" type="text/css" href="../../dragList.css"/> + </head> + <body> + {bears} + {beers} + {boars} + </body> + </xml>