From b0357cefdbcf4d8c3b4323f8d34f08257d6bf88b Mon Sep 17 00:00:00 2001 From: Chelsea Voss Date: Sat, 5 Nov 2016 16:41:08 -0400 Subject: Revert x button behavior when accessed through Next Actions Also create New Action page at /new, whose x button accesses the browser history. --- main.ur | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/main.ur b/main.ur index 0620419..8231762 100644 --- a/main.ur +++ b/main.ur @@ -64,12 +64,12 @@ style visible datatype mode = NextActions | NewNextAction -val newActionsDiv actionItems = +val makeNewActionsDiv goBackAction actionItems = newNextActionDescription <- Mdl.Textbox.make "Description"; return
-
@@ -79,7 +79,7 @@ val newActionsDiv actionItems = name <- get newNextActionDescription.Source; bind (rpc (newNextAction name)) (set actionItems); sleep 0; - (* TODO(csvoss): Put the right back action here. *) + goBackAction; set newNextActionDescription.Source "" } />
@@ -90,12 +90,15 @@ val newActionsDiv actionItems =
-val new = return Hello, world! +val new = + actionItems <- bind renderNextActions source; + newActionsDiv <- makeNewActionsDiv History.browserBack actionItems; + return {newActionsDiv} val main = actionItems <- bind renderNextActions source; mode <- source NextActions; - newActionsDivValue <- newActionsDiv actionItems; + newActionsDiv <- makeNewActionsDiv (set mode NextActions) actionItems; return (* TODO(bbaren): Write a meta-description tag. *) @@ -125,7 +128,7 @@ val main = NewNextAction => visible | _ => hidden) }> - {newActionsDivValue} + {newActionsDiv}