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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
d5879c32
Commit
d5879c32
authored
Mar 20, 2018
by
Abinaya Sudhir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotation Document view done
parent
3b021b7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
86 deletions
+86
-86
Login.css
dist/css/Login.css
+2
-2
AnnotationDocumentView.purs
src/AnnotationDocumentView.purs
+84
-84
No files found.
dist/css/Login.css
View file @
d5879c32
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
}
}
#page-wrapper
{
#page-wrapper
{
margin-top
:
5
6px
;
margin-top
:
9
6px
;
}
}
#user-page-header
{
#user-page-header
{
...
...
src/AnnotationDocumentView.purs
View file @
d5879c32
...
@@ -2,22 +2,29 @@ module AnnotationDocumentView where
...
@@ -2,22 +2,29 @@ module AnnotationDocumentView where
import Prelude hiding (div)
import Prelude hiding (div)
import React (ReactElement)
import React (ReactElement)
import React.DOM (a, button, div, h4, input, li, nav, option, p, select, span, text, ul)
import React.DOM (a, button, div, h4,
h6,
input, li, nav, option, p, select, span, text, ul)
import React.DOM.Props (_data, _id, _type, aria, className, href,
onChange, role, selected
, value)
import React.DOM.Props (_data, _id, _type, aria, className, href,
name, onChange, onInput, placeholder, role, selected, style
, value)
import Thermite (PerformAction, Render, Spec, cotransform, modifyState, simpleSpec)
import Thermite (PerformAction, Render, Spec, cotransform, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce)
import Unsafe.Coerce (unsafeCoerce)
type State = String
type State =
{
inputValue :: String
}
initialState :: State
initialState :: State
initialState = ""
initialState =
{
inputValue : ""
}
data Action
data Action
= NoOp
= NoOp
| ChangeString String
| ChangeString String
| ChangeAnotherString String
| ChangeAnotherString String
| SetInput String
performAction :: PerformAction _ State _ Action
performAction :: PerformAction _ State _ Action
...
@@ -27,6 +34,8 @@ performAction (ChangeString ps) _ _ = pure unit
...
@@ -27,6 +34,8 @@ performAction (ChangeString ps) _ _ = pure unit
performAction (ChangeAnotherString ps) _ _ = pure unit
performAction (ChangeAnotherString ps) _ _ = pure unit
performAction (SetInput ps) _ _ = pure unit
docview :: Spec _ State _ Action
docview :: Spec _ State _ Action
...
@@ -34,16 +43,21 @@ docview = simpleSpec performAction render
...
@@ -34,16 +43,21 @@ docview = simpleSpec performAction render
where
where
render :: Render State _ Action
render :: Render State _ Action
render dispatch _ state _ =
render dispatch _ state _ =
[ div [className "container"]
[ div [className "row"]
[ div [className "col-md-4"]
[ div [className "row"]
[ div [className "col-md-12 form-control"] [select [onChange (\e -> dispatch (ChangeString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS ]
, div [className "col-md-12 form-control"] [ select [onChange (\e -> dispatch (ChangeAnotherString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS1 ]
]
, div [className "row"]
[
[
nav []
div [className "container"]
[
div [className "row"]
[
div [className "col-md-4", style {border : "1px solid black", padding : "34px"}]
[
div [className "row"]
[
div [className "col-md-12 input-group mb-3"] [select [className "form-control custom-select",onChange (\e -> dispatch (ChangeString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS ]
, div [className "col-md-12 form-control input-group mb-3"] [ select [className "form-control custom-select",onChange (\e -> dispatch (ChangeAnotherString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS1 ]
]
, div [className "row", style { marginTop : "35px"}]
[
nav [ ]
[ div [className "nav nav-tabs", _id "nav-tab",role "tablist"]
[ div [className "nav nav-tabs", _id "nav-tab",role "tablist"]
[ a [className "nav-item nav-link active",_id "nav-home-tab" , _data {toggle : "tab"},href "#nav-home" ,role "tab",aria {controls : "nav-home"} ,aria {selected:true}] [ text "Publications (12)"]
[ a [className "nav-item nav-link active",_id "nav-home-tab" , _data {toggle : "tab"},href "#nav-home" ,role "tab",aria {controls : "nav-home"} ,aria {selected:true}] [ text "Publications (12)"]
, a [className "nav-item nav-link" ,_id "nav-profile-tab", _data {toggle : "tab"},href "#nav-profile",role "tab",aria {controls : "nav-profile"},aria {selected:true}] [ text "Brevets (2)"]
, a [className "nav-item nav-link" ,_id "nav-profile-tab", _data {toggle : "tab"},href "#nav-profile",role "tab",aria {controls : "nav-profile"},aria {selected:true}] [ text "Brevets (2)"]
...
@@ -59,7 +73,11 @@ docview = simpleSpec performAction render
...
@@ -59,7 +73,11 @@ docview = simpleSpec performAction render
, _id "nav-home"
, _id "nav-home"
]
]
[
[
input [] []
h6 [] [text "Add a free term to STOPLIST"]
, div [className "form-group"]
[ input [className "form-control", _id "id_password", name "password", placeholder "Any text", _type "value",value state.inputValue,onInput \e -> dispatch (SetInput (unsafeEventValue e))] []
, div [className "clearfix"] []
]
, button [className "btn btn-primary", _type "button"] [text "Create and Add"]
, button [className "btn btn-primary", _type "button"] [text "Create and Add"]
]
]
...
@@ -115,23 +133,5 @@ aryPS1 = ["Nothing Selected","STOPLIST", "MAINLIST", "MAPLIST"]
...
@@ -115,23 +133,5 @@ aryPS1 = ["Nothing Selected","STOPLIST", "MAINLIST", "MAPLIST"]
optps :: String -> ReactElement
optps :: String -> ReactElement
optps val = option [ value val ] [text val]
optps val = option [ value val ] [text val]
unsafeEventValue :: forall event. event -> String
unsafeEventValue e = (unsafeCoerce e).target.value
-- ul [className "nav nav-pills mb-3", _id "pills-tab",role "tablist"]
-- [ li [className "nav-item"]
-- [ a [className "nav-link active", _id "pills-stop", _data {toggle : "pill"}, href "#pills-stop", role "tab", aria {controls :"pills-stop"}, aria {selected : true}] []
-- ]
-- , li [className "nav-item"]
-- [ a [className "nav-link", _id "pills-main", _data {toggle : "pill"}, href "#pills-main", role "tab", aria {controls :"pills-main"}, aria {selected : false}] []
-- ]
-- , li [className "nav-item"]
-- [ a [className "nav-link", _id "pills-map", _data {toggle : "pill"}, href "#pills-map", role "tab", aria {controls :"pills-map"}, aria {selected : false}] []
-- ]
-- ]
-- , div [className "tab-content", _id "pills-tabContent"]
-- [ div [className "tab-pane fade show active", _id "pills-stop", role "tabpanel" ,aria {labelledby : "pills-stop-tab"}] []
-- , div [ className "tab-pane fade", _id "pills-main", role "tabpanel" ,aria {labelledby : "pills-main-tab"}] []
-- , div [ className "tab-pane fade", _id "pills-map", role "tabpanel" ,aria {labelledby : "pills-map-tab"}] []
-- ]
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