Commit 08a94a8e authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent db9a2ea9
...@@ -4,7 +4,7 @@ import StdEnv, ArgEnv ...@@ -4,7 +4,7 @@ import StdEnv, ArgEnv
import htmlHandler, htmlStylelib, htmlTrivial import htmlHandler, htmlStylelib, htmlTrivial
derive gUpd (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, /*Button, */CheckBox, RadioButton /*, PullDownMenu, TextInput */, TextArea/*, PasswordBox*/ derive gUpd (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode/*, Button, CheckBox*/, RadioButton /*, PullDownMenu, TextInput */, TextArea/*, PasswordBox*/
derive gPrint (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox derive gPrint (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox
derive gParse (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox derive gParse (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox
derive gerda (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox derive gerda (,), (,,), (,,,), (<->), <|>, HtmlDate, HtmlTime, DisplayMode, Button, CheckBox, RadioButton, PullDownMenu, TextInput, TextArea, PasswordBox
...@@ -365,12 +365,19 @@ gUpd{|PullDownMenu|} (UpdSearch val cnt) v = (UpdSearch val (cnt - 1),v) // co ...@@ -365,12 +365,19 @@ gUpd{|PullDownMenu|} (UpdSearch val cnt) v = (UpdSearch val (cnt - 1),v) // co
gUpd{|PullDownMenu|} (UpdCreate l) _ = (UpdCreate l,PullDown (1,defpixel) (0,["error"])) // create default value gUpd{|PullDownMenu|} (UpdCreate l) _ = (UpdCreate l,PullDown (1,defpixel) (0,["error"])) // create default value
gUpd{|PullDownMenu|} mode v = (mode,v) // don't change gUpd{|PullDownMenu|} mode v = (mode,v) // don't change
gUpd{|Button|} (UpdSearch (UpdS name) 0) _ = (UpdDone,Pressed) // update button value
gUpd{|Button|} (UpdSearch (UpdS name) 0) _ = (UpdDone,Pressed) // update integer value
gUpd{|Button|} (UpdSearch val cnt) b = (UpdSearch val (cnt - 1),b) // continue search, don't change gUpd{|Button|} (UpdSearch val cnt) b = (UpdSearch val (cnt - 1),b) // continue search, don't change
gUpd{|Button|} (UpdCreate l) _ = (UpdCreate l,(LButton defsize "Press")) // create default value gUpd{|Button|} (UpdCreate l) _ = (UpdCreate l,(LButton defsize "Press")) // create default value
gUpd{|Button|} mode b = (mode,b) // don't change gUpd{|Button|} mode b = (mode,b) // don't change
gUpd{|CheckBox|} (UpdSearch (UpdS name) 0) (CBChecked s) = (UpdDone,CBNotChecked s) // update CheckBox value
gUpd{|CheckBox|} (UpdSearch (UpdS name) 0) (CBNotChecked s) = (UpdDone,CBChecked s) // update CheckBox value
gUpd{|CheckBox|} (UpdSearch val cnt) b = (UpdSearch val (cnt - 1),b) // continue search, don't change
gUpd{|CheckBox|} (UpdCreate l) _ = (UpdCreate l,(CBNotChecked "defaultCheckboxName")) // create default value
gUpd{|CheckBox|} mode b = (mode,b) // don't change
gUpd{|TextInput|} (UpdSearch (UpdI ni) 0) (TI size i) = (UpdDone,TI size ni) // update integer value gUpd{|TextInput|} (UpdSearch (UpdI ni) 0) (TI size i) = (UpdDone,TI size ni) // update integer value
gUpd{|TextInput|} (UpdSearch (UpdR nr) 0) (TR size r) = (UpdDone,TR size nr) // update integer value gUpd{|TextInput|} (UpdSearch (UpdR nr) 0) (TR size r) = (UpdDone,TR size nr) // update integer value
gUpd{|TextInput|} (UpdSearch (UpdS ns) 0) (TS size s) = (UpdDone,TS size ns) // update integer value gUpd{|TextInput|} (UpdSearch (UpdS ns) 0) (TS size s) = (UpdDone,TS size ns) // update integer value
......
...@@ -432,7 +432,7 @@ where ...@@ -432,7 +432,7 @@ where
FuncCheckBox formid (checkbox,cbf) hst = mkViewForm (init,nformid) bimap hst FuncCheckBox formid (checkbox,cbf) hst = mkViewForm (init,nformid) bimap hst
where where
bimap = { toForm = \init _ v -> toViewId init checkbox v bimap = { toForm = \init _ v -> toViewId init checkbox v
, updForm = \b v -> if (not (toBool init) && b.isChanged) (toggle v) v // if (not init && b.isChanged) (toggle v) v , updForm = \b v -> v
, fromForm = \b v -> if b.isChanged ((docbf v),toBool v) (\_ a -> a,toBool v) , fromForm = \b v -> if b.isChanged ((docbf v),toBool v) (\_ a -> a,toBool v)
, resetForm = Nothing , resetForm = Nothing
} }
...@@ -513,7 +513,7 @@ where ...@@ -513,7 +513,7 @@ where
nformid = {formid & id = formid.id +++ "/" +++ toString j, ival = (\_ a -> a,-1)} nformid = {formid & id = formid.id +++ "/" +++ toString j, ival = (\_ a -> a,-1)}
stripname name = mkString (takeWhile ((<>) '_') (mkList name)) stripname name = mkString (takeWhile ((<>) '/') (mkList name))
FuncMenu :: !(InIDataId (Int,[(String, a -> a)])) !*HSt FuncMenu :: !(InIDataId (Int,[(String, a -> a)])) !*HSt
-> (Form (a -> a,Int),!*HSt) -> (Form (a -> a,Int),!*HSt)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment