julius $ -> %

This commit is contained in:
Michael Snoyman 2010-08-25 09:13:57 +03:00
parent f102b9882b
commit b0c2bf0a3b
3 changed files with 12 additions and 12 deletions

View File

@ -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})});
|]
}

View File

@ -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 ()

View File

@ -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