From 7f6f6045c0c1cc9bd8323e3e7de905e0e46fe82d Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Mon, 28 May 2018 21:34:07 +0600 Subject: Adding: cradio (support for client-side radio box). --- src/css.sml | 1 + src/monoize.sml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/css.sml b/src/css.sml index 9e50686f..5bf4ea7b 100644 --- a/src/css.sml +++ b/src/css.sml @@ -104,6 +104,7 @@ val tags = [("span", inline), ("cpassword", replaced), ("button", replaced), ("ccheckbox", replaced), + ("cradio", replaced), ("cselect", replaced), ("ctextarea", replaced), ("tabl", table), diff --git a/src/monoize.sml b/src/monoize.sml index 85a66e87..11c6ea31 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3070,7 +3070,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | _ => (attrs, NONE) - val dynamics = ["dyn", "ctextbox", "cpassword", "ccheckbox", "cselect", "coption", "ctextarea", "active", "script", "cemail", "csearch", "curl", "ctel", "ccolor"] + val dynamics = ["dyn", "ctextbox", "cpassword", "ccheckbox", "cradio", "cselect", "coption", "ctextarea", "active", "script", "cemail", "csearch", "curl", "ctel", "ccolor"] fun isSome (e, _) = case e of @@ -3560,6 +3560,8 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | "ctime" => cinput ("time", "time") | "ccheckbox" => cinput ("checkbox", "chk") + | "cradio" => cinput ("radio", "crad") + | "cselect" => (case List.find (fn ("Source", _, _) => true | _ => false) attrs of NONE => -- cgit v1.2.3 From 6fc9746d0cc8f18cc570647b8e571a34c5aeb0fe Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Mon, 28 May 2018 21:39:46 +0600 Subject: Formatting --- src/css.sml | 2 +- tests/cradio.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/css.sml b/src/css.sml index 5bf4ea7b..17ec01d5 100644 --- a/src/css.sml +++ b/src/css.sml @@ -104,7 +104,7 @@ val tags = [("span", inline), ("cpassword", replaced), ("button", replaced), ("ccheckbox", replaced), - ("cradio", replaced), + ("cradio", replaced), ("cselect", replaced), ("ctextarea", replaced), ("tabl", table), diff --git a/tests/cradio.py b/tests/cradio.py index b70b2ef1..acc8dc11 100644 --- a/tests/cradio.py +++ b/tests/cradio.py @@ -1,13 +1,7 @@ import unittest import base -# issue: initialization doesn't quite work - class Suite(base.Base): -# test case: -# initially the source is EMPTY -# then we pick SECOND variant and check the source -# then we pick the FIRST variant and check the source def test_1(self): """Test case 1""" self.start("Cradio/main") -- cgit v1.2.3