Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
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
gargantext
gargantext-ihaskell
Commits
05e33cbf
Commit
05e33cbf
authored
Jul 03, 2015
by
Sumit Sahrawat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing Int properties to PosInt
parent
4e6f20e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
Common.hs
...y/ihaskell-widgets/src/IHaskell/Display/Widgets/Common.hs
+7
-0
Types.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
+18
-18
No files found.
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Common.hs
View file @
05e33cbf
...
...
@@ -163,3 +163,10 @@ instance Show ImageFormatValue where
instance
ToJSON
ImageFormatValue
where
toJSON
=
toJSON
.
pack
.
show
newtype
PosInt
=
PosInt
{
unwrap
::
Int
}
instance
ToJSON
PosInt
where
toJSON
(
PosInt
x
)
|
x
>
0
=
String
.
pack
$
show
x
|
otherwise
=
""
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
View file @
05e33cbf
...
...
@@ -51,25 +51,25 @@ type family FieldType (f :: Field) :: * where
FieldType
ModelName
=
Text
FieldType
ViewModule
=
Text
FieldType
ViewName
=
Text
FieldType
MsgThrottle
=
Int
FieldType
Version
=
Int
FieldType
MsgThrottle
=
Pos
Int
FieldType
Version
=
Pos
Int
FieldType
OnDisplayed
=
IO
()
FieldType
Visible
=
Bool
FieldType
CSS
=
[(
Text
,
Text
,
Text
)]
FieldType
DOMClasses
=
[
Text
]
FieldType
Width
=
Int
FieldType
Height
=
Int
FieldType
Padding
=
Int
FieldType
Margin
=
Int
FieldType
Width
=
Pos
Int
FieldType
Height
=
Pos
Int
FieldType
Padding
=
Pos
Int
FieldType
Margin
=
Pos
Int
FieldType
Color
=
Text
FieldType
BackgroundColor
=
Text
FieldType
BorderColor
=
Text
FieldType
BorderWidth
=
Int
FieldType
BorderRadius
=
Int
FieldType
BorderWidth
=
Pos
Int
FieldType
BorderRadius
=
Pos
Int
FieldType
BorderStyle
=
BorderStyleValue
FieldType
FontStyle
=
FontStyleValue
FieldType
FontWeight
=
FontWeightValue
FieldType
FontSize
=
Int
FieldType
FontSize
=
Pos
Int
FieldType
FontFamily
=
Text
FieldType
Description
=
Text
FieldType
ClickHandler
=
IO
()
...
...
@@ -150,8 +150,8 @@ defaultWidget viewName = (SModelModule =:: "")
:&
(
SModelName
=::
"WidgetModel"
)
:&
(
SViewModule
=::
""
)
:&
(
SViewName
=::
viewName
)
:&
(
SMsgThrottle
=::
3
)
:&
(
SVersion
=::
0
)
:&
(
SMsgThrottle
=::
PosInt
3
)
:&
(
SVersion
=::
PosInt
0
)
:&
(
SOnDisplayed
=::
return
()
)
:&
RNil
...
...
@@ -160,19 +160,19 @@ defaultDOMWidget viewName = defaultWidget viewName <+> domAttrs
where
domAttrs
=
(
SVisible
=::
True
)
:&
(
SCSS
=::
[]
)
:&
(
SDOMClasses
=::
[]
)
:&
(
SWidth
=::
0
)
:&
(
SHeight
=::
0
)
:&
(
SPadding
=::
0
)
:&
(
SMargin
=::
0
)
:&
(
SWidth
=::
PosInt
0
)
:&
(
SHeight
=::
PosInt
0
)
:&
(
SPadding
=::
PosInt
0
)
:&
(
SMargin
=::
PosInt
0
)
:&
(
SColor
=::
""
)
:&
(
SBackgroundColor
=::
""
)
:&
(
SBorderColor
=::
""
)
:&
(
SBorderWidth
=::
0
)
:&
(
SBorderRadius
=::
0
)
:&
(
SBorderWidth
=::
PosInt
0
)
:&
(
SBorderRadius
=::
PosInt
0
)
:&
(
SBorderStyle
=::
DefaultBorder
)
:&
(
SFontStyle
=::
DefaultFont
)
:&
(
SFontWeight
=::
DefaultWeight
)
:&
(
SFontSize
=::
0
)
:&
(
SFontSize
=::
PosInt
0
)
:&
(
SFontFamily
=::
""
)
:&
RNil
...
...
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