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
e8435beb
Commit
e8435beb
authored
Oct 11, 2017
by
Mart Lubbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
#163
, allow disabled on all the input forms
parent
b79c27bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
17 deletions
+38
-17
Libraries/iTasks/UI/Editor/Controls.icl
Libraries/iTasks/UI/Editor/Controls.icl
+6
-1
Libraries/iTasks/UI/WebPublic/js/itasks-components-form.js
Libraries/iTasks/UI/WebPublic/js/itasks-components-form.js
+32
-16
No files found.
Libraries/iTasks/UI/Editor/Controls.icl
View file @
e8435beb
...
...
@@ -5,6 +5,11 @@ import StdFunc, StdBool, GenEq
import
Data
.
Error
,
Text
.
JSON
,
Text
.
HTML
import
qualified
Data
.
Map
as
DM
import
iTasks
.
UI
.
Definition
import
iTasks
.
UI
.
Editor
.
Modifiers
disableOnView
e
=
selectByMode
(
withAttributes
(
enabledAttr
False
)
e
)
e
e
textField
::
Editor
String
textField
=
fieldComponent
toJSON
UITextField
...
...
@@ -85,7 +90,7 @@ where
|
otherwise
=
or
(
map
(
checkNode
idx
)
children
)
//Field like components for which simply knowing the UI type is sufficient
fieldComponent
toValue
type
=
{
Editor
|
genUI
=
genUI
,
onEdit
=
onEdit
,
onRefresh
=
onRefresh
}
fieldComponent
toValue
type
=
disableOnView
{
Editor
|
genUI
=
genUI
,
onEdit
=
onEdit
,
onRefresh
=
onRefresh
}
where
genUI
dp
val
vst
=:{
VSt
|
taskId
,
mode
,
optional
}
#
val
=
if
(
mode
=:
Enter
)
JSONNull
(
toValue
val
)
...
...
Libraries/iTasks/UI/WebPublic/js/itasks-components-form.js
View file @
e8435beb
...
...
@@ -5,10 +5,14 @@ itasks.TextField = {
el
=
this
.
domEl
;
el
.
type
=
'
text
'
;
el
.
value
=
me
.
attributes
.
value
?
me
.
attributes
.
value
:
''
;
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
if
(
'
enabled
'
in
me
.
attributes
&&
me
.
attributes
[
'
enabled
'
]
===
false
)
{
el
.
disabled
=
true
;
}
else
{
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
}
},
onAttributeChange
:
function
(
name
,
value
)
{
var
me
=
this
;
...
...
@@ -25,16 +29,20 @@ itasks.TextArea = {
height
:
'
flex
'
,
width
:
'
flex
'
,
minHeight
:
150
,
minWidth
:
400
minWidth
:
400
,
},
initDOMEl
:
function
()
{
var
me
=
this
,
el
=
this
.
domEl
;
el
.
innerHTML
=
me
.
attributes
.
value
?
me
.
attributes
.
value
:
''
;
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
if
(
'
enabled
'
in
me
.
attributes
&&
me
.
attributes
[
'
enabled
'
]
===
false
)
{
el
.
disabled
=
true
;
}
else
{
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
}
},
onAttributeChange
:
function
(
name
,
value
)
{
var
me
=
this
;
...
...
@@ -52,10 +60,14 @@ itasks.PasswordField = {
el
=
this
.
domEl
;
el
.
type
=
'
password
'
;
el
.
value
=
me
.
attributes
.
value
?
me
.
attributes
.
value
:
''
;
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
if
(
'
enabled
'
in
me
.
attributes
&&
me
.
attributes
[
'
enabled
'
]
===
false
)
{
el
.
disabled
=
true
;
}
else
{
el
.
addEventListener
(
'
keyup
'
,
function
(
e
)
{
var
value
=
e
.
target
.
value
===
""
?
null
:
e
.
target
.
value
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
value
);
});
}
}
,
onAttributeChange
:
function
(
name
,
value
)
{
var
me
=
this
;
...
...
@@ -271,9 +283,13 @@ itasks.Slider = {
el
.
max
=
me
.
attributes
.
max
;
el
.
value
=
me
.
attributes
.
value
;
el
.
addEventListener
(
'
change
'
,
function
(
e
)
{
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
(
e
.
target
.
value
|
0
),
true
);
});
if
(
'
enabled
'
in
me
.
attributes
&&
me
.
attributes
[
'
enabled
'
]
===
false
)
{
el
.
disabled
=
true
;
}
else
{
el
.
addEventListener
(
'
change
'
,
function
(
e
)
{
me
.
doEditEvent
(
me
.
attributes
.
taskId
,
me
.
attributes
.
editorId
,
(
e
.
target
.
value
|
0
),
true
);
});
}
},
onAttributeChange
:
function
(
name
,
value
)
{
var
me
=
this
;
...
...
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