From f7dc45eb9e878b06b06a2cd8720b0e74f248a409 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 18 Aug 2010 07:15:12 +0300 Subject: [PATCH] addJavaScript -> addJavascript --- Yesod/Form/Jquery.hs | 6 +++--- Yesod/Form/Nic.hs | 2 +- Yesod/Widget.hs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Yesod/Form/Jquery.hs b/Yesod/Form/Jquery.hs index 85d26636..deef1118 100644 --- a/Yesod/Form/Jquery.hs +++ b/Yesod/Form/Jquery.hs @@ -56,7 +56,7 @@ jqueryDayFieldProfile = FieldProfile addScript' urlJqueryJs addScript' urlJqueryUiJs addStylesheet' urlJqueryUiCss - addJavaScript [$julius| + addJavascript [$julius| $$(function(){$$("#$theId$").datepicker({dateFormat:'yy-mm-dd'})}); |] } @@ -94,7 +94,7 @@ jqueryDayTimeFieldProfile = FieldProfile addScript' urlJqueryUiJs addScript' urlJqueryUiDateTimePicker addStylesheet' urlJqueryUiCss - addJavaScript [$julius| + addJavascript [$julius| $$(function(){$$("#$theId$").datetimepicker({dateFormat : "yyyy/mm/dd h:MM TT"})}); |] } @@ -129,7 +129,7 @@ jqueryAutocompleteFieldProfile src = FieldProfile addScript' urlJqueryJs addScript' urlJqueryUiJs addStylesheet' urlJqueryUiCss - addJavaScript [$julius| + addJavascript [$julius| $$(function(){$$("#$theId$").autocomplete({source:"@src@",minLength:2})}); |] } diff --git a/Yesod/Form/Nic.hs b/Yesod/Form/Nic.hs index e3361548..c1f6111f 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/Yesod/Widget.hs b/Yesod/Widget.hs index adf97951..263fd8a2 100644 --- a/Yesod/Widget.hs +++ b/Yesod/Widget.hs @@ -25,7 +25,7 @@ module Yesod.Widget , addScriptEither , addHead , addBody - , addJavaScript + , addJavascript -- * Manipulating , wrapWidget , extractBody @@ -148,8 +148,8 @@ addScriptRemote = GWidget . lift . lift . tell . toUnique . Script . Remote -- | Include raw Javascript in the page's script tag. -addJavaScript :: Julius (Route master) -> GWidget sub master () -addJavaScript = GWidget . lift . lift . lift . lift . lift. tell . Just +addJavascript :: Julius (Route master) -> GWidget sub master () +addJavascript = GWidget . lift . lift . lift . lift . lift. tell . Just -- | Apply the default layout to the given widget. applyLayoutW :: (Eq (Route m), Yesod m)