Remove code from old ui

This commit is contained in:
Eike Kettner 2021-04-17 10:24:25 +02:00
parent b3c3c783dc
commit c9b54e80b7
3 changed files with 2 additions and 59 deletions

View File

@ -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

View File

@ -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

View File

@ -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