Commit 9087b8f2 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Ergo/Design/Text.

parent 9d94fe12
...@@ -178,17 +178,16 @@ searchBar (query /\ setQuery) = R.createElement el {} [] ...@@ -178,17 +178,16 @@ searchBar (query /\ setQuery) = R.createElement el {} []
queryText <- R.useState' query queryText <- R.useState' query
pure $ H.div {className: "row"} pure $ H.div {className: "row"}
[ H.div {className: "col col-md-3 form-group"} [ H.div {className: "col col-md-3"} []
, H.div {className: "col col-md-1"} [searchButton queryText]
, H.div {className: "col col-md-3 form-group"}
[ H.input { type: "text" [ H.input { type: "text"
, className: "form-control" , className: "form-control"
, on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText} , on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText}
, placeholder: query , placeholder: query
, defaultValue: query} , defaultValue: query}
] ]
, H.div {className: "col col-md-1"} , H.div {className: "col col-md-1"} [if query /= "" then clearButton else H.div {} []]
[ searchButton queryText
, if query /= "" then clearButton else H.div {} []
]
] ]
onSearchChange :: forall e. R.State Query -> e -> Effect Unit onSearchChange :: forall e. R.State Query -> e -> Effect Unit
...@@ -281,8 +280,8 @@ renderPage (_ /\ setTableParams) p res = R.createElement el p [] ...@@ -281,8 +280,8 @@ renderPage (_ /\ setTableParams) p res = R.createElement el p []
, container: T.defaultContainer { title: "Documents" } , container: T.defaultContainer { title: "Documents" }
, colNames: , colNames:
T.ColumnName <$> T.ColumnName <$>
[ "Map" [ "Favorites"
, "Stop" , "Trash"
, "Date" , "Date"
, "Title" , "Title"
, "Source" , "Source"
......
...@@ -175,8 +175,9 @@ instance decodeResponse :: DecodeJson Response where ...@@ -175,8 +175,9 @@ instance decodeResponse :: DecodeJson Response where
created <- obj .? "created" created <- obj .? "created"
hyperdata <- obj .? "hyperdata" hyperdata <- obj .? "hyperdata"
favorite <- obj .? "favorite" favorite <- obj .? "favorite"
ngramCount <- obj .? "ngramCount" --ngramCount <- obj .? "ngramCount"
pure $ Response { id, created, hyperdata, category: decodeCategory favorite, ngramCount } let ngramCount = 1
pure $ Response { id, created, hyperdata, category: decodeCategory favorite, ngramCount}
-- | Filter -- | Filter
-- TODO: unused -- TODO: unused
......
...@@ -46,7 +46,7 @@ instance encodeJsonDatabase :: EncodeJson Database where ...@@ -46,7 +46,7 @@ instance encodeJsonDatabase :: EncodeJson Database where
allDatabases :: Array Database allDatabases :: Array Database
allDatabases = [All, HAL, IsTex, PubMed] allDatabases = [All, PubMed]
data SearchOrder data SearchOrder
= DateAsc = DateAsc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment