diff --git a/modules/webapp/src/main/elm/Comp/LinkTarget.elm b/modules/webapp/src/main/elm/Comp/LinkTarget.elm index 30b21e5b..d9b456d0 100644 --- a/modules/webapp/src/main/elm/Comp/LinkTarget.elm +++ b/modules/webapp/src/main/elm/Comp/LinkTarget.elm @@ -102,7 +102,7 @@ makeCustomFieldLink : -> (LinkTarget -> msg) -> Html msg makeCustomFieldLink cv classes tagger = - Util.CustomField.renderValue1 + Util.CustomField.renderValue2 classes (tagger (LinkCustomField cv) |> Just) cv diff --git a/modules/webapp/src/main/elm/Util/CustomField.elm b/modules/webapp/src/main/elm/Util/CustomField.elm index a373da13..761e4407 100644 --- a/modules/webapp/src/main/elm/Util/CustomField.elm +++ b/modules/webapp/src/main/elm/Util/CustomField.elm @@ -1,7 +1,6 @@ module Util.CustomField exposing ( nameOrLabel , renderValue - , renderValue1 , renderValue2 ) @@ -20,43 +19,7 @@ nameOrLabel fv = renderValue : String -> ItemFieldValue -> Html msg renderValue classes cv = - renderValue1 [ ( classes, True ) ] Nothing cv - - -renderValue1 : List ( String, Bool ) -> Maybe msg -> ItemFieldValue -> Html msg -renderValue1 classes tagger cv = - let - renderBool = - if cv.value == "true" then - i [ class "check icon" ] [] - - else - i [ class "minus icon" ] [] - - el : List (Html msg) -> Html msg - el = - case tagger of - Just t -> - a - [ classList classes - , onClick t - , href "#" - ] - - Nothing -> - div [ classList classes ] - in - el - [ Icons.customFieldTypeIconString "" cv.ftype - , nameOrLabel cv |> text - , div [ class "detail" ] - [ if Data.CustomFieldType.fromString cv.ftype == Just Data.CustomFieldType.Boolean then - renderBool - - else - text cv.value - ] - ] + renderValue2 [ ( classes, True ) ] Nothing cv renderValue2 : List ( String, Bool ) -> Maybe msg -> ItemFieldValue -> Html msg diff --git a/modules/webapp/src/main/elm/Util/Html.elm b/modules/webapp/src/main/elm/Util/Html.elm index c09562fd..99a3216c 100644 --- a/modules/webapp/src/main/elm/Util/Html.elm +++ b/modules/webapp/src/main/elm/Util/Html.elm @@ -1,6 +1,5 @@ module Util.Html exposing ( KeyCode(..) - , checkbox , checkbox2 , classActive , intToKeyCode @@ -22,25 +21,6 @@ import Html.Events exposing (keyCode, on, preventDefaultOn) import Json.Decode as D -checkboxChecked : Html msg -checkboxChecked = - i [ class "ui check square outline icon" ] [] - - -checkboxUnchecked : Html msg -checkboxUnchecked = - i [ class "ui square outline icon" ] [] - - -checkbox : Bool -> Html msg -checkbox flag = - if flag then - checkboxChecked - - else - checkboxUnchecked - - checkbox2 : Bool -> Html msg checkbox2 flag = if flag then