Commit 9d55b96b authored by Fabien Manière's avatar Fabien Manière

some spacings in the corpus search popin

parent dd8891c2
...@@ -6670,6 +6670,9 @@ a:hover { ...@@ -6670,6 +6670,9 @@ a:hover {
font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
.nav.nav-tabs .nav-link {
cursor: pointer;
}
.nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a { .nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a {
color: #DEE2E6; color: #DEE2E6;
} }
......
...@@ -6480,6 +6480,9 @@ a:hover { ...@@ -6480,6 +6480,9 @@ a:hover {
font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
.nav.nav-tabs .nav-link {
cursor: pointer;
}
.nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a { .nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a {
color: #495057; color: #495057;
} }
......
...@@ -6236,6 +6236,9 @@ a:hover { ...@@ -6236,6 +6236,9 @@ a:hover {
font-family: ForkAwesome, "Muli"; font-family: ForkAwesome, "Muli";
} }
.nav.nav-tabs .nav-link {
cursor: pointer;
}
.nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a { .nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a {
color: #495057; color: #495057;
} }
......
...@@ -6484,6 +6484,9 @@ a:hover { ...@@ -6484,6 +6484,9 @@ a:hover {
font-family: ForkAwesome, "Nunito"; font-family: ForkAwesome, "Nunito";
} }
.nav.nav-tabs .nav-link {
cursor: pointer;
}
.nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a { .nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a {
color: #495057; color: #495057;
} }
......
...@@ -6485,6 +6485,9 @@ a:hover { ...@@ -6485,6 +6485,9 @@ a:hover {
font-family: ForkAwesome, "Montserrat"; font-family: ForkAwesome, "Montserrat";
} }
.nav.nav-tabs .nav-link {
cursor: pointer;
}
.nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a { .nav.nav-tabs .nav-tabs .nav-link.active, .nav.nav-tabs .nav-tabs .nav-item.show .nav-link, .nav.nav-tabs li a {
color: #495057; color: #495057;
} }
......
...@@ -197,6 +197,7 @@ fieldCodeEditorWrapperCpt = here.component "fieldCodeEditorWrapperCpt" cpt where ...@@ -197,6 +197,7 @@ fieldCodeEditorWrapperCpt = here.component "fieldCodeEditorWrapperCpt" cpt where
, defaultValue: name , defaultValue: name
, placeholder: "Enter file name" , placeholder: "Enter file name"
, type: "text" , type: "text"
, required: false
} }
] ]
, ,
...@@ -301,6 +302,7 @@ renameableTextCpt = here.component "renameableTextCpt" cpt ...@@ -301,6 +302,7 @@ renameableTextCpt = here.component "renameableTextCpt" cpt
, onValueChanged: \st -> T.write_ st state , onValueChanged: \st -> T.write_ st state
, placeholder: "" , placeholder: ""
, type: "text" , type: "text"
, required: false
} }
, H.div { className: "btn input-group-append" , H.div { className: "btn input-group-append"
, on: { click: submit state' } } , on: { click: submit state' } }
......
...@@ -115,6 +115,7 @@ addNodeViewCpt = here.component "addNodeView" cpt where ...@@ -115,6 +115,7 @@ addNodeViewCpt = here.component "addNodeView" cpt where
, placeholder: nodeName' -- (prettyNodeType nt') , placeholder: nodeName' -- (prettyNodeType nt')
, type: "text" , type: "text"
, key: show nodeType' , key: show nodeType'
, required: false
} }
else H.div {} [] else H.div {} []
] ]
......
...@@ -62,7 +62,7 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt ...@@ -62,7 +62,7 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt
cpt { boxes: { errors }, dispatch, id, langs, session } _ = do cpt { boxes: { errors }, dispatch, id, langs, session } _ = do
search <- T.useBox $ defaultSearch { node_id = id } search <- T.useBox $ defaultSearch { node_id = id }
pure $ R.fragment pure $ R.fragment
[ H.p { className: "action-search m-1" } [ H.p { className: "action-search mx-2" }
[ H.text $ "Search and create a private " [ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name." ] <> "corpus with the search query as corpus name." ]
, searchBar { errors , searchBar { errors
......
...@@ -33,7 +33,7 @@ searchBarCpt = here.component "searchBar" cpt ...@@ -33,7 +33,7 @@ searchBarCpt = here.component "searchBar" cpt
where where
cpt { errors, langs, onSearch, search, session } _ = do cpt { errors, langs, onSearch, search, session } _ = do
--onSearchChange session s --onSearchChange session s
pure $ H.div { className: "search-bar m-1" } pure $ H.form { className: "search-bar m-2" }
[ searchField { databases: allDatabases [ searchField { databases: allDatabases
, errors , errors
, langs , langs
......
module Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField where module Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField
where
import Gargantext.Prelude import Gargantext.Prelude
...@@ -280,8 +281,8 @@ langNavCpt = here.component "langNav" cpt ...@@ -280,8 +281,8 @@ langNavCpt = here.component "langNav" cpt
search' <- T.useLive T.unequal search search' <- T.useLive T.unequal search
pure $ R.fragment pure $ R.fragment
[ H.div {className: "text-primary center"} [H.text "with lang"] [ H.div {className: "text-primary center p-1"} [H.text "with lang"]
, H.div {className: "nav nav-tabs"} ((liItem search') <$> langs) , H.div {className: "nav nav-tabs p-1"} ((liItem search') <$> langs)
] ]
where where
liItem :: Search -> Lang -> R.Element liItem :: Search -> Lang -> R.Element
...@@ -305,9 +306,9 @@ dataFieldNavCpt = here.component "dataFieldNav" cpt ...@@ -305,9 +306,9 @@ dataFieldNavCpt = here.component "dataFieldNav" cpt
search'@{ datafield } <- T.useLive T.unequal search search'@{ datafield } <- T.useLive T.unequal search
pure $ R.fragment pure $ R.fragment
[ H.div { className: "text-primary center"} [H.text "with DataField"] [ H.div { className: "text-primary center p-1"} [H.text "Search options:"]
, H.div { className: "nav nav-tabs" } ((liItem search') <$> dataFields) , H.div { className: "nav nav-tabs" } ((liItem search') <$> dataFields)
, H.div { className: "center" } [ H.text , H.div { className: "center p-1" } [ H.text
$ maybe "TODO: add Doc Instance" doc datafield $ maybe "TODO: add Doc Instance" doc datafield
] ]
] ]
...@@ -376,13 +377,13 @@ databaseInputCpt = here.component "databaseInput" cpt ...@@ -376,13 +377,13 @@ databaseInputCpt = here.component "databaseInput" cpt
}) search }) search
pure $ pure $
H.div { className: "form-group" } H.div { className: "form-group p-1 mb-0" }
[ H.div {className: "text-primary center"} [ H.text "in database" ] [ H.div {className: "text-primary center"} [ H.text "in database" ]
, R2.select { className: "form-control" , R2.select { className: "form-control"
, defaultValue: dbInputValue , defaultValue: dbInputValue
, on: { change } , on: { change }
} (liItem <$> databases) } (liItem <$> databases)
, H.div {className:"center"} [ H.text $ maybe "" doc db ] , H.div {className:"center p-1"} [ H.text $ maybe "" doc db ]
] ]
...@@ -402,7 +403,7 @@ pubmedInputCpt = here.component "pubmedInput" cpt where ...@@ -402,7 +403,7 @@ pubmedInputCpt = here.component "pubmedInput" cpt where
Just (External (PubMed p@{ api_key })) -> Just (External (PubMed p@{ api_key })) ->
-- TODO Fetch current API key -- TODO Fetch current API key
pure $ pure $
H.div { className: "form-group" } H.div { className: "form-group p-1 m-0" }
[ H.div { className: "text-primary center" } [ H.text "Pubmed API key" ] [ H.div { className: "text-primary center" } [ H.text "Pubmed API key" ]
, H.input { className: "form-control" , H.input { className: "form-control"
, defaultValue: fromMaybe "" api_key , defaultValue: fromMaybe "" api_key
...@@ -434,7 +435,7 @@ orgInputCpt = here.component "orgInput" cpt ...@@ -434,7 +435,7 @@ orgInputCpt = here.component "orgInput" cpt
let value = R.unsafeEventValue e let value = R.unsafeEventValue e
T.modify_ (_ { datafield = Just $ External $ HAL $ read value }) search T.modify_ (_ { datafield = Just $ External $ HAL $ read value }) search
pure $ H.div { className: "form-group" } pure $ H.div { className: "form-group p-1 m-0" }
[ H.div {className: "text-primary center"} [H.text "filter with organization: "] [ H.div {className: "text-primary center"} [H.text "filter with organization: "]
, R2.select { className: "form-control" , R2.select { className: "form-control"
, on: { change } , on: { change }
...@@ -496,9 +497,9 @@ datafieldInputCpt = here.component "datafieldInput" cpt where ...@@ -496,9 +497,9 @@ datafieldInputCpt = here.component "datafieldInput" cpt where
then componentIMT { search, session } [] then componentIMT { search, session } []
else H.div {} [] else H.div {} []
, if isHAL search'.datafield -- , if isHAL search'.datafield
then componentYears { search } [] -- then componentYears { search } []
else H.div {} [] -- else H.div {} []
, if isCNRS search'.datafield , if isCNRS search'.datafield
then componentCNRS { search } [] then componentCNRS { search } []
...@@ -535,11 +536,12 @@ searchInputCpt = here.component "searchInput" cpt ...@@ -535,11 +536,12 @@ searchInputCpt = here.component "searchInput" cpt
[ inputWithEnter { onBlur: onBlur valueRef search [ inputWithEnter { onBlur: onBlur valueRef search
, onEnter: onEnter valueRef search , onEnter: onEnter valueRef search
, onValueChanged: onValueChanged valueRef , onValueChanged: onValueChanged valueRef
, autoFocus: false , autoFocus: true
, className: "form-control" , className: "form-control"
, defaultValue: R.readRef valueRef , defaultValue: R.readRef valueRef
, placeholder: "Your query here" , placeholder: "Your query here"
, type: "text" } , type: "text"
, required: true }
] ]
-- pure $ -- pure $
...@@ -580,7 +582,7 @@ submitButtonComponent = here.component "submitButton" cpt ...@@ -580,7 +582,7 @@ submitButtonComponent = here.component "submitButton" cpt
pure $ pure $
H.button { className: "btn btn-primary" H.button { className: "btn btn-primary"
, "type" : "button" , "type" : "submit"
, on : { click: doSearch onSearch errors session selection' search' } , on : { click: doSearch onSearch errors session selection' search' }
, style : { width: "100%" } , style : { width: "100%" }
} }
......
...@@ -83,6 +83,7 @@ textInputBoxCpt = here.component "textInputBox" cpt where ...@@ -83,6 +83,7 @@ textInputBoxCpt = here.component "textInputBox" cpt where
, onValueChanged: R.setRef renameNodeNameRef , onValueChanged: R.setRef renameNodeNameRef
, placeholder: (boxName <> " Node") , placeholder: (boxName <> " Node")
, type: "text" , type: "text"
, required: false
} }
] ]
...@@ -146,6 +147,7 @@ inviteInputBoxCpt = here.component "textInputBox" cpt where ...@@ -146,6 +147,7 @@ inviteInputBoxCpt = here.component "textInputBox" cpt where
, onValueChanged: R.setRef renameNodeNameRef , onValueChanged: R.setRef renameNodeNameRef
, placeholder: (boxName <> " Node") , placeholder: (boxName <> " Node")
, type: "text" , type: "text"
, required: false
} }
] ]
......
...@@ -20,13 +20,14 @@ type Props = ...@@ -20,13 +20,14 @@ type Props =
, defaultValue :: String , defaultValue :: String
, placeholder :: String , placeholder :: String
, type :: String , type :: String
, required :: Boolean
) )
inputWithEnterWithKey :: R2.Leaf ( key :: String | Props ) inputWithEnterWithKey :: R2.Leaf ( key :: String | Props )
inputWithEnterWithKey = R2.leaf inputWithEnterWithKeyCpt inputWithEnterWithKey = R2.leaf inputWithEnterWithKeyCpt
inputWithEnterWithKeyCpt :: R.Component ( key :: String | Props ) inputWithEnterWithKeyCpt :: R.Component ( key :: String | Props )
inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where
cpt { onBlur, onEnter, onValueChanged, autoFocus, className, defaultValue, placeholder, type: t } _ = do cpt { onBlur, onEnter, onValueChanged, autoFocus, className, defaultValue, placeholder, type: t, required } _ = do
pure $ inputWithEnter { onBlur pure $ inputWithEnter { onBlur
, onEnter , onEnter
, onValueChanged , onValueChanged
...@@ -34,7 +35,8 @@ inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where ...@@ -34,7 +35,8 @@ inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where
, className , className
, defaultValue , defaultValue
, placeholder , placeholder
, type: t } , type: t
, required }
inputWithEnter :: R2.Leaf Props inputWithEnter :: R2.Leaf Props
inputWithEnter = R2.leaf inputWithEnterCpt inputWithEnter = R2.leaf inputWithEnterCpt
......
...@@ -32,7 +32,7 @@ selectionCpt :: R.Component Props ...@@ -32,7 +32,7 @@ selectionCpt :: R.Component Props
selectionCpt = here.component "selection" cpt where selectionCpt = here.component "selection" cpt where
cpt { selection, session } _ = do cpt { selection, session } _ = do
selection' <- R2.useLive' selection selection' <- R2.useLive' selection
pure $ H.div { className: "list-selection" } pure $ H.div { className: "list-selection p-1" }
[ [
B.formSelect' B.formSelect'
{ callback: flip T.write_ selection { callback: flip T.write_ selection
......
...@@ -250,7 +250,8 @@ itemEditingCpt = here.component "itemNotEditing" cpt where ...@@ -250,7 +250,8 @@ itemEditingCpt = here.component "itemNotEditing" cpt where
here.log2 "[itemEditingCpt] value Changed: " v here.log2 "[itemEditingCpt] value Changed: " v
T.write_ v valueBox T.write_ v valueBox
, placeholder: defaultVal , placeholder: defaultVal
, type: "text" } , type: "text"
, required: false }
, H.div { className: "btn input-group-append", on: { click } } , H.div { className: "btn input-group-append", on: { click } }
[ H.div { className: "input-group-text fa fa-floppy-o" } [] ] [ H.div { className: "input-group-text fa fa-floppy-o" } [] ]
] ]
......
...@@ -207,6 +207,7 @@ editingCpt = here.component "editing" cpt where ...@@ -207,6 +207,7 @@ editingCpt = here.component "editing" cpt where
, onValueChanged: \s -> T.write_ s state , onValueChanged: \s -> T.write_ s state
, placeholder: "" , placeholder: ""
, type: "text" , type: "text"
, required: false
} }
, ,
-- @TODO make a "reset" CTA -- @TODO make a "reset" CTA
......
.nav.nav-tabs { .nav.nav-tabs {
.nav-link {
cursor: pointer;
}
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link, li a { .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link, li a {
color: $gray-700 color: $gray-700
} }
......
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