Commit 2bf57e5c authored by arturo's avatar arturo

>>> continue

parent 3e9cba91
......@@ -2,7 +2,7 @@ module Gargantext.Components.Bootstrap.BaseModal (baseModal) where
import Gargantext.Prelude
import DOM.Simple (Window)
import DOM.Simple (Window, window)
import Data.Foldable (intercalate)
import Effect (Effect)
import Effect.Uncurried (EffectFn2, runEffectFn2)
......@@ -56,8 +56,8 @@ component = R.hooksComponent componentName cpt where
isVisible <- R2.useLive' isVisibleBox
-- Hooks
-- R.useEffect1' isVisible $
-- (isVisible ? addClassName $ removeClassName) window "modal-open"
R.useEffect1' isVisible $
(isVisible ? addClassName $ removeClassName) window "modal-open"
-- Computed
let
......@@ -81,6 +81,7 @@ component = R.hooksComponent componentName cpt where
, className
, role: "dialog"
, data: { show: true }
, key: id
}
[
R2.if' (hasBackground) $
......
......@@ -77,7 +77,6 @@ type TableHeaderWithRenameBoxedLayoutProps = (
, nodeId :: NodeID
, name :: String
, date :: String
, key :: String
, corpusInfoS :: T.Box CorpusInfo
)
......@@ -91,11 +90,11 @@ tableHeaderWithRenameLayout = R.createElement tableHeaderWithRenameLayoutCpt
tableHeaderWithRenameLayoutCpt :: R.Component TableHeaderWithRenameLayoutProps
tableHeaderWithRenameLayoutCpt = here.component "tableHeaderWithRenameLayoutCpt" cpt
where
cpt { hyperdata: Hyperdata h, nodeId, session, cacheState, name, date, key } _ = do
cpt { hyperdata: Hyperdata h, nodeId, session, cacheState, name, date } _ = do
let corpusInfo = getCorpusInfo h.fields
corpusInfoS <- T.useBox corpusInfo
pure $ tableHeaderWithRenameBoxedLayout {hyperdata: Hyperdata h, nodeId, session, cacheState, name, date, corpusInfoS, key} []
pure $ tableHeaderWithRenameBoxedLayout {hyperdata: Hyperdata h, nodeId, session, cacheState, name, date, corpusInfoS} []
tableHeaderWithRenameBoxedLayout :: R2.Component TableHeaderWithRenameBoxedLayoutProps
tableHeaderWithRenameBoxedLayout = R.createElement tableHeaderWithRenameBoxedLayoutCpt
......@@ -117,30 +116,30 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
]
, R2.row
[ H.div {className: "col-md-8 content"}
[ H.p {}
[ H.div {}
[
renameable {icon: "fa fa-info", text: title, onRename: onRenameTitle} []
]
, H.p {}
, H.div {}
[
renameable {icon: "fa fa-globe", text: desc, onRename: onRenameDesc} []
]
, H.p {}
, H.div {}
[
renameable {icon: "fa fa-search-plus", text: query, onRename: onRenameQuery} []
]
, H.p { className: "cache-toggle"
, H.div { className: "cache-toggle"
, on: { click: cacheClick cacheState } }
[ H.span { className: "fa " <> (cacheToggle cacheState') } []
, H.text $ cacheText cacheState'
]
]
, H.div {className: "col-md-4 content"}
[ H.p {}
[ H.div {}
[
renameable {icon: "fa fa-user", text: authors, onRename: onRenameAuthors} []
]
, H.p {}
, H.div {}
[ H.span {className: "fa fa-calendar"} []
, H.text $ " " <> date
]
......
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