heist-async 0.5.0.0 → 0.6.0.0
raw patch · 2 files changed
+23/−20 lines, 2 filesdep ~heist
Dependency ranges changed: heist
Files
- Heist/Splices/Async.hs +14/−10
- heist-async.cabal +9/−10
Heist/Splices/Async.hs view
@@ -17,11 +17,13 @@ ) where -import Text.Templating.Heist import qualified Data.Text as T import Data.Text (Text) import qualified Text.XmlHtml as X import Data.Maybe (fromMaybe)+import Heist+import Heist.Interpreted+import Heist.SpliceAPI import Heist.Splices.Async.TH (loadJS) @@ -44,14 +46,16 @@ -- -- > <activate-async/> -- -heistAsyncSplices :: Monad m => [(Text, Splice m)]-heistAsyncSplices = [ ("a-async", aAsync)- , ("form-async", formAsync)- , ("div-async", divAsync)- , ("div-async-append", divAppendAsync)- , ("redirect-async", redirectAsync)- , ("activate-async", activateAsync)- ]++heistAsyncSplices :: Monad m => Splices (Splice m)+heistAsyncSplices = do+ "a-async" #! aAsync+ "form-async" #! formAsync+ "div-async" #! divAsync+ "div-async-append" #! divAppendAsync+ "redirect-async" #! redirectAsync+ "activate-async" #! activateAsync+ -- | a link that loads it's results asynchronously and replaces parts of the page based on the contents. A normal anchor tag in all ways. aAsync :: Monad m => Splice m aAsync = do@@ -92,6 +96,6 @@ activateAsync :: Monad m => Splice m activateAsync = do -- make sure that only the first call to this does anything.- modifyTS $ bindSplice "activate-async" (return [])+ modifyHS $ bindSplice "activate-async" (return []) return [X.Element "script" [("type","text/javascript")] [X.TextNode js]] where js = T.pack fileContents
heist-async.cabal view
@@ -1,5 +1,5 @@ Name: heist-async-Version: 0.5.0.0+Version: 0.6.0.0 Synopsis: Adding support for asynchronous updates ("AJAX") with heist Description: This package provides six splices and some accompanying javascript to allow declarative ajax programming that involves no javascript programming. Homepage: http://github.com/dbp/heist-async@@ -7,7 +7,7 @@ License-file: LICENSE Author: Daniel Patterson Maintainer: dbp@riseup.net--- Copyright: +-- Copyright: Category: Web @@ -24,7 +24,7 @@ js/reqwest.min.js, js/qwery.js, js/qwery.min.js- + -- Constraint on the version of Cabal needed to build this package. Cabal-version: >=1.2 @@ -32,17 +32,16 @@ Library -- Modules exported by the library. Exposed-modules: Heist.Splices.Async, Heist.Splices.Async.TH- + Build-depends: base >= 4 && <= 5, xmlhtml >= 0.1,- heist >= 0.5,+ heist >= 0.13, text >= 0.11, template-haskell- + -- Modules not exported by this package.- -- Other-modules: - + -- Other-modules:+ -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.- -- Build-tools: - + -- Build-tools: