aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/LoggedIn
diff options
context:
space:
mode:
authorJoris2016-01-03 19:41:31 +0100
committerJoris2016-01-03 19:41:31 +0100
commita8309988518af5bddf62d6a326d990fde4069b40 (patch)
tree6ff9c0af27d78f8579b5c3975378a3c82899593c /src/client/elm/View/LoggedIn
parent0cba27cba2b44756389d50bc113f23a2be87e978 (diff)
downloadbudget-a8309988518af5bddf62d6a326d990fde4069b40.tar.gz
budget-a8309988518af5bddf62d6a326d990fde4069b40.tar.bz2
budget-a8309988518af5bddf62d6a326d990fde4069b40.zip
Set focus properties to button elements
Diffstat (limited to 'src/client/elm/View/LoggedIn')
-rw-r--r--src/client/elm/View/LoggedIn/Account.elm3
-rw-r--r--src/client/elm/View/LoggedIn/AddPayment.elm5
-rw-r--r--src/client/elm/View/LoggedIn/Monthly.elm5
-rw-r--r--src/client/elm/View/LoggedIn/Table.elm3
4 files changed, 6 insertions, 10 deletions
diff --git a/src/client/elm/View/LoggedIn/Account.elm b/src/client/elm/View/LoggedIn/Account.elm
index 9459740..a7c20d5 100644
--- a/src/client/elm/View/LoggedIn/Account.elm
+++ b/src/client/elm/View/LoggedIn/Account.elm
@@ -17,7 +17,6 @@ import Model.Translations exposing (getParamMessage, getMessage)
import Model.Action exposing (..)
import Model.Action.LoggedInAction exposing (..)
import Model.Action.AccountAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedInView exposing (LoggedInView)
import Model.View.LoggedIn.Account exposing (..)
@@ -95,7 +94,7 @@ incomeEdition address model account edition =
H.form
[ case validateIncome edition.income model.translations of
Ok validatedAmount ->
- onSubmitPrevDefault address (ServerCommunication <| Communication.SetIncome model.currentTime validatedAmount)
+ onSubmitPrevDefault address (SetIncome model.currentTime validatedAmount)
Err error ->
onSubmitPrevDefault address (UpdateLoggedIn << UpdateAccount << UpdateEditionError <| error)
, class "income"
diff --git a/src/client/elm/View/LoggedIn/AddPayment.elm b/src/client/elm/View/LoggedIn/AddPayment.elm
index 283d392..0b39591 100644
--- a/src/client/elm/View/LoggedIn/AddPayment.elm
+++ b/src/client/elm/View/LoggedIn/AddPayment.elm
@@ -13,10 +13,9 @@ import Html.Events exposing (..)
import Model exposing (Model)
import Model.Payment exposing (PaymentFrequency(..))
import Model.Translations exposing (getMessage)
-import Model.Action exposing (..)
+import Model.Action as Action exposing (..)
import Model.Action.LoggedInAction as LoggedInAction exposing (..)
import Model.Action.AddPaymentAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedIn.AddPayment exposing (..)
import Model.View.LoggedInView exposing (LoggedInView)
@@ -32,7 +31,7 @@ addPayment address model loggedInView =
H.form
[ let update =
if loggedInView.add.waitingServer
- then NoOp
+ then Action.NoOp
else
case (validateName loggedInView.add.name model.translations, validateCost loggedInView.add.cost model.translations) of
(Ok name, Ok cost) ->
diff --git a/src/client/elm/View/LoggedIn/Monthly.elm b/src/client/elm/View/LoggedIn/Monthly.elm
index c0294d7..2e9ff1e 100644
--- a/src/client/elm/View/LoggedIn/Monthly.elm
+++ b/src/client/elm/View/LoggedIn/Monthly.elm
@@ -13,9 +13,8 @@ import Model exposing (Model)
import Model.Payment as Payment exposing (Payments, Payment)
import Model.Translations exposing (getMessage, getParamMessage)
import Model.Action exposing (..)
-import Model.Action.LoggedInAction exposing (..)
+import Model.Action.LoggedInAction as LoggedInAction exposing (..)
import Model.Action.MonthlyAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedIn.Monthly exposing (Monthly)
import Model.View.LoggedInView exposing (LoggedInView)
@@ -81,7 +80,7 @@ paymentLine address model loggedInView payment =
[ text (price model payment.cost) ]
, div
[ class "cell delete"
- , onClick address (ServerCommunication <| Communication.DeletePayment payment Payment.Monthly)
+ , onClick address (UpdateLoggedIn <| LoggedInAction.DeletePayment payment Payment.Monthly)
]
[ button [] [ renderIcon "times" ]
]
diff --git a/src/client/elm/View/LoggedIn/Table.elm b/src/client/elm/View/LoggedIn/Table.elm
index cb3969b..ca5680f 100644
--- a/src/client/elm/View/LoggedIn/Table.elm
+++ b/src/client/elm/View/LoggedIn/Table.elm
@@ -17,7 +17,6 @@ import Model.Payment exposing (..)
import Model.Translations exposing (getMessage)
import Model.Action exposing (..)
import Model.Action.LoggedInAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedInView exposing (LoggedInView)
import View.Icon exposing (renderIcon)
@@ -88,7 +87,7 @@ paymentLine address model loggedInView payment =
div
[ class "cell delete" ]
[ button
- [ onClick address (ServerCommunication <| Communication.DeletePayment payment Punctual)]
+ [ onClick address (UpdateLoggedIn <| DeletePayment payment Punctual)]
[ renderIcon "times" ]
]
else