diff --git a/Yesod/Form/Jquery.hs b/Yesod/Form/Jquery.hs index deef1118..1d190f0c 100644 --- a/Yesod/Form/Jquery.hs +++ b/Yesod/Form/Jquery.hs @@ -57,7 +57,7 @@ jqueryDayFieldProfile = FieldProfile addScript' urlJqueryUiJs addStylesheet' urlJqueryUiCss addJavascript [$julius| -$$(function(){$$("#$theId$").datepicker({dateFormat:'yy-mm-dd'})}); +$(function(){$("#%theId%").datepicker({dateFormat:'yy-mm-dd'})}); |] } @@ -95,7 +95,7 @@ jqueryDayTimeFieldProfile = FieldProfile addScript' urlJqueryUiDateTimePicker addStylesheet' urlJqueryUiCss addJavascript [$julius| -$$(function(){$$("#$theId$").datetimepicker({dateFormat : "yyyy/mm/dd h:MM TT"})}); +$(function(){$("#%theId%").datetimepicker({dateFormat : "yyyy/mm/dd h:MM TT"})}); |] } @@ -130,7 +130,7 @@ jqueryAutocompleteFieldProfile src = FieldProfile addScript' urlJqueryUiJs addStylesheet' urlJqueryUiCss addJavascript [$julius| -$$(function(){$$("#$theId$").autocomplete({source:"@src@",minLength:2})}); +$(function(){$("#%theId%").autocomplete({source:"@src@",minLength:2})}); |] } diff --git a/Yesod/Form/Nic.hs b/Yesod/Form/Nic.hs index c1f6111f..0e450046 100644 --- a/Yesod/Form/Nic.hs +++ b/Yesod/Form/Nic.hs @@ -29,7 +29,7 @@ nicHtmlFieldProfile = FieldProfile , fpWidget = \theId name val _isReq -> do addBody [$hamlet|%textarea.html#$theId$!name=$name$ $val$|] addScript' urlNicEdit - addJavascript [$julius|bkLib.onDomLoaded(function(){new nicEditor({fullPanel:true}).panelInstance("$theId$")});|] + addJavascript [$julius|bkLib.onDomLoaded(function(){new nicEditor({fullPanel:true}).panelInstance("%theId%")});|] } addScript' :: (y -> Either (Route y) String) -> GWidget sub y () diff --git a/hellowidget.hs b/hellowidget.hs index 8c346952..6177d172 100644 --- a/hellowidget.hs +++ b/hellowidget.hs @@ -33,12 +33,12 @@ wrapper h = [$hamlet| #wrapper ^h^ %footer Brought to you by Yesod Widgets™ |] -getRootR = applyLayoutW $ flip wrapWidget wrapper $ do +getRootR = defaultLayout $ flip wrapWidget wrapper $ do i <- newIdent setTitle $ string "Hello Widgets" addStyle [$cassius| #$i$ - color:red + color: red |] addStylesheet $ StaticR $ StaticRoute ["style.css"] [] addStylesheetRemote "http://localhost:3000/static/style2.css" @@ -82,16 +82,16 @@ handleFormR = do let txt = case res of FormSuccess (_, _, _, _, _, _, _, _, _, _, Just x) -> Just x _ -> Nothing - applyLayoutW $ do + defaultLayout $ do addStyle [$cassius| .tooltip - color:#666 - font-style:italic + color: #666 + font-style: italic |] addStyle [$cassius| textarea.html - width:300px - height:150px + width: 300px + height: 150px |] wrapWidget form $ \h -> [$hamlet| %form!method=post!enctype=$enctype$ @@ -134,7 +134,7 @@ getCustomFormR = do |] return (Person <$> a1 <*> a2, b , c1 `mappend` c2) (_, wform, enctype) <- runFormGet customForm - applyLayoutW $ do + defaultLayout $ do form <- extractBody wform addBody [$hamlet| %form