MFlow 0.4.5.10 → 0.4.5.11
raw patch · 4 files changed
+13/−12 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- MFlow.cabal +7/−4
- src/MFlow/Forms.hs +1/−1
- src/MFlow/Forms/Internals.hs +1/−3
- src/MFlow/Forms/Widgets.hs +4/−4
MFlow.cabal view
@@ -1,5 +1,5 @@ name: MFlow -version: 0.4.5.10 +version: 0.4.5.11 cabal-version: >=1.8 build-type: Simple license: BSD3 @@ -186,6 +186,7 @@ MFlow.Forms.WebApi MFlow.Forms.Cache exposed: True buildable: True + build-tools: cpphs hs-source-dirs: src . other-modules: MFlow.Wai.Response @@ -195,12 +196,13 @@ -- tcache-AWS , directory , Workflow , base , -- blaze-html , bytestring , containers , mtl , -- old-time , stm , text , transformers , vector , --- hamlet , shakespeare, monadloc , aws == 0.9.1 , network , hscolour , +-- hamlet , shakespeare, monadloc , aws , network , hscolour , -- persistent-template , persistent-sqlite , persistent , -- conduit , http-conduit , monad-logger , safecopy , --- time, acid-state ==0.12.2, data-default, auto-update == 0.1.0.0 +-- time, acid-state, data-default -- main-is: demos-blaze.hs -- buildable: True +-- build-tools: cpphs, monadloc-pp -- hs-source-dirs: Demos -- other-modules: TestREST ShopCart AjaxSample TraceSample IncreaseString IncreaseInt -- AutoCompList ListEdit AutoComplete Menu RuntimeTemplates @@ -212,4 +214,5 @@ -- InitialConfig GenerateForm GenerateFormUndo GenerateFormUndoMsg WebService -- LazyLoad CachingDataset -- ghc-options: -iDemos -threaded -rtsopts --- + +
src/MFlow/Forms.hs view
@@ -1306,7 +1306,7 @@ let path= concat ['/':v| v <- newPath ] return $ FormElm (flink path v) r --- Creates an absolute link. While a `wlink` path depend on the page where it is located and +-- | Creates an absolute link. While a `wlink` path depend on the page where it is located and -- ever points to the code of the page that had it inserted, an absLink point to the first page -- in the flow that inserted it. It is useful for creating a backtracking point in combination with `retry` --
src/MFlow/Forms/Internals.hs view
@@ -1112,9 +1112,7 @@ -- | Clears the environment clearEnv :: MonadState (MFlowState view) m => m () -clearEnv= do - st <- get - put st{ mfEnv= []} +clearEnv= modify $ \s -> s{ mfEnv= []}
src/MFlow/Forms/Widgets.hs view
@@ -154,11 +154,11 @@ val <- userValidate (name,pass) case val of Just msg -> notValid msg - Nothing -> login name >> (return name) + Nothing -> login name >> clearEnv >> (return name) `wcallback` (\name -> ftag "b" (fromStr $ "logged as " ++ name++ " ") ++> pageFlow "logout" (submitButton "logout")) -- wlink ("logout" :: String) (ftag "b" $ fromStr " logout")) - `wcallback` const (logout >> wlogin) + `wcallback` const (logout >> clearEnv >> wlogin) focus = [("onload","this.focus()")] hint s= [("placeholder",s)] @@ -673,9 +673,9 @@ ,JScript autoEvalForm ,JScript $ timeoutscript t ,JScriptFile jqueryScript [installAutoEval] - ,JScript setId] + ,JScript setId] - (ftag "div" <<< w') <! [("id",name)] + (ftag "div" <<< w') <! [("id",name)] Just sind -> refresh $ View $ do FormElm _ mr <- runView w'