diff options
Diffstat (limited to 'editor/actions')
-rwxr-xr-x | editor/actions/add_page.ml | 3 | ||||
-rwxr-xr-x | editor/actions/delete_page.ml | 3 | ||||
-rwxr-xr-x | editor/actions/import.ml | 7 | ||||
-rwxr-xr-x | editor/actions/load_page.ml | 1 |
4 files changed, 10 insertions, 4 deletions
diff --git a/editor/actions/add_page.ml b/editor/actions/add_page.ml index e5e8541..ec9768b 100755 --- a/editor/actions/add_page.ml +++ b/editor/actions/add_page.ml @@ -23,7 +23,8 @@ let create let title = Jstr.v "Nouvelle page" in let ev = Elements.Popup.create ~title - ~form:(Some (Forms.Add_page.create ())) + ~form:(Forms.Add_page.create ()) + () in Note.E.map (fun v -> State.E diff --git a/editor/actions/delete_page.ml b/editor/actions/delete_page.ml index 58c1d32..fbd4fde 100755 --- a/editor/actions/delete_page.ml +++ b/editor/actions/delete_page.ml @@ -22,7 +22,8 @@ let create in let ev = Elements.Popup.create ~title - ~form:(Some (Forms.Validation.create message )) + ~form:(Forms.Validation.create message) + () in Note.E.map (fun v -> State.E diff --git a/editor/actions/import.ml b/editor/actions/import.ml index 4cac76c..13ed938 100755 --- a/editor/actions/import.ml +++ b/editor/actions/import.ml @@ -44,9 +44,14 @@ end let create () = let title = Jstr.v "Importer des notes" in + let form = Forms.Selector.create () in let ev = Elements.Popup.create ~title - ~form:(Some (Forms.Selector.create ())) in + ~form + ~valid_on:(Note.S.map (fun form -> form.Forms.Selector.file != None) (fst form)) + () + in + Note.E.map (fun v -> State.E ( v diff --git a/editor/actions/load_page.ml b/editor/actions/load_page.ml index 349eaad..bcce51c 100755 --- a/editor/actions/load_page.ml +++ b/editor/actions/load_page.ml @@ -8,4 +8,3 @@ module M = struct State.load_page page_id state end - |