julius $ -> %
This commit is contained in:
parent
f102b9882b
commit
b0c2bf0a3b
@ -57,7 +57,7 @@ jqueryDayFieldProfile = FieldProfile
|
|||||||
addScript' urlJqueryUiJs
|
addScript' urlJqueryUiJs
|
||||||
addStylesheet' urlJqueryUiCss
|
addStylesheet' urlJqueryUiCss
|
||||||
addJavascript [$julius|
|
addJavascript [$julius|
|
||||||
$$(function(){$$("#$theId$").datepicker({dateFormat:'yy-mm-dd'})});
|
$(function(){$("#%theId%").datepicker({dateFormat:'yy-mm-dd'})});
|
||||||
|]
|
|]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ jqueryDayTimeFieldProfile = FieldProfile
|
|||||||
addScript' urlJqueryUiDateTimePicker
|
addScript' urlJqueryUiDateTimePicker
|
||||||
addStylesheet' urlJqueryUiCss
|
addStylesheet' urlJqueryUiCss
|
||||||
addJavascript [$julius|
|
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
|
addScript' urlJqueryUiJs
|
||||||
addStylesheet' urlJqueryUiCss
|
addStylesheet' urlJqueryUiCss
|
||||||
addJavascript [$julius|
|
addJavascript [$julius|
|
||||||
$$(function(){$$("#$theId$").autocomplete({source:"@src@",minLength:2})});
|
$(function(){$("#%theId%").autocomplete({source:"@src@",minLength:2})});
|
||||||
|]
|
|]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ nicHtmlFieldProfile = FieldProfile
|
|||||||
, fpWidget = \theId name val _isReq -> do
|
, fpWidget = \theId name val _isReq -> do
|
||||||
addBody [$hamlet|%textarea.html#$theId$!name=$name$ $val$|]
|
addBody [$hamlet|%textarea.html#$theId$!name=$name$ $val$|]
|
||||||
addScript' urlNicEdit
|
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 ()
|
addScript' :: (y -> Either (Route y) String) -> GWidget sub y ()
|
||||||
|
|||||||
@ -33,7 +33,7 @@ wrapper h = [$hamlet|
|
|||||||
#wrapper ^h^
|
#wrapper ^h^
|
||||||
%footer Brought to you by Yesod Widgets™
|
%footer Brought to you by Yesod Widgets™
|
||||||
|]
|
|]
|
||||||
getRootR = applyLayoutW $ flip wrapWidget wrapper $ do
|
getRootR = defaultLayout $ flip wrapWidget wrapper $ do
|
||||||
i <- newIdent
|
i <- newIdent
|
||||||
setTitle $ string "Hello Widgets"
|
setTitle $ string "Hello Widgets"
|
||||||
addStyle [$cassius|
|
addStyle [$cassius|
|
||||||
@ -82,7 +82,7 @@ handleFormR = do
|
|||||||
let txt = case res of
|
let txt = case res of
|
||||||
FormSuccess (_, _, _, _, _, _, _, _, _, _, Just x) -> Just x
|
FormSuccess (_, _, _, _, _, _, _, _, _, _, Just x) -> Just x
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
applyLayoutW $ do
|
defaultLayout $ do
|
||||||
addStyle [$cassius|
|
addStyle [$cassius|
|
||||||
.tooltip
|
.tooltip
|
||||||
color: #666
|
color: #666
|
||||||
@ -134,7 +134,7 @@ getCustomFormR = do
|
|||||||
|]
|
|]
|
||||||
return (Person <$> a1 <*> a2, b , c1 `mappend` c2)
|
return (Person <$> a1 <*> a2, b , c1 `mappend` c2)
|
||||||
(_, wform, enctype) <- runFormGet customForm
|
(_, wform, enctype) <- runFormGet customForm
|
||||||
applyLayoutW $ do
|
defaultLayout $ do
|
||||||
form <- extractBody wform
|
form <- extractBody wform
|
||||||
addBody [$hamlet|
|
addBody [$hamlet|
|
||||||
%form
|
%form
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user