Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
461fc850
Commit
461fc850
authored
Jun 14, 2019
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indicate more clearly where error occurred
parent
9835827a
Pipeline
#25321
passed with stage
in 5 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Examples/DynamicEditor/DynEditorExample.icl
Examples/DynamicEditor/DynEditorExample.icl
+1
-1
Libraries/iTasks/Extensions/Editors/DynamicEditor.css
Libraries/iTasks/Extensions/Editors/DynamicEditor.css
+3
-0
Libraries/iTasks/Extensions/Editors/DynamicEditor.icl
Libraries/iTasks/Extensions/Editors/DynamicEditor.icl
+8
-5
No files found.
Examples/DynamicEditor/DynEditorExample.icl
View file @
461fc850
...
@@ -264,7 +264,7 @@ taskEditor = DynamicEditor
...
@@ -264,7 +264,7 @@ taskEditor = DynamicEditor
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
,
functionConsDyn
"Not"
"not"
,
functionConsDyn
"Not"
"not"
(
dynamic
Typed
Not
::
Typed
Func
(
Bool
->
Bool
))
(
dynamic
Typed
Not
::
Typed
Func
(
Bool
->
Bool
))
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
]
]
,
DynamicConsGroup
"Comparison"
,
DynamicConsGroup
"Comparison"
[
functionConsDyn
"Gt"
"greater than"
[
functionConsDyn
"Gt"
"greater than"
...
...
Libraries/iTasks/Extensions/Editors/DynamicEditor.css
View file @
461fc850
...
@@ -2,3 +2,6 @@
...
@@ -2,3 +2,6 @@
align-self
:
center
;
align-self
:
center
;
padding
:
0.2em
;
padding
:
0.2em
;
}
}
.itasks-dynamic-editor-error
{
background-color
:
#FFDDDD
;
}
Libraries/iTasks/Extensions/Editors/DynamicEditor.icl
View file @
461fc850
...
@@ -329,13 +329,16 @@ where
...
@@ -329,13 +329,16 @@ where
=
editor
.
Editor
.
onEdit
(
dp
++
[
0
])
(
tp
,
e
)
(
childSts
!!
1
)
vst
=
editor
.
Editor
.
onEdit
(
dp
++
[
0
])
(
tp
,
e
)
(
childSts
!!
1
)
vst
=
case
res
of
=
case
res
of
Ok
(
change
,
childSt
)
Ok
(
change
,
childSt
)
#
change
=
ChangeUI
[]
$
[(
0
,
ChangeChild
$
ChangeUI
[]
[(
argIdx
+
if
hideCons
0
1
,
ChangeChild
change
)])]
++
mbErrorIconChange
#
change
=
ChangeUI
mbErrorIconAttrChange
$
[(
0
,
ChangeChild
$
ChangeUI
[]
[(
argIdx
+
if
hideCons
0
1
,
ChangeChild
change
)])]
++
mbErrorIconChange
// replace state for this child
// replace state for this child
=
(
Ok
(
change
,
Just
(
cid
,
type
,
isOk
typeIsCorrect
),
childSts`
),
vst
)
=
(
Ok
(
change
,
Just
(
cid
,
type
,
isOk
typeIsCorrect
),
childSts`
),
vst
)
where
where
mbErrorIconChange
(
mbErrorIconChange
,
mbErrorIconAttrChange
)
=
mbErrorIconUpd
mbErrorIconUpd
|
typeWasCorrect
&&
isError
typeIsCorrect
=
|
typeWasCorrect
&&
isError
typeIsCorrect
=
[(
1
,
InsertChild
errorIcon
)]
(
[(
1
,
InsertChild
errorIcon
)]
,
[
SetAttribute
"class"
$
JSONArray
[
JSONString
"itasks-container"
,
JSONString
"itasks-horizontal"
,
JSONString
"itasks-dynamic-editor-error"
]]
)
with
with
errorIcon
=
errorIcon
=
UI
UI
...
@@ -347,8 +350,8 @@ where
...
@@ -347,8 +350,8 @@ where
[]
[]
]
]
|
not
typeWasCorrect
&&
isOk
typeIsCorrect
=
|
not
typeWasCorrect
&&
isOk
typeIsCorrect
=
[(
1
,
RemoveChild
)]
([(
1
,
RemoveChild
)],
[
SetAttribute
"class"
$
JSONArray
[
JSONString
"itasks-container"
,
JSONString
"itasks-horizontal"
]])
|
otherwise
=
[]
|
otherwise
=
([],
[])
typeIsCorrect
=
childTypesAreMatching
cons
.
builder
(
drop
1
childSts`
)
typeIsCorrect
=
childTypesAreMatching
cons
.
builder
(
drop
1
childSts`
)
childSts`
=
updateAt
(
argIdx
+
1
)
childSt
childSts
childSts`
=
updateAt
(
argIdx
+
1
)
childSt
childSts
Error
e
=
(
Error
e
,
vst
)
Error
e
=
(
Error
e
,
vst
)
...
...
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