From 65d49cd5ca457adacd39ffee72ba7c251b3515f8 Mon Sep 17 00:00:00 2001 From: Vasilis Papavasileiou Date: Wed, 30 Mar 2016 17:09:39 +0200 Subject: [PATCH] Compile against Eliom_client_value and related modules --- src/widgets/ot_calendar.eliom | 6 +++--- src/widgets/ot_calendar.eliomi | 8 ++++---- src/widgets/ot_range.eliom | 8 ++++---- src/widgets/ot_time_picker.eliom | 19 ++++++++----------- src/widgets/ot_time_picker.eliomi | 12 ++++++------ src/widgets/ot_toggle.eliom | 6 ++---- src/widgets/ot_toggle.eliomi | 2 +- 7 files changed, 28 insertions(+), 33 deletions(-) diff --git a/src/widgets/ot_calendar.eliom b/src/widgets/ot_calendar.eliom index b2f275c8..a1d1590d 100644 --- a/src/widgets/ot_calendar.eliom +++ b/src/widgets/ot_calendar.eliom @@ -323,12 +323,12 @@ let%client make : let%server make : ?init : (int * int * int) -> ?highlight : - (int -> int -> int list Lwt.t) Eliom_client_common.client_value -> + (int -> int -> int list Lwt.t) Eliom_client_value.t -> ?click_non_highlighted : bool -> ?update : - (int * int * int) React.E.t Eliom_client_common.client_value -> + (int * int * int) React.E.t Eliom_client_value.t -> ?action : - (int -> int -> int -> unit Lwt.t) Eliom_client_common.client_value -> + (int -> int -> int -> unit Lwt.t) Eliom_client_value.t -> ?intl : intl -> unit -> [> Html5_types.table ] elt = diff --git a/src/widgets/ot_calendar.eliomi b/src/widgets/ot_calendar.eliomi index 04ef6293..791e2864 100644 --- a/src/widgets/ot_calendar.eliomi +++ b/src/widgets/ot_calendar.eliomi @@ -46,13 +46,13 @@ type intl = { val make : ?init : (int * int * int) -> ?highlight : - (int -> int -> int list Lwt.t) Eliom_client_common.client_value -> + (int -> int -> int list Lwt.t) Eliom_client_value.t -> ?click_non_highlighted : bool -> ?update : - (int * int * int) React.E.t Eliom_client_common.client_value -> + (int * int * int) React.E.t Eliom_client_value.t -> ?action : - (int -> int -> int -> unit Lwt.t) Eliom_client_common.client_value -> + (int -> int -> int -> unit Lwt.t) Eliom_client_value.t -> ?intl : intl -> unit -> [> Html5_types.table ] Eliom_content.Html5.elt @@ -65,7 +65,7 @@ val make : val make_date_picker : ?init : (int * int * int) -> ?update : - (int * int * int) React.E.t Eliom_client_common.client_value -> + (int * int * int) React.E.t Eliom_client_value.t -> ?intl : intl -> unit -> [> Html5_types.table ] Eliom_content.Html5.F.elt * diff --git a/src/widgets/ot_range.eliom b/src/widgets/ot_range.eliom index 6f90675a..96c311c0 100644 --- a/src/widgets/ot_range.eliom +++ b/src/widgets/ot_range.eliom @@ -53,13 +53,13 @@ let display e (v, f) = D.(div ~a:[a_class ["ot-range"]] [div ~a:[a_class ["ot-r-up"]; - a_onclick ([%client (fun _ -> go_up ~%e ~%v ~%f : _ -> _) ] - : _ Eliom_client_common.client_value)] + a_onclick + [%client (fun _ -> go_up ~%e ~%v ~%f : _ -> _) ]] [pcdata txt_up]; display_aux e v; div ~a:[a_class ["ot-r-down"]; - a_onclick ([%client (fun _ -> go_down ~%e ~%v ~%f : _ -> _) ] - : _ Eliom_client_common.client_value)] + a_onclick + [%client (fun _ -> go_down ~%e ~%v ~%f : _ -> _) ]] [pcdata txt_down]]) let make ?txt_up ?txt_down ?f ?lb:(lb = 0) ub = diff --git a/src/widgets/ot_time_picker.eliom b/src/widgets/ot_time_picker.eliom index 628c8f15..d844ba9f 100644 --- a/src/widgets/ot_time_picker.eliom +++ b/src/widgets/ot_time_picker.eliom @@ -28,7 +28,7 @@ type polar = int * int type cartesian = int * int -type time_receiver = (int -> int -> unit) Eliom_client_common.client_value +type time_receiver = (int -> int -> unit) Eliom_client_value.t type 'a rf = ?step:React.step -> 'a -> unit @@ -316,7 +316,7 @@ let%client wrap_click_24h ev f_e f_b = wrap_click_aux ev (fun (r, e) -> f_b r; f_e (e, true)) let clock_html_wrap ?(classes = []) - s (f : (int * bool) rf Eliom_client_common.client_value) = + s (f : (int * bool) rf Eliom_client_value.t) = let e = let a = let open Eliom_content.Svg.F in [ @@ -325,8 +325,7 @@ let clock_html_wrap ?(classes = []) :: "ot-tp-click-anywhere" :: classes); a_viewbox ( 0. , 0. , 100. , 100. ); - a_onclick ([%client fun ev -> wrap_click ev ~%f ] - : _ Eliom_client_common.client_value) + a_onclick [%client fun ev -> wrap_click ev ~%f ] ] in Eliom_content.Html5.D.svg ~a [s] @@ -346,13 +345,13 @@ let clock_html_wrap ?(classes = []) let clock_html_wrap_24h ?(classes = []) s f_e f_b = let e = let a = - let f = ([%client fun ev -> + let f = [%client fun ev -> let step' = React.Step.create () in let step = Some step' in let f_b r = ~%f_b ?step (r <= 35, true) in wrap_click_24h ev (~%f_e ?step) f_b; React.Step.execute step' - ] : _ Eliom_client_common.client_value) in + ] in let open Eliom_content.Svg.F in [ a_class ("ot-tp-clock" @@ -405,16 +404,14 @@ let display_hours_minutes_seq ?h24:(h24 = false) f (h, m) b = [D.a_class ["ot-tp-hours"; "ot-tp-active"]] else [D.a_class ["ot-tp-hours"; "ot-tp-inactive"]; - D.a_onclick ([%client fun _ -> ~%f true ] - : _ Eliom_client_common.client_value)] + D.a_onclick [%client fun _ -> ~%f true ]] and c = [string_of_hours ~h24 h |> D.pcdata] in D.span ~a c and m = let a = if b then D.[a_class ["ot-tp-minutes"; "ot-tp-inactive"]; - a_onclick ([%client fun _ -> ~%f false ] - : _ Eliom_client_common.client_value)] + a_onclick [%client fun _ -> ~%f false ]] else [D.a_class ["ot-tp-minutes"; "ot-tp-active"]] and c = [Printf.sprintf "%02d" m |> D.pcdata] in @@ -512,7 +509,7 @@ let make_hours_minutes_seq_24h let g_h = let e_h' = get_angle_signal ~round:true e_h and f_e_h = - Eliom_client_common.create_shared_value + Eliom_shared.Value.create (Eliom_shared.Value.local f_e_h) [%client fun ?step ((x, b) as p) -> ~%f_e_h ?step p; diff --git a/src/widgets/ot_time_picker.eliomi b/src/widgets/ot_time_picker.eliomi index 0c5caf5b..37a74616 100644 --- a/src/widgets/ot_time_picker.eliomi +++ b/src/widgets/ot_time_picker.eliomi @@ -33,11 +33,11 @@ function that can be called to go back to hours selection. *) val make : ?action : - (int * int -> unit Lwt.t) Eliom_client_common.client_value -> + (int * int -> unit Lwt.t) Eliom_client_value.t -> ?init : int * int -> ?update : - (int * int) React.E.t Eliom_client_common.client_value -> + (int * int) React.E.t Eliom_client_value.t -> ?round_5 : bool -> ?h24 : @@ -45,16 +45,16 @@ val make : unit -> [> Html5_types.div] Eliom_content.Html5.D.elt * (int * int) Eliom_shared.React.S.t * - (unit -> unit) Eliom_client_common.client_value + (unit -> unit) Eliom_client_value.t (** Alias of [make]. Deprecated. *) val make_hours_minutes_seq : ?action : - (int * int -> unit Lwt.t) Eliom_client_common.client_value -> + (int * int -> unit Lwt.t) Eliom_client_value.t -> ?init : int * int -> ?update : - (int * int) React.E.t Eliom_client_common.client_value -> + (int * int) React.E.t Eliom_client_value.t -> ?round_5 : bool -> ?h24 : @@ -62,4 +62,4 @@ val make_hours_minutes_seq : unit -> [> Html5_types.div] Eliom_content.Html5.D.elt * (int * int) Eliom_shared.React.S.t * - (unit -> unit) Eliom_client_common.client_value + (unit -> unit) Eliom_client_value.t diff --git a/src/widgets/ot_toggle.eliom b/src/widgets/ot_toggle.eliom index 90f5db1d..cd20af0a 100644 --- a/src/widgets/ot_toggle.eliom +++ b/src/widgets/ot_toggle.eliom @@ -39,14 +39,12 @@ let display_toggle [div ~a:[a_class ["ot-active"; "ot-up"]] [pcdata up_txt]; div ~a:[a_class ["ot-inactive"; "ot-down"]; - a_onclick ([%client (fun _ -> ~%f T_Down : _ -> _) ] - : _ Eliom_client_common.client_value)] + a_onclick [%client (fun _ -> ~%f T_Down : _ -> _) ]] [pcdata down_txt]] | T_Down -> div ~a:[a_class ["ot-toggle"]] [div ~a:[a_class ["ot-inactive"; "ot-up"]; - a_onclick ([%client (fun _ -> ~%f T_Up : _ -> _) ] - : _ Eliom_client_common.client_value)] + a_onclick [%client (fun _ -> ~%f T_Up : _ -> _) ]] [pcdata up_txt]; div ~a:[a_class ["ot-active"; "ot-down"]] [pcdata down_txt]] diff --git a/src/widgets/ot_toggle.eliomi b/src/widgets/ot_toggle.eliomi index 4fca27a8..345dff5c 100644 --- a/src/widgets/ot_toggle.eliomi +++ b/src/widgets/ot_toggle.eliomi @@ -30,7 +30,7 @@ val make : ?init_up : bool -> ?up_txt : string -> ?down_txt : string -> - ?update : bool React.E.t Eliom_client_common.client_value -> + ?update : bool React.E.t Eliom_client_value.t -> unit -> [> Html5_types.div ] Eliom_content.Html5.D.elt * bool Eliom_shared.React.S.t