Commit 9a81a46c authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] syncResetButton at the right place

parent 97a4b906
...@@ -131,6 +131,7 @@ type TableContainerProps = ...@@ -131,6 +131,7 @@ type TableContainerProps =
, ngramsTable :: NgramsTable , ngramsTable :: NgramsTable
, path :: R.State PageParams , path :: R.State PageParams
, tabNgramType :: CTabNgramType , tabNgramType :: CTabNgramType
, syncResetButton :: Array R.Element
) )
tableContainer :: Record TableContainerProps -> Record T.TableContainerProps -> R.Element tableContainer :: Record TableContainerProps -> Record T.TableContainerProps -> R.Element
...@@ -144,18 +145,19 @@ tableContainerCpt { dispatch ...@@ -144,18 +145,19 @@ tableContainerCpt { dispatch
, ngramsTable: ngramsTableCache , ngramsTable: ngramsTableCache
, path: {searchQuery, termListFilter, termSizeFilter} /\ setPath , path: {searchQuery, termListFilter, termSizeFilter} /\ setPath
, tabNgramType , tabNgramType
, syncResetButton
} = R.hooksComponentWithModule thisModule "tableContainer" cpt } = R.hooksComponentWithModule thisModule "tableContainer" cpt
where where
cpt props _ = do cpt props _ = do
pure $ H.div {className: "container-fluid"} [ pure $ H.div {className: "container-fluid"}
H.div {className: "jumbotron1"} [ H.div {className: "jumbotron1"}
[ R2.row [ R2.row
[ H.div {className: "panel panel-default"} [ H.div {className: "panel panel-default"}
[ H.div {className: "panel-heading"} [ [ H.div {className: "panel-heading"}
R2.row
[ H.div {className: "col-md-2", style: {marginTop: "6px"}}
[ [
if A.null props.tableBody && searchQuery /= "" then R2.row [ H.div {className: "col-md-2", style: {marginTop: "6px"}}
[ H.div {} syncResetButton
, if A.null props.tableBody && searchQuery /= "" then
H.li { className: "list-group-item" } [ H.li { className: "list-group-item" } [
H.button { className: "btn btn-primary" H.button { className: "btn btn-primary"
, on: { click: const $ dispatch , on: { click: const $ dispatch
...@@ -184,11 +186,11 @@ tableContainerCpt { dispatch ...@@ -184,11 +186,11 @@ tableContainerCpt { dispatch
, on: {change: setTermSizeFilter <<< read <<< R.unsafeEventValue}} , on: {change: setTermSizeFilter <<< read <<< R.unsafeEventValue}}
(map optps1 termSizes)] (map optps1 termSizes)]
] ]
, H.div { className: "col-md-2", style: { marginTop: "6px" } } [ , H.div { className: "col-md-2", style: { marginTop: "6px" } }
H.li {className: "list-group-item"} [ [ H.li {className: "list-group-item"}
H.div { className: "form-inline" } [ [ H.div { className: "form-inline" }
H.div { className: "form-group" } [ [ H.div { className: "form-group" }
props.pageSizeControl [ props.pageSizeControl
, H.label {} [ H.text " items" ] , H.label {} [ H.text " items" ]
-- H.div { className: "col-md-6" } [ props.pageSizeControl ] -- H.div { className: "col-md-6" } [ props.pageSizeControl ]
-- , H.div { className: "col-md-6" } [ -- , H.div { className: "col-md-6" } [
...@@ -197,34 +199,30 @@ tableContainerCpt { dispatch ...@@ -197,34 +199,30 @@ tableContainerCpt { dispatch
] ]
] ]
] ]
, H.div {className: "col-md-4", style: {marginTop : "6px", marginBottom : "1px"}} [ , H.div {className: "col-md-4", style: {marginTop : "6px", marginBottom : "1px"}}
H.li {className: "list-group-item"} [ [ H.li {className: "list-group-item"}
props.pageSizeDescription [ props.pageSizeDescription
, props.paginationLinks , props.paginationLinks
] ]
] ]
] ]
] ]
, editor , editor
, if (selectionsExist ngramsSelection) then , if (selectionsExist ngramsSelection)
H.li {className: "list-group-item"} [ then H.li {className: "list-group-item"}
selectButtons true [selectButtons true]
] else else H.div {} []
H.div {} []
, H.div {id: "terms_table", className: "panel-body"} , H.div {id: "terms_table", className: "panel-body"}
[ H.table {className: "table able"} [ H.table {className: "table able"}
[ H.thead {className: "tableHeader"} [props.tableHead] [ H.thead {className: "tableHeader"} [props.tableHead]
, H.tbody {} props.tableBody , H.tbody {} props.tableBody
] ]
, H.li {className: "list-group-item"}
, H.li {className: "list-group-item"} [ [ H.div { className: "row" }
H.div { className: "row" } [ [ H.div { className: "col-md-4" }
H.div { className: "col-md-4" } [ [selectButtons (selectionsExist ngramsSelection)]
selectButtons (selectionsExist ngramsSelection) , H.div {className: "col-md-4 col-md-offset-4"}
] [props.paginationLinks]
, H.div { className: "col-md-4 col-md-offset-4" } [
props.paginationLinks
]
] ]
] ]
] ]
...@@ -327,7 +325,7 @@ loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable" ...@@ -327,7 +325,7 @@ loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable"
, H.text "Extracted Terms" , H.text "Extracted Terms"
] ]
, search ] , search ]
<> syncResetButton <> <>
[ T.table { syncResetButton [ T.table { syncResetButton
, colNames , colNames
, container: tableContainer { dispatch: performAction , container: tableContainer { dispatch: performAction
...@@ -337,6 +335,7 @@ loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable" ...@@ -337,6 +335,7 @@ loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable"
, ngramsTable , ngramsTable
, path , path
, tabNgramType , tabNgramType
, syncResetButton
} }
, params: params /\ setParams -- TODO-LENS , params: params /\ setParams -- TODO-LENS
, rows: filteredConvertedRows , rows: filteredConvertedRows
......
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