From 071b07463ab3f6894928b13553e98cd47c9ccb18 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 28 Jun 2016 00:32:37 +0200 Subject: Add tooltips --- src/client/elm/LoggedIn/Home/Header/View.elm | 1 + src/client/elm/LoggedIn/Home/View/Table.elm | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/client/elm/LoggedIn/Home') diff --git a/src/client/elm/LoggedIn/Home/Header/View.elm b/src/client/elm/LoggedIn/Home/Header/View.elm index b23e6fe..6ddd846 100644 --- a/src/client/elm/LoggedIn/Home/Header/View.elm +++ b/src/client/elm/LoggedIn/Home/Header/View.elm @@ -54,6 +54,7 @@ searchLine loggedData search frequency = (DialogModel.addPaymentInitial loggedData.translations currentDate frequency) "AddPayment" (text (getMessage "AddPayment" loggedData.translations)) + Nothing ] searchForm : LoggedData -> Form String Home.Search -> Html Msg diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm index ebffeb9..05c9e06 100644 --- a/src/client/elm/LoggedIn/Home/View/Table.elm +++ b/src/client/elm/LoggedIn/Home/View/Table.elm @@ -13,6 +13,12 @@ import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) +import Dialog +import Dialog.Model as DialogModel +import Dialog.AddPaymentButton.View as AddPaymentButton + +import Tooltip + import Msg exposing (Msg) import LoggedData exposing (LoggedData) @@ -28,10 +34,6 @@ import Model.User exposing (getUserName) import Model.Payment as Payment exposing (..) import Model.Translations exposing (getMessage) -import Dialog -import Dialog.Model as DialogModel -import Dialog.AddPaymentButton.View as AddPaymentButton - view : LoggedData -> HomeModel.Model -> Payments -> Frequency -> Html Msg view loggedData homeModel payments frequency = let visiblePayments = @@ -107,6 +109,7 @@ paymentLine loggedData homeModel frequency payment = (DialogModel.clonePaymentInitial loggedData.translations currentDate payment) "ClonePayment" (FontAwesome.clone Color.chestnutRose 18) + (Just (getMessage "Clone" loggedData.translations)) ] , div [ class "cell button" ] @@ -119,6 +122,7 @@ paymentLine loggedData homeModel frequency payment = (DialogModel.editPaymentInitial loggedData.translations payment) "EditPayment" (FontAwesome.edit Color.chestnutRose 18) + (Just (getMessage "Edit" loggedData.translations)) ] , div [ class "cell button" ] @@ -135,7 +139,9 @@ paymentLine loggedData homeModel frequency payment = , undo = getMessage "Undo" loggedData.translations } in button - [ onClick (Msg.Dialog <| Dialog.Open dialogConfig) ] + ( Tooltip.show Msg.Tooltip (getMessage "Delete" loggedData.translations) + ++ [ onClick (Msg.Dialog <| Dialog.Open dialogConfig) ] + ) [ FontAwesome.trash Color.chestnutRose 18 ] ] ] -- cgit v1.2.3