mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-30 21:40:12 +00:00 
			
		
		
		
	Remove code from old ui
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user