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
a12881eb
Commit
a12881eb
authored
Mar 02, 2018
by
Abinaya Sudhir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addcorpus page Added
parent
7c0b02f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
1 deletion
+68
-1
AddCorpusview.purs
src/AddCorpusview.purs
+66
-0
Landing.purs
src/Landing.purs
+2
-1
No files found.
src/AddCorpusview.purs
0 → 100644
View file @
a12881eb
module AddCorpusview where
import Control.Monad.Aff (Aff, attempt)
import Control.Monad.Aff.Class (liftAff)
import Control.Monad.Aff.Console (log)
import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Class (liftEff)
import Control.Monad.Eff.Console (CONSOLE)
import DOM (DOM)
import DOM.HTML (window)
import DOM.HTML.Window (localStorage)
import DOM.WebStorage.Storage (getItem, setItem)
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, jsonEmptyObject, (.?), (:=), (~>))
import Data.Either (Either(..))
import Data.HTTP.Method (Method(..))
import Data.Maybe (Maybe(..))
import Data.MediaType.Common (applicationJSON)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import Prelude hiding (div)
import React.DOM (a, button, div, form, h2, h4, i, input, label, p, span, text)
import React.DOM.Props (_id, _type, className, href, maxLength, name, onClick, onInput, placeholder, target, value)
import Routing.Hash.Aff (setHash)
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce)
newtype State = State
{ select_database :: Boolean
, unselect_database :: Boolean -- dummy state
}
initialState :: State
initialState = State
{
select_database : true
, unselect_database : true
}
data Action
= NoOp
| SelectDatabase Boolean
| UnselectDatabase Boolean
performAction :: forall eff props. PerformAction (console :: CONSOLE, ajax :: AJAX,dom::DOM | eff) State props Action
performAction NoOp _ _ = void do
modifyState id
performAction (SelectDatabase selected) _ _ = void do
modifyState \(State state) -> State $ state { select_database = selected }
performAction (UnselectDatabase unselected) _ _ = void do
modifyState \(State state) -> State $ state { unselect_database = unselected }
addcorpusviewSpec :: forall props eff . Spec (console::CONSOLE, ajax::AJAX, dom::DOM | eff) State props Action
addcorpusviewSpec = simpleSpec performAction render
where
render :: Render State props Action
render dispatch _ state _ =
[ ]
src/Landing.purs
View file @
a12881eb
...
...
@@ -69,7 +69,8 @@ loginSpec = simpleSpec performAction render
ul [className "nav navbar-nav pull-left"] [
li [className "dropdown"]
[
a [ className "dropdown-toggle navbar-text", _data {toggle: "dropdown"}, href "#", role "button", title "Informations about Gargantext" ]
a [
className "dropdown-toggle navbar-text", _data {toggle: "dropdown"}, href "#", role "button", title "Informations about Gargantext" ]
[ span [ aria {hidden : true}, className "glyphicon glyphicon-info-sign" ]
[]
, text "Info"
...
...
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