diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-15 17:42:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-15 17:42:46 -0400 |
commit | 621c9fe36ec4a9804664f025f162a973251484cf (patch) | |
tree | 7d0abb084877857013427d97c740c328eb3c84fc /standalone/android/haskell-patches | |
parent | 98171fd3884729fe326924ae7a3a843687d3f6bf (diff) |
updated yesod packages to export TH symbols and auto-spliced yesod-form
Diffstat (limited to 'standalone/android/haskell-patches')
10 files changed, 2262 insertions, 11 deletions
diff --git a/standalone/android/haskell-patches/file-embed-0.0.4.7-remove-TH.patch b/standalone/android/haskell-patches/file-embed-0.0.4.7-remove-TH.patch new file mode 100644 index 000000000..df6016f69 --- /dev/null +++ b/standalone/android/haskell-patches/file-embed-0.0.4.7-remove-TH.patch @@ -0,0 +1,139 @@ +From 2e6f4a373fc05968e6dadcc49185d64a69eeddf4 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 12:38:22 -0400 +Subject: [PATCH] remove TH + +--- + Data/.FileEmbed.hs.swp | Bin 4096 -> 0 bytes + Data/FileEmbed.hs | 77 +------------------------------------------------ + 2 files changed, 1 insertion(+), 76 deletions(-) + delete mode 100644 Data/.FileEmbed.hs.swp + +diff --git a/Data/.FileEmbed.hs.swp b/Data/.FileEmbed.hs.swp +deleted file mode 100644 +index 7570045ca90875097c2d56ba885d26dcf344bc27..0000000000000000000000000000000000000000 +GIT binary patch +literal 0 +HcmV?d00001 + +literal 4096 +zcmYc?2=nw+FxN9?00IF9h8Ufkz&R6G7!1T17_#zHD?!49Kzd#&Athk>I*@_-X_+~x +zx~aKIsVTY!dIowXdgl5ri6x2pZa{HYkg#4xF;T{iDjE%e(GVau1WHTNbS-!pjExKp +sl$8_}goQ$h)j6teGz3ONU^E0qLtr!nMnhmU1V%$(Gz3ONV3>pe0P*q}cmMzZ + +diff --git a/Data/FileEmbed.hs b/Data/FileEmbed.hs +index 66f7004..b15e331 100644 +--- a/Data/FileEmbed.hs ++++ b/Data/FileEmbed.hs +@@ -1,31 +1,12 @@ +-{-# LANGUAGE TemplateHaskell #-} + {-# LANGUAGE CPP #-} + module Data.FileEmbed + ( -- * Embed at compile time +- embedFile +- , embedDir +- , getDir ++ getDir + -- * Inject into an executable +-#if MIN_VERSION_template_haskell(2,5,0) +- , dummySpace +-#endif + , inject + , injectFile + ) where + +-import Language.Haskell.TH.Syntax +- ( Exp (AppE, ListE, LitE, TupE, SigE) +-#if MIN_VERSION_template_haskell(2,5,0) +- , Lit (StringL, StringPrimL, IntegerL) +-#else +- , Lit (StringL, IntegerL) +-#endif +- , Q +- , runIO +-#if MIN_VERSION_template_haskell(2,7,0) +- , Quasi(qAddDependentFile) +-#endif +- ) + import System.Directory (doesDirectoryExist, doesFileExist, + getDirectoryContents) + import Control.Monad (filterM) +@@ -37,51 +18,12 @@ import Data.ByteString.Unsafe (unsafePackAddressLen) + import System.IO.Unsafe (unsafePerformIO) + import System.FilePath ((</>)) + +--- | Embed a single file in your source code. +--- +--- > import qualified Data.ByteString +--- > +--- > myFile :: Data.ByteString.ByteString +--- > myFile = $(embedFile "dirName/fileName") +-embedFile :: FilePath -> Q Exp +-embedFile fp = +-#if MIN_VERSION_template_haskell(2,7,0) +- qAddDependentFile fp >> +-#endif +- (runIO $ B.readFile fp) >>= bsToExp +- +--- | Embed a directory recusrively in your source code. +--- +--- > import qualified Data.ByteString +--- > +--- > myDir :: [(FilePath, Data.ByteString.ByteString)] +--- > myDir = $(embedDir "dirName") +-embedDir :: FilePath -> Q Exp +-embedDir fp = do +- typ <- [t| [(FilePath, B.ByteString)] |] +- e <- ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp)) +- return $ SigE e typ +- + -- | Get a directory tree in the IO monad. + -- + -- This is the workhorse of 'embedDir' + getDir :: FilePath -> IO [(FilePath, B.ByteString)] + getDir = fileList + +-pairToExp :: FilePath -> (FilePath, B.ByteString) -> Q Exp +-pairToExp _root (path, bs) = do +-#if MIN_VERSION_template_haskell(2,7,0) +- qAddDependentFile $ _root ++ '/' : path +-#endif +- exp' <- bsToExp bs +- return $! TupE [LitE $ StringL path, exp'] +- +-bsToExp :: B.ByteString -> Q Exp +-bsToExp bs = do +- helper <- [| stringToBs |] +- let chars = B8.unpack bs +- return $! AppE helper $! LitE $! StringL chars +- + stringToBs :: String -> B.ByteString + stringToBs = B8.pack + +@@ -123,23 +65,6 @@ padSize i = + let s = show i + in replicate (sizeLen - length s) '0' ++ s + +-#if MIN_VERSION_template_haskell(2,5,0) +-dummySpace :: Int -> Q Exp +-dummySpace space = do +- let size = padSize space +- let start = magic ++ size +- let chars = LitE $ StringPrimL $ +-#if MIN_VERSION_template_haskell(2,6,0) +- map (toEnum . fromEnum) $ +-#endif +- start ++ replicate space '0' +- let len = LitE $ IntegerL $ fromIntegral $ length start + space +- upi <- [|unsafePerformIO|] +- pack <- [|unsafePackAddressLen|] +- getInner' <- [|getInner|] +- return $ getInner' `AppE` (upi `AppE` (pack `AppE` len `AppE` chars)) +-#endif +- + inject :: B.ByteString -- ^ bs to inject + -> B.ByteString -- ^ original BS containing dummy + -> Maybe B.ByteString -- ^ new BS, or Nothing if there is insufficient dummy space +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/hamlet-1.1.6.1_0001-axe-murdered.patch b/standalone/android/haskell-patches/hamlet-1.1.6.1_0001-remove-TH.patch index c1188ee14..8a8ac29c1 100644 --- a/standalone/android/haskell-patches/hamlet-1.1.6.1_0001-axe-murdered.patch +++ b/standalone/android/haskell-patches/hamlet-1.1.6.1_0001-remove-TH.patch @@ -1,17 +1,19 @@ -From 7be8bf3ba75acc5209066e6ba31ae589c541f344 Mon Sep 17 00:00:00 2001 +From aa18210b7cc124e11fb71640d993de77492b63b1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> -Date: Thu, 28 Feb 2013 23:30:01 -0400 -Subject: [PATCH] axe murdered +Date: Mon, 15 Apr 2013 15:08:31 -0400 +Subject: [PATCH] remove TH +Export functions referred to by TH splices, as these will be needed when +using the Evil Splicer --- - Text/Hamlet.hs | 215 +------------------------------------------------------- - 1 file changed, 2 insertions(+), 213 deletions(-) + Text/Hamlet.hs | 219 ++------------------------------------------------------- + 1 file changed, 6 insertions(+), 213 deletions(-) diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs -index 4ac870a..bc8edd5 100644 +index 4ac870a..63b8555 100644 --- a/Text/Hamlet.hs +++ b/Text/Hamlet.hs -@@ -11,35 +11,22 @@ +@@ -11,35 +11,26 @@ module Text.Hamlet ( -- * Plain HTML Html @@ -46,10 +48,14 @@ index 4ac870a..bc8edd5 100644 , CloseStyle (..) + , condH + , maybeH ++ ++ -- referred to in TH splices ++ , attrsToHtml ++ , asHtmlUrl ) where import Text.Shakespeare.Base -@@ -90,14 +77,6 @@ type HtmlUrl url = Render url -> Html +@@ -90,14 +81,6 @@ type HtmlUrl url = Render url -> Html -- | A function generating an 'Html' given a message translator and a URL rendering function. type HtmlUrlI18n msg url = Translate msg -> Render url -> Html @@ -64,7 +70,7 @@ index 4ac870a..bc8edd5 100644 unIdent :: Ident -> String unIdent (Ident s) = s -@@ -159,169 +138,9 @@ recordToFieldNames conStr = do +@@ -159,169 +142,9 @@ recordToFieldNames conStr = do [fields] <- return [fields | RecC name fields <- cons, name == conName] return [fieldName | (fieldName, _, _) <- fields] @@ -234,7 +240,7 @@ index 4ac870a..bc8edd5 100644 data HamletRules = HamletRules { hrFromHtml :: Exp , hrWithEnv :: (Env -> Q Exp) -> Q Exp -@@ -333,36 +152,6 @@ data Env = Env +@@ -333,36 +156,6 @@ data Env = Env , msgRender :: Maybe ((Exp -> Q Exp) -> Q Exp) } @@ -272,5 +278,5 @@ index 4ac870a..bc8edd5 100644 varName _ "" = error "Illegal empty varName" varName scope v@(_:_) = fromMaybe (strToExp v) $ lookup (Ident v) scope -- -1.7.10.4 +1.8.2.rc3 diff --git a/standalone/android/haskell-patches/shakespeare-1.0.3_0001-export-symbol-used-by-TH-splices.patch b/standalone/android/haskell-patches/shakespeare-1.0.3_0001-export-symbol-used-by-TH-splices.patch new file mode 100644 index 000000000..aa30b255a --- /dev/null +++ b/standalone/android/haskell-patches/shakespeare-1.0.3_0001-export-symbol-used-by-TH-splices.patch @@ -0,0 +1,139 @@ +From 3cb1056782c29b0b68bdcff8fa49d3ea92126956 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 16:46:15 -0400 +Subject: [PATCH] export symbol used by TH splices + +--- + Text/.Shakespeare.hs.swp | Bin 24576 -> 0 bytes + Text/Shakespeare.hs | 2 ++ + 2 files changed, 2 insertions(+) + delete mode 100644 Text/.Shakespeare.hs.swp + +diff --git a/Text/.Shakespeare.hs.swp b/Text/.Shakespeare.hs.swp +deleted file mode 100644 +index 4d6cd6a0295fdfb59f32a66b4af556c0630dd5b0..0000000000000000000000000000000000000000 +GIT binary patch +literal 0 +HcmV?d00001 + +literal 24576 +zcmeI4e~et$RmWd`KnqD)L_(BS5xTW4?M$;fu@g0M7u$*LtdmXsW9?l#wDxBEJo9Gf +z#WU|s-h1QO^^dk7RGJp46wwy`NCj0Y(S!!1AgEe}NKk}8ErJRNG@z(KqJ@T13Q|#9 +zR6ghact2*x>kWSanvuTVnRm}U_uO;OJ@?*o&-2-xr{<5SdmDFqe16RHu3haOfAZ_E +z_a3<Dd5^`xx;(zxXEhpJjYOBfM;P9j_4;?F9sgXA_5(i&W_C4pHtxQ2DOk(yTr3_p +zI_Z{pPKYKNm}p=N8W?2lncX*eci**Z=k{%HQ8)ki$t_fxkW4f%(ZECl6Aer>Fwww7 +z0}~BQG%(S?|0fM({p-CS(4lL=qu?5g>-pOOzWx0}{5=c)#QwgHzc+z9s33JFpNR%0 +z8klHcqJfD9CK{M%V4{JE1|}MqXkem&i3TPb_}{AmzvX$m5$_9fi0A%aVgN6{(es`I +zzX&dZcYzu3y*GH??}AT&_ks{CfP2BM;5zUML4hxWFM!X2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B*%A5@d;G*^Q@+GSJ180JQ6>pIJ;jMG|PctyQ!GSmbiv3Qr)u&ouEmum^pkkc@$ +zw#m&VrMmx{u&J%gPF<Xum0rTGOo$t96J~@>TffSIcHAo>@*W5;6-uS6@+S&5%ay{F +cT45AdikYcun%oMsfwvWjb+Ig{u-NAPH%ay)TmS$7 + +diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs +index d300951..fabbf66 100644 +--- a/Text/Shakespeare.hs ++++ b/Text/Shakespeare.hs +@@ -22,6 +22,8 @@ module Text.Shakespeare + #ifdef TEST_EXPORT + , preFilter + #endif ++ -- used by TH splices ++ , pack' + ) where + + import Data.List (intersperse) +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/shakespeare-css-1.0.2_0002-expose-modules-used-by-TH.patch b/standalone/android/haskell-patches/shakespeare-css-1.0.2_0002-expose-modules-used-by-TH.patch new file mode 100644 index 000000000..5bf57d527 --- /dev/null +++ b/standalone/android/haskell-patches/shakespeare-css-1.0.2_0002-expose-modules-used-by-TH.patch @@ -0,0 +1,26 @@ +From 23e96f0d948e7a26febf1745a4c373faf579c8ee Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 16:32:31 -0400 +Subject: [PATCH] expose modules used by TH + +--- + shakespeare-css.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shakespeare-css.cabal b/shakespeare-css.cabal +index de2497b..468353a 100644 +--- a/shakespeare-css.cabal ++++ b/shakespeare-css.cabal +@@ -39,8 +39,8 @@ library + + exposed-modules: Text.Cassius + Text.Lucius +- other-modules: Text.MkSizeType + Text.Css ++ other-modules: Text.MkSizeType + Text.IndentToBrace + Text.CssCommon + ghc-options: -Wall +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/wai-app-static-1.3.1-remove-TH.patch b/standalone/android/haskell-patches/wai-app-static-1.3.1-remove-TH.patch new file mode 100644 index 000000000..30bf5256a --- /dev/null +++ b/standalone/android/haskell-patches/wai-app-static-1.3.1-remove-TH.patch @@ -0,0 +1,36 @@ +From c18ae75852b1340ca502528138bf421659f61a3d Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 12:44:15 -0400 +Subject: [PATCH] remove TH + +Should not need these icons in git-annex, so not worth using the Evil +Splicer. +--- + Network/Wai/Application/Static.hs | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs +index 3195fbb..b48aa01 100644 +--- a/Network/Wai/Application/Static.hs ++++ b/Network/Wai/Application/Static.hs +@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO) + + import Blaze.ByteString.Builder (toByteString) + +-import Data.FileEmbed (embedFile) +- + import Data.Text (Text) + import qualified Data.Text as T + +@@ -198,8 +196,6 @@ staticAppPieces _ _ req + H.status405 + [("Content-Type", "text/plain")] + "Only GET is supported" +-staticAppPieces _ [".hidden", "folder.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")] +-staticAppPieces _ [".hidden", "haskell.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")] + staticAppPieces ss rawPieces req = liftIO $ do + case toPieces rawPieces of + Just pieces -> checkPieces ss pieces req >>= response +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/yesod-core-1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch b/standalone/android/haskell-patches/yesod-core-1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch index e0a3f9b5f..af0b3d15b 100644 --- a/standalone/android/haskell-patches/yesod-core-1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch +++ b/standalone/android/haskell-patches/yesod-core-1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch @@ -5,6 +5,9 @@ Subject: [PATCH 2/2] replaced TH in Yesod.Internal.Core Done by running a build with -ddump-splices and manually pasting in the spliced code, and then modifying it until it compiles. + +(This predated the Evil Splicer, and both this and the previous patch need +to be redone to use it.) --- Yesod/Internal/Core.hs | 211 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 201 insertions(+), 10 deletions(-) diff --git a/standalone/android/haskell-patches/yesod-core-1.1.8_0003-exports-for-TH-splices.patch b/standalone/android/haskell-patches/yesod-core-1.1.8_0003-exports-for-TH-splices.patch new file mode 100644 index 000000000..440b57ac8 --- /dev/null +++ b/standalone/android/haskell-patches/yesod-core-1.1.8_0003-exports-for-TH-splices.patch @@ -0,0 +1,26 @@ +From b7e01a2fded6575678db234e1f2de1f104f11376 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 15:25:07 -0400 +Subject: [PATCH 3/3] exports for TH splices + +--- + Yesod/Widget.hs | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Yesod/Widget.hs b/Yesod/Widget.hs +index bf79150..01ae294 100644 +--- a/Yesod/Widget.hs ++++ b/Yesod/Widget.hs +@@ -52,6 +52,9 @@ module Yesod.Widget + , addScriptEither + -- * Internal + , unGWidget ++ ++ -- used by TH code ++ , liftW + ) where + + import Data.Monoid +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/yesod-form-1.2.1.1-0001-prepare-for-Evil-Splicer.patch b/standalone/android/haskell-patches/yesod-form-1.2.1.1-0001-prepare-for-Evil-Splicer.patch new file mode 100644 index 000000000..c24055b1f --- /dev/null +++ b/standalone/android/haskell-patches/yesod-form-1.2.1.1-0001-prepare-for-Evil-Splicer.patch @@ -0,0 +1,83 @@ +From a603bac40f0a0f6232fbfb056a778860270101de Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 15:59:56 -0400 +Subject: [PATCH 1/2] prepare for Evil Splicer + +--- + Yesod/Form/Functions.hs | 3 +-- + evilsplicer-headers.hs | 9 +++++++++ + yesod-form.cabal | 5 +++-- + 3 files changed, 13 insertions(+), 4 deletions(-) + create mode 100644 evilsplicer-headers.hs + +diff --git a/Yesod/Form/Functions.hs b/Yesod/Form/Functions.hs +index db3e493..89eb1e8 100644 +--- a/Yesod/Form/Functions.hs ++++ b/Yesod/Form/Functions.hs +@@ -54,10 +54,9 @@ import Text.Blaze (Markup, toMarkup) + #define toHtml toMarkup + import Yesod.Handler (GHandler, getRequest, runRequestBody, newIdent, getYesod) + import Yesod.Core (RenderMessage, SomeMessage (..)) +-import Yesod.Widget (GWidget, whamlet) ++import Yesod.Widget (GWidget) + import Yesod.Request (reqToken, reqWaiRequest, reqGetParams, languages) + import Network.Wai (requestMethod) +-import Text.Hamlet (shamlet) + import Data.Monoid (mempty) + import Data.Maybe (listToMaybe, fromMaybe) + import Yesod.Message (RenderMessage (..)) +diff --git a/evilsplicer-headers.hs b/evilsplicer-headers.hs +new file mode 100644 +index 0000000..865d043 +--- /dev/null ++++ b/evilsplicer-headers.hs +@@ -0,0 +1,9 @@ ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Text.Hamlet ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified "blaze-markup" Text.Blaze as Text.Blaze.Markup ++import qualified Yesod.Widget ++import qualified Data.Foldable +diff --git a/yesod-form.cabal b/yesod-form.cabal +index a0d2a80..ae99ddc 100644 +--- a/yesod-form.cabal ++++ b/yesod-form.cabal +@@ -18,7 +18,7 @@ library + , yesod-persistent >= 1.1 && < 1.2 + , time >= 1.1.4 + , hamlet >= 1.1 && < 1.2 +- , shakespeare-css >= 1.0 && < 1.1 ++ , shakespeare-css == 1.0.2 + , shakespeare-js >= 1.0.2 && < 1.2 + , persistent >= 1.0 && < 1.2 + , template-haskell +@@ -37,6 +37,7 @@ library + , attoparsec >= 0.10 && < 0.11 + , crypto-api >= 0.8 && < 0.11 + , aeson ++ , shakespeare + + exposed-modules: Yesod.Form + Yesod.Form.Class +@@ -45,7 +46,6 @@ library + Yesod.Form.Input + Yesod.Form.Fields + Yesod.Form.Jquery +- Yesod.Form.Nic + Yesod.Form.MassInput + Yesod.Form.I18n.English + Yesod.Form.I18n.Portuguese +@@ -56,6 +56,7 @@ library + Yesod.Form.I18n.Japanese
+ -- FIXME Yesod.Helpers.Crud + ghc-options: -Wall ++ Extensions: PackageImports + + test-suite test + type: exitcode-stdio-1.0 +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/yesod-form-1.2.1.1-0002-expand-TH.patch b/standalone/android/haskell-patches/yesod-form-1.2.1.1-0002-expand-TH.patch new file mode 100644 index 000000000..3ce48e5fc --- /dev/null +++ b/standalone/android/haskell-patches/yesod-form-1.2.1.1-0002-expand-TH.patch @@ -0,0 +1,1606 @@ +From f98c22ec71695537e0e008a0bd54affdf8a60f64 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 17:35:57 -0400 +Subject: [PATCH 2/2] expand TH + +Used the EvilSplicer, and then some manual fixups, as it is apparently +buggy. Also a few module import fixes. +--- + Yesod/Form/Fields.hs | 623 ++++++++++++++++++++++++++++++++++++++---------- + Yesod/Form/Functions.hs | 240 +++++++++++++++---- + Yesod/Form/Jquery.hs | 141 ++++++++--- + Yesod/Form/MassInput.hs | 228 ++++++++++++++---- + Yesod/Form/Nic.hs | 59 ++++- + 5 files changed, 1042 insertions(+), 249 deletions(-) + +diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs +index 7917ce2..db76ea2 100644 +--- a/Yesod/Form/Fields.hs ++++ b/Yesod/Form/Fields.hs +@@ -46,11 +46,22 @@ module Yesod.Form.Fields + , optionsEnum + ) where + ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified "blaze-markup" Text.Blaze as Text.Blaze.Internal ++import qualified "blaze-html" Text.Blaze.Html ++import qualified Yesod.Widget ++import qualified Text.Css ++import qualified Control.Monad ++import qualified Data.Foldable + import Yesod.Form.Types + import Yesod.Form.I18n.English + import Yesod.Form.Functions (parseHelper) + import Yesod.Handler (getMessageRender) +-import Yesod.Widget (toWidget, whamlet, GWidget) ++import Yesod.Widget (toWidget, GWidget) + import Yesod.Message (RenderMessage (renderMessage), SomeMessage (..)) + import Text.Hamlet + import Text.Blaze (ToMarkup (toMarkup), preEscapedToMarkup, unsafeByteString) +@@ -108,10 +119,24 @@ intField = Field + Right (a, "") -> Right a + _ -> Left $ MsgInvalidInteger s + +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="number" :isReq:required="" value="#{showVal val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amMY ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"number\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + where +@@ -125,10 +150,24 @@ doubleField = Field + Right (a, "") -> Right a + _ -> Left $ MsgInvalidNumber s + +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required="" value="#{showVal val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNa ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + where showVal = either id (pack . show) +@@ -136,10 +175,24 @@ $newline never + dayField :: RenderMessage master FormMessage => Field sub master Day + dayField = Field + { fieldParse = parseHelper $ parseDate . unpack +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="date" :isReq:required="" value="#{showVal val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNk ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"date\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + where showVal = either id (pack . show) +@@ -147,10 +200,23 @@ $newline never + timeField :: RenderMessage master FormMessage => Field sub master TimeOfDay + timeField = Field + { fieldParse = parseHelper parseTime +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} :isReq:required="" value="#{showVal val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNx ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + where +@@ -163,10 +229,18 @@ $newline never + htmlField :: RenderMessage master FormMessage => Field sub master Html + htmlField = Field + { fieldParse = parseHelper $ Right . preEscapedText . sanitizeBalance +- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| +-$newline never +-<textarea id="#{theId}" name="#{name}" *{attrs}>#{showVal val} +-|] ++ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_amNH ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<textarea id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") } ++ + , fieldEnctype = UrlEncoded + } + where showVal = either id (pack . renderHtml) +@@ -192,10 +266,18 @@ instance ToHtml Textarea where + textareaField :: RenderMessage master FormMessage => Field sub master Textarea + textareaField = Field + { fieldParse = parseHelper $ Right . Textarea +- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| +-$newline never +-<textarea id="#{theId}" name="#{name}" *{attrs}>#{either id unTextarea val} +-|] ++ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_amNQ ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<textarea id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ id (Text.Blaze.Html.toHtml (either id unTextarea val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -203,10 +285,19 @@ hiddenField :: (PathPiece p, RenderMessage master FormMessage) + => Field sub master p + hiddenField = Field + { fieldParse = parseHelper $ maybe (Left MsgValueRequired) Right . fromPathPiece +- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| +-$newline never +-<input type="hidden" id="#{theId}" name="#{name}" *{attrs} value="#{either id toPathPiece val}"> +-|] ++ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_amNZ ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input type=\"hidden\" id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\""); ++ id (Text.Blaze.Html.toHtml (either id toPathPiece val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -214,20 +305,50 @@ textField :: RenderMessage master FormMessage => Field sub master Text + textField = Field + { fieldParse = parseHelper $ Right + , fieldView = \theId name attrs val isReq -> +- [whamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required value="#{either id id val}"> +-|] ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\""); ++ Text.Hamlet.condH ++ [(isReq, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " required"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ toWidget (Text.Blaze.Html.toHtml (either id id val)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + + passwordField :: RenderMessage master FormMessage => Field sub master Text + passwordField = Field + { fieldParse = parseHelper $ Right +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="password" :isReq:required="" value="#{either id id val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amOg ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\" type=\"password\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (either id id val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -305,10 +426,24 @@ emailField = Field + then Right s + else Left $ MsgInvalidEmail s + #endif +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="email" :isReq:required="" value="#{either id id val}"> +-|] ++ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amOO ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"email\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (either id id val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -317,20 +452,60 @@ searchField :: RenderMessage master FormMessage => AutoFocus -> Field sub master + searchField autoFocus = Field + { fieldParse = parseHelper Right + , fieldView = \theId name attrs val isReq -> do +- [whamlet|\ +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="search" :isReq:required="" :autoFocus:autofocus="" value="#{either id id val}"> +-|] ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"search\""); ++ Text.Hamlet.condH ++ [(isReq, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ Text.Hamlet.condH ++ [(autoFocus, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " autofocus=\"\""))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ toWidget (Text.Blaze.Html.toHtml (either id id val)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + when autoFocus $ do + -- we want this javascript to be placed immediately after the field +- [whamlet| +-$newline never +-<script>if (!('autofocus' in document.createElement('input'))) {document.getElementById('#{theId}').focus();} +-|] +- toWidget [cassius| +- #{theId} +- -webkit-appearance: textfield +- |] ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<script>if (!('autofocus' in document.createElement('input'))) {document.getElementById('"); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "').focus();}</script>") } ++ ++ toWidget $ \ _render_amP5 ++ -> (Text.Css.CssNoWhitespace ++ . (foldr ($) [])) ++ [((++) ++ $ (map ++ Text.Css.Css ++ ((((:) ++ (Text.Css.Css' ++ (Data.Monoid.mconcat [toCss theId]) ++ [(Data.Monoid.mconcat ++ [(Text.Css.fromText ++ . Text.Css.pack) ++ "-webkit-appearance"], ++ Data.Monoid.mconcat ++ [(Text.Css.fromText ++ . Text.Css.pack) ++ "textfield"])])) ++ . (foldr (.) id [])) ++ [])))] ++ + , fieldEnctype = UrlEncoded + } + +@@ -341,10 +516,25 @@ urlField = Field + Nothing -> Left $ MsgInvalidUrl s + Just _ -> Right s + , fieldView = \theId name attrs val isReq -> +- [whamlet| +-$newline never +-<input ##{theId} name=#{name} *{attrs} type=url :isReq:required value=#{either id id val}> +-|] ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"url\""); ++ Text.Hamlet.condH ++ [(isReq, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " required"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ toWidget (Text.Blaze.Html.toHtml (either id id val)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -353,18 +543,48 @@ selectFieldList = selectField . optionsPairs + + selectField :: (Eq a, RenderMessage master FormMessage) => GHandler sub master (OptionList a) -> Field sub master a + selectField = selectFieldHelper +- (\theId name attrs inside -> [whamlet| +-$newline never +-<select ##{theId} name=#{name} *{attrs}>^{inside} +-|]) -- outside +- (\_theId _name isSel -> [whamlet| +-$newline never +-<option value=none :isSel:selected>_{MsgSelectNone} +-|]) -- onOpt +- (\_theId _name _attrs value isSel text -> [whamlet| +-$newline never +-<option value=#{value} :isSel:selected>#{text} +-|]) -- inside ++ (\theId name attrs inside -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<select id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ toWidget inside; ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</select>") }) ++ -- outside ++ (\_theId _name isSel -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<option value=\"none\""); ++ Text.Hamlet.condH ++ [(isSel, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ (((Control.Monad.liftM (Text.Blaze.Html.toHtml .)) ++ $ (Yesod.Widget.liftW getMessageRender)) ++ >>= (\ urender_amPs -> toWidget (urender_amPs MsgSelectNone))); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") }) ++ -- onOpt ++ (\_theId _name _attrs value isSel text -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<option value=\""); ++ toWidget (Text.Blaze.Html.toHtml value); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ Text.Hamlet.condH ++ [(isSel, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ toWidget (Text.Blaze.Html.toHtml text); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") }) ++ -- inside + + multiSelectFieldList :: (Eq a, RenderMessage master FormMessage, RenderMessage master msg) => [(msg, a)] -> Field sub master [a] + multiSelectFieldList = multiSelectField . optionsPairs +@@ -385,12 +605,40 @@ multiSelectField ioptlist = + view theId name attrs val isReq = do + opts <- fmap olOptions $ lift ioptlist + let selOpts = map (id &&& (optselected val)) opts +- [whamlet| +-$newline never +- <select ##{theId} name=#{name} :isReq:required multiple *{attrs}> +- $forall (opt, optsel) <- selOpts +- <option value=#{optionExternalValue opt} :optsel:selected>#{optionDisplay opt} +- |] ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<select id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ Text.Hamlet.condH ++ [(isReq, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " required"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " multiple"); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ Data.Foldable.mapM_ ++ (\ (opt_amPV, optsel_amPW) ++ -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<option value=\""); ++ toWidget (Text.Blaze.Html.toHtml (optionExternalValue opt_amPV)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ Text.Hamlet.condH ++ [(optsel_amPW, ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ toWidget (Text.Blaze.Html.toHtml (optionDisplay opt_amPV)); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") }) ++ selOpts; ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</select>") } ++ + where + optselected (Left _) _ = False + optselected (Right vals) opt = (optionInternalValue opt) `elem` vals +@@ -400,41 +648,140 @@ radioFieldList = radioField . optionsPairs + + radioField :: (Eq a, RenderMessage master FormMessage) => GHandler sub master (OptionList a) -> Field sub master a + radioField = selectFieldHelper +- (\theId _name _attrs inside -> [whamlet| +-$newline never +-<div ##{theId}>^{inside} +-|]) +- (\theId name isSel -> [whamlet| +-$newline never +-<label .radio for=#{theId}-none> +- <div> +- <input id=#{theId}-none type=radio name=#{name} value=none :isSel:checked> +- _{MsgSelectNone} +-|]) +- (\theId name attrs value isSel text -> [whamlet| +-$newline never +-<label .radio for=#{theId}-#{value}> +- <div> +- <input id=#{theId}-#{value} type=radio name=#{name} value=#{value} :isSel:checked *{attrs}> +- \#{text} +-|]) ++ (\theId _name _attrs inside -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<div id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\">"); ++ toWidget inside; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "</div>") }) ++ ++ (\theId name isSel -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<label class=\"radio\" for=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "-none\"><div><input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "-none\" type=\"radio\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"none\""); ++ Text.Hamlet.condH ++ [(isSel, ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " checked"))] ++ Nothing; ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ (((Control.Monad.liftM (Text.Blaze.Html.toHtml .)) ++ $ (Yesod.Widget.liftW getMessageRender)) ++ >>= (\ urender_amQa -> toWidget (urender_amQa MsgSelectNone))); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div></label>") }) ++ ++ (\theId name attrs value isSel text -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<label class=\"radio\" for=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "-"); ++ toWidget (Text.Blaze.Html.toHtml value); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\"><div><input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "-"); ++ toWidget (Text.Blaze.Html.toHtml value); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\" type=\"radio\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\""); ++ toWidget (Text.Blaze.Html.toHtml value); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ Text.Hamlet.condH ++ [(isSel, ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " checked"))] ++ Nothing; ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ toWidget (Text.Blaze.Html.toHtml text); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div></label>") }) ++ + + boolField :: RenderMessage master FormMessage => Field sub master Bool + boolField = Field + { fieldParse = \e _ -> return $ boolParser e +- , fieldView = \theId name attrs val isReq -> [whamlet| +-$newline never +- $if not isReq +- <input id=#{theId}-none *{attrs} type=radio name=#{name} value=none checked> +- <label for=#{theId}-none>_{MsgSelectNone} +- ++ , fieldView = \theId name attrs val isReq -> do { Text.Hamlet.condH ++ [(not isReq, ++ do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "-none\" type=\"radio\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\" value=\"none\" checked"); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "-none\">"); ++ (((Control.Monad.liftM (Text.Blaze.Html.toHtml .)) ++ $ (Yesod.Widget.liftW getMessageRender)) ++ >>= (\ urender_amQx -> toWidget (urender_amQx MsgSelectNone))); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</label>") })] ++ Nothing; ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "-yes\" type=\"radio\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"yes\""); ++ Text.Hamlet.condH ++ [(showVal id val, ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " checked"))] ++ Nothing; ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "-yes\">"); ++ (((Control.Monad.liftM (Text.Blaze.Html.toHtml .)) ++ $ (Yesod.Widget.liftW getMessageRender)) ++ >>= (\ urender_amQy -> toWidget (urender_amQy MsgBoolYes))); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "</label><input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "-no\" type=\"radio\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"no\""); ++ Text.Hamlet.condH ++ [(showVal not val, ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " checked"))] ++ Nothing; ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "-no\">"); ++ (((Control.Monad.liftM (Text.Blaze.Html.toHtml .)) ++ $ (Yesod.Widget.liftW getMessageRender)) ++ >>= (\ urender_amQz -> toWidget (urender_amQz MsgBoolNo))); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "</label>") } + +-<input id=#{theId}-yes *{attrs} type=radio name=#{name} value=yes :showVal id val:checked> +-<label for=#{theId}-yes>_{MsgBoolYes} +- +-<input id=#{theId}-no *{attrs} type=radio name=#{name} value=no :showVal not val:checked> +-<label for=#{theId}-no>_{MsgBoolNo} +-|] + , fieldEnctype = UrlEncoded + } + where +@@ -458,10 +805,22 @@ $newline never + checkBoxField :: RenderMessage m FormMessage => Field s m Bool + checkBoxField = Field + { fieldParse = \e _ -> return $ checkBoxParser e +- , fieldView = \theId name attrs val _ -> [whamlet| +-$newline never +-<input id=#{theId} *{attrs} type=checkbox name=#{name} value=yes :showVal id val:checked> +-|] ++ , fieldView = \theId name attrs val _ -> do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ toWidget (Text.Blaze.Html.toHtml theId); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\" type=\"checkbox\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"yes\""); ++ Text.Hamlet.condH ++ [(showVal id val, ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) " checked"))] ++ Nothing; ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = UrlEncoded + } + +@@ -566,9 +925,21 @@ fileField = Field + case files of + [] -> Right Nothing + file:_ -> Right $ Just file +- , fieldView = \id' name attrs _ isReq -> toWidget [hamlet| +- <input id=#{id'} name=#{name} *{attrs} type=file :isReq:required> +- |] ++ , fieldView = \id' name attrs _ isReq -> toWidget $ \ _render_amRu ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml id'); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"file\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required"))] ++ Nothing; ++ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fieldEnctype = Multipart + } + +@@ -594,10 +965,16 @@ fileAFormReq fs = AForm $ \(master, langs) menvs ints -> do + { fvLabel = toHtml $ renderMessage master langs $ fsLabel fs + , fvTooltip = fmap (toHtml . renderMessage master langs) $ fsTooltip fs + , fvId = id' +- , fvInput = [whamlet| +-$newline never +-<input type=file name=#{name} ##{id'} *{fsAttrs fs}> +-|] ++ , fvInput = do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input type=\"file\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\" id=\""); ++ toWidget (Text.Blaze.Html.toHtml id'); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) (fsAttrs fs)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fvErrors = errs + , fvRequired = True + } +@@ -623,10 +1000,16 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do + { fvLabel = toHtml $ renderMessage master langs $ fsLabel fs + , fvTooltip = fmap (toHtml . renderMessage master langs) $ fsTooltip fs + , fvId = id' +- , fvInput = [whamlet| +-$newline never +-<input type=file name=#{name} ##{id'} *{fsAttrs fs}> +-|] ++ , fvInput = do { toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input type=\"file\" name=\""); ++ toWidget (Text.Blaze.Html.toHtml name); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\" id=\""); ++ toWidget (Text.Blaze.Html.toHtml id'); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ toWidget ((Text.Hamlet.attrsToHtml . toAttributes) (fsAttrs fs)); ++ toWidget ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + , fvErrors = errs + , fvRequired = False + } +diff --git a/Yesod/Form/Functions.hs b/Yesod/Form/Functions.hs +index 89eb1e8..54974bb 100644 +--- a/Yesod/Form/Functions.hs ++++ b/Yesod/Form/Functions.hs +@@ -42,6 +42,15 @@ module Yesod.Form.Functions + , parseHelper + ) where + ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified "blaze-markup" Text.Blaze as Text.Blaze.Markup ++import qualified Yesod.Widget ++import qualified Data.Foldable ++import qualified Text.Hamlet + import Yesod.Form.Types + import Data.Text (Text, pack) + import Control.Arrow (second) +@@ -191,10 +200,13 @@ postHelper form env = do + let token = + case reqToken req of + Nothing -> mempty +- Just n -> [shamlet| +-$newline never +-<input type=hidden name=#{tokenKey} value=#{n}> +-|] ++ Just n -> do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input type=\"hidden\" name=\""); ++ id (Text.Blaze.Html.toHtml tokenKey); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\""); ++ id (Text.Blaze.Html.toHtml n); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\">") } + m <- getYesod + langs <- languages + ((res, xml), enctype) <- runFormGeneric (form token) m langs env +@@ -253,10 +265,11 @@ getKey = "_hasdata" + + getHelper :: (Html -> MForm sub master a) -> Maybe (Env, FileEnv) -> GHandler sub master (a, Enctype) + getHelper form env = do +- let fragment = [shamlet| +-$newline never +-<input type=hidden name=#{getKey}> +-|] ++ let fragment = do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input type=\"hidden\" name=\""); ++ id (Text.Blaze.Html.toHtml getKey); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\">") } + langs <- languages + m <- getYesod + runFormGeneric (form fragment) m langs env +@@ -270,19 +283,64 @@ renderTable, renderDivs, renderDivsNoLabels :: FormRender sub master a + renderTable aform fragment = do + (res, views') <- aFormToForm aform + let views = views' [] +- let widget = [whamlet| +-$newline never +-\#{fragment} +-$forall view <- views +- <tr :fvRequired view:.required :not $ fvRequired view:.optional> +- <td> +- <label for=#{fvId view}>#{fvLabel view} +- $maybe tt <- fvTooltip view +- <div .tooltip>#{tt} +- <td>^{fvInput view} +- $maybe err <- fvErrors view +- <td .errors>#{err} +-|] ++ let widget = do { Yesod.Widget.toWidget (Text.Blaze.Html.toHtml fragment); ++ Data.Foldable.mapM_ ++ (\ view_a9GR ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<tr"); ++ Text.Hamlet.condH ++ [(or [fvRequired view_a9GR, not (fvRequired view_a9GR)], ++ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " class=\""); ++ Text.Hamlet.condH ++ [(fvRequired view_a9GR, ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "required "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(not (fvRequired view_a9GR), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "optional"))] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\"") })] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "><td><label for=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvId view_a9GR)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvLabel view_a9GR)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</label>"); ++ Text.Hamlet.maybeH ++ (fvTooltip view_a9GR) ++ (\ tt_a9GS ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<div class=\"tooltip\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml tt_a9GS); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</td><td>"); ++ Yesod.Widget.toWidget (fvInput view_a9GR); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</td>"); ++ Text.Hamlet.maybeH ++ (fvErrors view_a9GR) ++ (\ err_a9GT ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<td class=\"errors\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml err_a9GT); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</td>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</tr>") }) ++ views } + return (res, widget) + + -- | render a field inside a div +@@ -295,19 +353,65 @@ renderDivsMaybeLabels :: Bool -> FormRender sub master a + renderDivsMaybeLabels withLabels aform fragment = do + (res, views') <- aFormToForm aform + let views = views' [] +- let widget = [whamlet| +-$newline never +-\#{fragment} +-$forall view <- views +- <div :fvRequired view:.required :not $ fvRequired view:.optional> +- $if withLabels +- <label for=#{fvId view}>#{fvLabel view} +- $maybe tt <- fvTooltip view +- <div .tooltip>#{tt} +- ^{fvInput view} +- $maybe err <- fvErrors view +- <div .errors>#{err} +-|] ++ let widget = do { Yesod.Widget.toWidget (Text.Blaze.Html.toHtml fragment); ++ Data.Foldable.mapM_ ++ (\ view_a9Hr ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<div"); ++ Text.Hamlet.condH ++ [(or [fvRequired view_a9Hr, not (fvRequired view_a9Hr)], ++ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) " class=\""); ++ Text.Hamlet.condH ++ [(fvRequired view_a9Hr, ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "required "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(not (fvRequired view_a9Hr), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "optional"))] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\"") })] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ Text.Hamlet.condH ++ [(withLabels, ++ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "<label for=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvId view_a9Hr)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvLabel view_a9Hr)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</label>") })] ++ Nothing; ++ Text.Hamlet.maybeH ++ (fvTooltip view_a9Hr) ++ (\ tt_a9Hs ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<div class=\"tooltip\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml tt_a9Hs); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget (fvInput view_a9Hr); ++ Text.Hamlet.maybeH ++ (fvErrors view_a9Hr) ++ (\ err_a9Ht ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<div class=\"errors\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml err_a9Ht); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") }) ++ views } + return (res, widget) + + -- | Render a form using Bootstrap-friendly shamlet syntax. +@@ -331,19 +435,61 @@ renderBootstrap aform fragment = do + let views = views' [] + has (Just _) = True + has Nothing = False +- let widget = [whamlet| +-$newline never +-\#{fragment} +-$forall view <- views +- <div .control-group .clearfix :fvRequired view:.required :not $ fvRequired view:.optional :has $ fvErrors view:.error> +- <label .control-label for=#{fvId view}>#{fvLabel view} +- <div .controls .input> +- ^{fvInput view} +- $maybe tt <- fvTooltip view +- <span .help-block>#{tt} +- $maybe err <- fvErrors view +- <span .help-block>#{err} +-|] ++ let widget = do { Yesod.Widget.toWidget (Text.Blaze.Html.toHtml fragment); ++ Data.Foldable.mapM_ ++ (\ view_a9HE ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<div class=\"control-group clearfix "); ++ Text.Hamlet.condH ++ [(fvRequired view_a9HE, ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "required "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(not (fvRequired view_a9HE), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "optional "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(has (fvErrors view_a9HE), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "error"))] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "\"><label class=\"control-label\" for=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvId view_a9HE)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvLabel view_a9HE)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "</label><div class=\"controls input\">"); ++ Yesod.Widget.toWidget (fvInput view_a9HE); ++ Text.Hamlet.maybeH ++ (fvTooltip view_a9HE) ++ (\ tt_a9HF ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<span class=\"help-block\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml tt_a9HF); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</span>") }) ++ Nothing; ++ Text.Hamlet.maybeH ++ (fvErrors view_a9HE) ++ (\ err_a9HG ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<span class=\"help-block\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml err_a9HG); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</span>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . pack) "</div></div>") }) ++ views } + return (res, widget) + + check :: RenderMessage master msg +diff --git a/Yesod/Form/Jquery.hs b/Yesod/Form/Jquery.hs +index 85a0c76..70ac315 100644 +--- a/Yesod/Form/Jquery.hs ++++ b/Yesod/Form/Jquery.hs +@@ -12,14 +12,22 @@ module Yesod.Form.Jquery + , Default (..) + ) where + ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified "blaze-html" Text.Blaze.Html ++import qualified Yesod.Widget ++import qualified Text.Hamlet ++import qualified Text.Julius + import Yesod.Handler + import Yesod.Core (Route) + import Yesod.Form + import Yesod.Widget + import Data.Time (Day) + import Data.Default +-import Text.Hamlet (shamlet) +-import Text.Julius (julius, rawJS) ++import Text.Julius (rawJS) + import Data.Text (Text, pack, unpack) + import Data.Monoid (mconcat) + import Yesod.Core (RenderMessage) +@@ -64,27 +72,75 @@ jqueryDayField jds = Field + . readMay + . unpack + , fieldView = \theId name attrs val isReq -> do +- toWidget [shamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="date" :isReq:required="" value="#{showVal val}"> +-|] ++ toWidget $ do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"date\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + addScript' urlJqueryJs + addScript' urlJqueryUiJs + addStylesheet' urlJqueryUiCss +- toWidget [julius| +-$(function(){ +- var i = document.getElementById("#{rawJS theId}"); +- if (i.type != "date") { +- $(i).datepicker({ +- dateFormat:'yy-mm-dd', +- changeMonth:#{jsBool $ jdsChangeMonth jds}, +- changeYear:#{jsBool $ jdsChangeYear jds}, +- numberOfMonths:#{rawJS $ mos $ jdsNumberOfMonths jds}, +- yearRange:#{toJSON $ jdsYearRange jds} +- }); +- } +-}); +-|] ++ toWidget $ Text.Julius.asJavascriptUrl ++ (\ _render_a1esc ++ -> mconcat ++ [Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\ ++ \$(function(){\ ++ \ var i = document.getElementById(\""), ++ Text.Julius.Javascript (Text.Julius.toJavascript (rawJS theId)), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\");\ ++ \ if (i.type != \"date\") {\ ++ \ $(i).datepicker({\ ++ \ 'yy-mm-dd',\ ++ \ changeMonth:"), ++ Text.Julius.Javascript ++ (Text.Julius.toJavascript (jsBool (jdsChangeMonth jds))), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ ",\ ++ \ changeYear:"), ++ Text.Julius.Javascript ++ (Text.Julius.toJavascript (jsBool (jdsChangeYear jds))), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ ",\ ++ \ numberOfMonths:"), ++ Text.Julius.Javascript ++ (Text.Julius.toJavascript (rawJS (mos (jdsNumberOfMonths jds)))), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ ",\ ++ \ yearRange:"), ++ Text.Julius.Javascript ++ (Text.Julius.toJavascript (toJSON (jdsYearRange jds))), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\ ++ \ });\ ++ \ }\ ++ \});")]) ++ + , fieldEnctype = UrlEncoded + } + where +@@ -105,16 +161,47 @@ jqueryAutocompleteField :: (RenderMessage master FormMessage, YesodJquery master + jqueryAutocompleteField src = Field + { fieldParse = parseHelper $ Right + , fieldView = \theId name attrs val isReq -> do +- toWidget [shamlet| +-$newline never +-<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required="" value="#{either id id val}" .autocomplete> +-|] ++ toWidget $ do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<input class=\"autocomplete\" id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ++ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\""); ++ Text.Hamlet.condH ++ [(isReq, ++ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))] ++ Nothing; ++ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\""); ++ id (Text.Blaze.Html.toHtml (either id id val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">") } ++ + addScript' urlJqueryJs + addScript' urlJqueryUiJs + addStylesheet' urlJqueryUiCss +- toWidget [julius| +-$(function(){$("##{rawJS theId}").autocomplete({source:"@{src}",minLength:2})}); +-|] ++ toWidget $ Text.Julius.asJavascriptUrl ++ (\ _render_a1esq ++ -> mconcat ++ [Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\ ++ \$(function(){$(\"#"), ++ Text.Julius.Javascript (Text.Julius.toJavascript (rawJS theId)), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\").autocomplete({source:\""), ++ Text.Julius.Javascript ++ (Data.Text.Lazy.Builder.fromText (_render_a1esq src [])), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\",2})});")]) ++ + , fieldEnctype = UrlEncoded + } + +diff --git a/Yesod/Form/MassInput.hs b/Yesod/Form/MassInput.hs +index 62e89d6..22fdad5 100644 +--- a/Yesod/Form/MassInput.hs ++++ b/Yesod/Form/MassInput.hs +@@ -9,10 +9,20 @@ module Yesod.Form.MassInput + , massTable + ) where + ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified "blaze-html" Text.Blaze.Html ++import qualified Yesod.Widget ++import qualified Data.Text ++import qualified Text.Hamlet ++import qualified Data.Foldable + import Yesod.Form.Types + import Yesod.Form.Functions + import Yesod.Form.Fields (boolField) +-import Yesod.Widget (GWidget, whamlet) ++import Yesod.Widget (GWidget) + import Yesod.Message (RenderMessage) + import Yesod.Handler (newIdent, GHandler) + import Text.Blaze.Html (Html) +@@ -75,16 +85,27 @@ inputList label fixXml single mdef = formToAForm $ do + { fvLabel = label + , fvTooltip = Nothing + , fvId = theId +- , fvInput = [whamlet| +-$newline never +-^{fixXml views} +-<p> +- $forall xml <- xmls +- ^{xml} +- <input .count type=hidden name=#{countName} value=#{count}> +- <input type=checkbox name=#{addName}> +- Add another row +-|] ++ , fvInput = do { Yesod.Widget.toWidget (fixXml views); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<p>"); ++ Data.Foldable.mapM_ ++ (\ xml_aOR7 -> Yesod.Widget.toWidget xml_aOR7) xmls; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<input class=\"count\" type=\"hidden\" name=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml countName); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\" value=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml count); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\"><input type=\"checkbox\" name=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml addName); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\">Add another row</p>") } ++ + , fvErrors = Nothing + , fvRequired = False + }]) +@@ -97,10 +118,14 @@ withDelete af = do + deleteName <- newFormIdent + (menv, _, _) <- ask + res <- case menv >>= Map.lookup deleteName . fst of +- Just ("yes":_) -> return $ Left [whamlet| +-$newline never +-<input type=hidden name=#{deleteName} value=yes> +-|] ++ Just ("yes":_) -> return $ Left $ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<input type=\"hidden\" name=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml deleteName); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\" value=\"yes\">") } ++ + _ -> do + (_, xml2) <- aFormToForm $ areq boolField FieldSettings + { fsLabel = SomeMessage MsgDelete +@@ -126,32 +151,149 @@ fixme eithers = + massDivs, massTable + :: [[FieldView sub master]] + -> GWidget sub master () +-massDivs viewss = [whamlet| +-$newline never +-$forall views <- viewss +- <fieldset> +- $forall view <- views +- <div :fvRequired view:.required :not $ fvRequired view:.optional> +- <label for=#{fvId view}>#{fvLabel view} +- $maybe tt <- fvTooltip view +- <div .tooltip>#{tt} +- ^{fvInput view} +- $maybe err <- fvErrors view +- <div .errors>#{err} +-|] ++massDivs viewss = Data.Foldable.mapM_ ++ (\ views_aORq ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<fieldset>"); ++ Data.Foldable.mapM_ ++ (\ view_aORr ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<div"); ++ Text.Hamlet.condH ++ [(or [fvRequired view_aORr, not (fvRequired view_aORr)], ++ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ " class=\""); ++ Text.Hamlet.condH ++ [(fvRequired view_aORr, ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "required "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(not (fvRequired view_aORr), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "optional"))] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\"") })] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "><label for=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvId view_aORr)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvLabel view_aORr)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</label>"); ++ Text.Hamlet.maybeH ++ (fvTooltip view_aORr) ++ (\ tt_aORs ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<div class=\"tooltip\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml tt_aORs); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget (fvInput view_aORr); ++ Text.Hamlet.maybeH ++ (fvErrors view_aORr) ++ (\ err_aORt ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<div class=\"errors\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml err_aORt); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</div>") }) ++ views_aORq; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</fieldset>") }) ++ viewss ++ ++ ++massTable viewss = Data.Foldable.mapM_ ++ (\ views_aORy ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<fieldset><table>"); ++ Data.Foldable.mapM_ ++ (\ view_aORz ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<tr"); ++ Text.Hamlet.condH ++ [(or [fvRequired view_aORz, not (fvRequired view_aORz)], ++ do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ " class=\""); ++ Text.Hamlet.condH ++ [(fvRequired view_aORz, ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "required "))] ++ Nothing; ++ Text.Hamlet.condH ++ [(not (fvRequired view_aORz), ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "optional"))] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "\"") })] ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "><td><label for=\""); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvId view_aORz)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml (fvLabel view_aORz)); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</label>"); ++ Text.Hamlet.maybeH ++ (fvTooltip view_aORz) ++ (\ tt_aORA ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<div class=\"tooltip\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml tt_aORA); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</div>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</td><td>"); ++ Yesod.Widget.toWidget (fvInput view_aORz); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</td>"); ++ Text.Hamlet.maybeH ++ (fvErrors view_aORz) ++ (\ err_aORB ++ -> do { Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "<td class=\"errors\">"); ++ Yesod.Widget.toWidget (Text.Blaze.Html.toHtml err_aORB); ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</td>") }) ++ Nothing; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</tr>") }) ++ views_aORy; ++ Yesod.Widget.toWidget ++ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) ++ "</table></fieldset>") }) ++ viewss + +-massTable viewss = [whamlet| +-$newline never +-$forall views <- viewss +- <fieldset> +- <table> +- $forall view <- views +- <tr :fvRequired view:.required :not $ fvRequired view:.optional> +- <td> +- <label for=#{fvId view}>#{fvLabel view} +- $maybe tt <- fvTooltip view +- <div .tooltip>#{tt} +- <td>^{fvInput view} +- $maybe err <- fvErrors view +- <td .errors>#{err} +-|] +diff --git a/Yesod/Form/Nic.hs b/Yesod/Form/Nic.hs +index 7c65ce4..357532f 100644 +--- a/Yesod/Form/Nic.hs ++++ b/Yesod/Form/Nic.hs +@@ -9,13 +9,19 @@ module Yesod.Form.Nic + , nicHtmlField + ) where + ++import qualified Data.Text.Lazy.Builder ++import qualified Text.Shakespeare ++import qualified Data.Monoid ++import qualified Text.Julius ++import qualified "blaze-markup" Text.Blaze.Internal ++import qualified Yesod.Widget + import Yesod.Handler + import Yesod.Core (Route, ScriptLoadPosition(..), jsLoader, Yesod) + import Yesod.Form + import Yesod.Widget + import Text.HTML.SanitizeXSS (sanitizeBalance) +-import Text.Hamlet (Html, shamlet) +-import Text.Julius (julius, rawJS) ++import Text.Hamlet (Html) ++import Text.Julius (rawJS) + #if MIN_VERSION_blaze_html(0, 5, 0) + import Text.Blaze (preEscapedToMarkup) + import Text.Blaze.Html.Renderer.String (renderHtml) +@@ -36,20 +42,49 @@ nicHtmlField :: YesodNic master => Field sub master Html + nicHtmlField = Field + { fieldParse = \e _ -> return . Right . fmap (preEscapedText . sanitizeBalance) . listToMaybe $ e + , fieldView = \theId name attrs val _isReq -> do +- toWidget [shamlet| +-$newline never +- <textarea id="#{theId}" *{attrs} name="#{name}" .html>#{showVal val} +-|] ++ toWidget $ do { id ++ ((Text.Blaze.Internal.preEscapedText . pack) ++ "<textarea class=\"html\" id=\""); ++ id (Text.Blaze.Html.toHtml theId); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\""); ++ id (Text.Blaze.Html.toHtml name); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "\""); ++ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs); ++ id ((Text.Blaze.Internal.preEscapedText . pack) ">"); ++ id (Text.Blaze.Html.toHtml (showVal val)); ++ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") } ++ + addScript' urlNicEdit + master <- lift getYesod + toWidget $ + case jsLoader master of +- BottomOfHeadBlocking -> [julius| +-bkLib.onDomLoaded(function(){new nicEditor({fullPanel:true}).panelInstance("#{rawJS theId}")}); +-|] +- _ -> [julius| +-(function(){new nicEditor({fullPanel:true}).panelInstance("#{rawJS theId}")})(); +-|] ++ BottomOfHeadBlocking -> Text.Julius.asJavascriptUrl ++ (\ _render_a1itM ++ -> Data.Monoid.mconcat ++ [Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\ ++ \bkLib.onDomLoaded(function(){new nicEditor({true}).panelInstance(\""), ++ Text.Julius.Javascript (Text.Julius.toJavascript (rawJS theId)), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\")});")]) ++ ++ _ -> Text.Julius.asJavascriptUrl ++ (\ _render_a1itQ ++ -> Data.Monoid.mconcat ++ [Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "(function(){new nicEditor({true}).panelInstance(\""), ++ Text.Julius.Javascript (Text.Julius.toJavascript (rawJS theId)), ++ Text.Julius.Javascript ++ ((Data.Text.Lazy.Builder.fromText ++ . Text.Shakespeare.pack') ++ "\")})();")]) ++ + , fieldEnctype = UrlEncoded + } + where +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/yesod-static-1.1.2-remove-TH.patch b/standalone/android/haskell-patches/yesod-static-1.1.2-remove-TH.patch new file mode 100644 index 000000000..de30ea4ca --- /dev/null +++ b/standalone/android/haskell-patches/yesod-static-1.1.2-remove-TH.patch @@ -0,0 +1,187 @@ +From 476414b04064bb66fc25ba9ca426c309fe5c156e Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Mon, 15 Apr 2013 12:48:13 -0400 +Subject: [PATCH] remove TH + +--- + Yesod/Static.hs | 121 ---------------------------------------------- + dist/package.conf.inplace | 3 +- + 2 files changed, 2 insertions(+), 122 deletions(-) + +diff --git a/Yesod/Static.hs b/Yesod/Static.hs +index e8ca09f..193b1f0 100644 +--- a/Yesod/Static.hs ++++ b/Yesod/Static.hs +@@ -1,5 +1,3 @@ +-{-# LANGUAGE QuasiQuotes #-} +-{-# LANGUAGE TemplateHaskell #-} + {-# LANGUAGE TypeFamilies #-} + {-# LANGUAGE CPP #-} + {-# LANGUAGE FlexibleInstances #-} +@@ -34,11 +32,6 @@ module Yesod.Static + -- * Smart constructor + , static + , staticDevel +- , embed +- -- * Template Haskell helpers +- , staticFiles +- , staticFilesList +- , publicFiles + -- * Hashing + , base64md5 + #ifdef TEST_EXPORT +@@ -50,7 +43,6 @@ import Prelude hiding (FilePath) + import qualified Prelude + import System.Directory + import Control.Monad +-import Data.FileEmbed (embedDir) + + import Yesod.Core hiding (lift) + +@@ -111,18 +103,6 @@ staticDevel dir = do + hashLookup <- cachedETagLookupDevel dir + return $ Static $ webAppSettingsWithLookup (F.decodeString dir) hashLookup + +--- | Produce a 'Static' based on embedding all of the static +--- files' contents in the executable at compile time. +--- Nota Bene: if you replace the scaffolded 'static' call in Settings/StaticFiles.hs +--- you will need to change the scaffolded addStaticContent. Otherwise, some of your +--- assets will be 404'ed. This is because by default yesod will generate compile those +--- assets to @static/tmp@ which for 'static' is fine since they are served out of the +--- directory itself. With embedded static, that will not work. +--- You can easily change @addStaticContent@ to @\_ _ _ -> return Nothing@ as a workaround. +--- This will cause yesod to embed those assets into the generated HTML file itself. +-embed :: Prelude.FilePath -> Q Exp +-embed fp = [|Static (embeddedSettings $(embedDir fp))|] +- + instance RenderRoute Static where + -- | A route on the static subsite (see also 'staticFiles'). + -- +@@ -167,59 +147,6 @@ getFileListPieces = flip go id + dirs' <- mapM (\f -> go (fullPath f) (front . (:) f)) dirs + return $ concat $ files' : dirs' + +--- | Template Haskell function that automatically creates routes +--- for all of your static files. +--- +--- For example, if you used +--- +--- > staticFiles "static/" +--- +--- and you had files @\"static\/style.css\"@ and +--- @\"static\/js\/script.js\"@, then the following top-level +--- definitions would be created: +--- +--- > style_css = StaticRoute ["style.css"] [] +--- > js_script_js = StaticRoute ["js/script.js"] [] +--- +--- Note that dots (@.@), dashes (@-@) and slashes (@\/@) are +--- replaced by underscores (@\_@) to create valid Haskell +--- identifiers. +-staticFiles :: Prelude.FilePath -> Q [Dec] +-staticFiles dir = mkStaticFiles dir +- +--- | Same as 'staticFiles', but takes an explicit list of files +--- to create identifiers for. The files path given are relative +--- to the static folder. For example, to create routes for the +--- files @\"static\/js\/jquery.js\"@ and +--- @\"static\/css\/normalize.css\"@, you would use: +--- +--- > staticFilesList \"static\" [\"js\/jquery.js\", \"css\/normalize.css\"] +--- +--- This can be useful when you have a very large number of static +--- files, but only need to refer to a few of them from Haskell. +-staticFilesList :: Prelude.FilePath -> [Prelude.FilePath] -> Q [Dec] +-staticFilesList dir fs = +- mkStaticFilesList dir (map split fs) "StaticRoute" True +- where +- split :: Prelude.FilePath -> [String] +- split [] = [] +- split x = +- let (a, b) = break (== '/') x +- in a : split (drop 1 b) +- +--- | Same as 'staticFiles', but doesn't append an ETag to the +--- query string. +--- +--- Using 'publicFiles' will speed up the compilation, since there +--- won't be any need for hashing files during compile-time. +--- However, since the ETag ceases to be part of the URL, the +--- 'Static' subsite won't be able to set the expire date too far +--- on the future. Browsers still will be able to cache the +--- contents, however they'll need send a request to the server to +--- see if their copy is up-to-date. +-publicFiles :: Prelude.FilePath -> Q [Dec] +-publicFiles dir = mkStaticFiles' dir "StaticRoute" False +- + + mkHashMap :: Prelude.FilePath -> IO (M.Map F.FilePath S8.ByteString) + mkHashMap dir = do +@@ -262,54 +189,6 @@ cachedETagLookup dir = do + etags <- mkHashMap dir + return $ (\f -> return $ M.lookup f etags) + +-mkStaticFiles :: Prelude.FilePath -> Q [Dec] +-mkStaticFiles fp = mkStaticFiles' fp "StaticRoute" True +- +-mkStaticFiles' :: Prelude.FilePath -- ^ static directory +- -> String -- ^ route constructor "StaticRoute" +- -> Bool -- ^ append checksum query parameter +- -> Q [Dec] +-mkStaticFiles' fp routeConName makeHash = do +- fs <- qRunIO $ getFileListPieces fp +- mkStaticFilesList fp fs routeConName makeHash +- +-mkStaticFilesList +- :: Prelude.FilePath -- ^ static directory +- -> [[String]] -- ^ list of files to create identifiers for +- -> String -- ^ route constructor "StaticRoute" +- -> Bool -- ^ append checksum query parameter +- -> Q [Dec] +-mkStaticFilesList fp fs routeConName makeHash = do +- concat `fmap` mapM mkRoute fs +- where +- replace' c +- | 'A' <= c && c <= 'Z' = c +- | 'a' <= c && c <= 'z' = c +- | '0' <= c && c <= '9' = c +- | otherwise = '_' +- mkRoute f = do +- let name' = intercalate "_" $ map (map replace') f +- routeName = mkName $ +- case () of +- () +- | null name' -> error "null-named file" +- | isDigit (head name') -> '_' : name' +- | isLower (head name') -> name' +- | otherwise -> '_' : name' +- f' <- [|map pack $(lift f)|] +- let route = mkName routeConName +- pack' <- [|pack|] +- qs <- if makeHash +- then do hash <- qRunIO $ base64md5File $ pathFromRawPieces fp f +- [|[(pack "etag", pack $(lift hash))]|] +- else return $ ListE [] +- return +- [ SigD routeName $ ConT route +- , FunD routeName +- [ Clause [] (NormalB $ (ConE route) `AppE` f' `AppE` qs) [] +- ] +- ] +- + base64md5File :: Prelude.FilePath -> IO String + base64md5File = fmap (base64 . encode) . hashFile + where encode d = Data.Serialize.encode (d :: MD5) +diff --git a/dist/package.conf.inplace b/dist/package.conf.inplace +index 0637a08..eeff311 100644 +--- a/dist/package.conf.inplace ++++ b/dist/package.conf.inplace +@@ -1 +1,2 @@ +-[] +\ No newline at end of file ++[InstalledPackageInfo {installedPackageId = InstalledPackageId "yesod-static-1.1.2-inplace", sourcePackageId = PackageIdentifier {pkgName = PackageName "yesod-static", pkgVersion = Version {versionBranch = [1,1,2], versionTags = []}}, license = MIT, copyright = "", maintainer = "Michael Snoyman <michael@snoyman.com>, Greg Weber <greg@gregweber.info>", author = "Michael Snoyman <michael@snoyman.com>", stability = "Stable", homepage = "http://www.yesodweb.com/", pkgUrl = "", synopsis = "Static file serving subsite for Yesod Web Framework.", description = "Static file serving subsite for Yesod Web Framework.", category = "Web, Yesod", exposed = True, exposedModules = ["Yesod.Static"], hiddenModules = [], trusted = False, importDirs = ["/home/joey/yesod-static-1.1.2/dist/build"], libraryDirs = ["/home/joey/yesod-static-1.1.2/dist/build"], hsLibraries = ["HSyesod-static-1.1.2"], extraLibraries = [], extraGHCiLibraries = [], includeDirs = [], includes = [], depends = [InstalledPackageId "base-4.7.0.0-460992ac16ead97d88c73f4125e796d4",InstalledPackageId "base64-bytestring-1.0.0.1-8f54bb73ec493a5130061ebca542c11e",InstalledPackageId "bytestring-0.10.3.0-9c590669208a87636c23a3d3510a31ff",InstalledPackageId "cereal-0.3.5.2-f30c5cc09d1cc15977a64fe292c53513",InstalledPackageId "conduit-0.5.6-3168abc5ff00ded4bbc15f5915ad8633",InstalledPackageId "containers-0.5.0.0-eaa71ab98116fcd2d322913214739de5",InstalledPackageId "crypto-conduit-0.4.3-7a2968522a5c4748ce5988a2a466061e",InstalledPackageId "cryptohash-0.8.3-0aac68aa3a568ebeb89a354c921feb58",InstalledPackageId "directory-1.2.0.1-ca44c33c2fac281048d0dd7cd29e86c3",InstalledPackageId "file-embed-0.0.4.7-70a8411da82b83a0bbea9ecb291922ca",InstalledPackageId "http-types-0.7.3.0.1-09ea63b109c64a8370a96ee561c3ab2a",InstalledPackageId "old-time-1.1.0.1-9c370bbecb794b4c05408eb17a0038f1",InstalledPackageId "system-filepath-0.4.7-9506cbec38ccb0e49fd3a1dcce66306e",InstalledPackageId "template-haskell-2.9.0.0-60ba2293ffcafe171e54a808fdce5a7c",InstalledPackageId "text-0.11.2.3-948bb4afd264a1a5c0cca04031b4151c",InstalledPackageId "transformers-0.3.0.0-bae5adc5a648f25bafc73de9dc6a08a0",InstalledPackageId "unix-compat-0.4.1.0-0019b5bc860083c9a153099b086619ed",InstalledPackageId "wai-1.3.0.2-0f2b7cd8b8b0d8a776528af2b9f1f4f9",InstalledPackageId "wai-app-static-1.3.1-a32981caae981238524cee9823ccc666",InstalledPackageId "yesod-core-1.1.8-c0a15bfed9cb8f978bdf71ddd343ea18"], hugsOptions = [], ccOptions = [], ldOptions = [], frameworkDirs = [], frameworks = [], haddockInterfaces = ["/home/joey/yesod-static-1.1.2/dist/doc/html/yesod-static/yesod-static.haddock"], haddockHTMLs = ["/home/joey/yesod-static-1.1.2/dist/doc/html/yesod-static"]} ++] +\ No newline at end of file +-- +1.8.2.rc3 + |