Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
b411135a
Commit
b411135a
authored
May 19, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move searchbar into left column with tree view
parent
7c739a28
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
10 deletions
+29
-10
index.html
dist/index.html
+1
-1
Login.css
dist/styles/Login.css
+3
-0
context-menu.css
dist/styles/context-menu.css
+12
-0
SearchField.purs
src/Gargantext/Components/Search/SearchField.purs
+8
-6
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+4
-2
SearchBar.purs
src/Gargantext/Pages/Layout/Specs/SearchBar.purs
+1
-1
No files found.
dist/index.html
View file @
b411135a
...
...
@@ -22,7 +22,7 @@
#toolbar
{
display
:
inline
;}
#toolbar
ul
li
{
display
:
inline
}
#toolbar
ul
li
form
{
display
:
inline
}
.tree
{
margin-top
:
125
px
;}
.tree
{
margin-top
:
20
px
;}
.tree
ul
li
::before
{
content
:
" "
;
position
:
absolute
;
...
...
dist/styles/Login.css
View file @
b411135a
...
...
@@ -178,6 +178,9 @@ text-align: center;
height
:
auto
;
}
.tree
{
margin-top
:
10px
;
}
#graph-tree
.tree
{
margin-top
:
27px
;
}
dist/styles/context-menu.css
View file @
b411135a
...
...
@@ -27,3 +27,15 @@
font-size
:
16px
;
height
:
100%
;
}
.search-bar-container
{
text-align
:
center
;
}
.search-bar-toggle
{
padding
:
3px
;
border
:
0
;
}
.search-field
{
display
:
grid
;
grid-template-columns
:
auto
auto
auto
;
}
src/Gargantext/Components/Search/SearchField.purs
View file @
b411135a
...
...
@@ -58,22 +58,24 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
databaseInput :: R.State (Maybe Database) -> Array Database -> R.Element
databaseInput (db /\ setDB) dbs =
select { className: "database", onChange } (item <$> dbs)
div {} [ select { className: "database", onChange } (item <$> dbs) ]
where
onChange = mkEffectFn1 $ \e -> setDB (readDatabase (e .. "target" .. "value"))
item db = option { value: (show db) } [ text (show db) ]
searchInput :: R.State String -> R.Element
searchInput (term /\ setTerm) =
input { defaultValue: term
, type: "text"
, onChange
, placeholder }
div {} [ input { defaultValue: term
, type: "text"
, style: { maxWidth: "110px" }
, onChange
, placeholder } ]
where onChange = mkEffectFn1 $ \e -> setTerm $ e .. "target" .. "value"
submitButton :: R.State (Maybe Database) -> R.State String -> R.State (Maybe Search) -> R.Element
submitButton (database /\ _) (term /\ _) (_ /\ setSearch) = button { onClick: click } [ text "Search" ]
submitButton (database /\ _) (term /\ _) (_ /\ setSearch) =
div {} [ button { onClick: click } [ text "Search" ] ]
where
click = mkEffectFn1 $ \_ -> do
case term of
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
b411135a
...
...
@@ -95,7 +95,10 @@ layout0 layout =
, rs bs
]
ls = over _render \render d p s c -> [
div [ className "col-md-2"] (render d p s c)
div [ className "col-md-2", style {paddingTop: "60px"} ]
$ [ R'.scuff (SB.searchBar SB.defaultProps) ]
<> (render d p s c)
]
rs = over _render \render d p s c -> [
div [ case (s.loginState.authData) of
...
...
@@ -179,7 +182,6 @@ searchBar = simpleSpec defaultPerformAction render
, div [ className "collapse navbar-collapse"
]
$ [ divDropdownLeft ]
<> [ R'.scuff (SB.searchBar SB.defaultProps) ]
<> [ divDropdownRight d s ]
]
]
...
...
src/Gargantext/Pages/Layout/Specs/SearchBar.purs
View file @
b411135a
...
...
@@ -62,7 +62,7 @@ onSearchChange (search /\ setSearch) =
toggleButton :: R.State Boolean -> R.Element
toggleButton open =
H.button { onClick: onToggleExpanded open, className: "search-bar-toggle" }
[ H.i { className: "material-icons md-
36
"
[ H.i { className: "material-icons md-
24
"
, style: { marginTop: "-5px", color: "#000" } }
[ H.text "control_point" ] ]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment