Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
82065d47
Commit
82065d47
authored
Nov 27, 2006
by
Rinus Plasmeijer
Browse files
coded name of form to enable any character in a name
parent
736d2a6f
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
libraries/htmlGEC/EncodeDecode.dcl
View file @
82065d47
...
...
@@ -30,6 +30,7 @@ import htmlFormData
|
UpdS
String
// new piece of text
encodeTriplet
::
!
Triplet
->
String
// encoding of triplets
encodeString
::
!
String
->
String
// encoding of
// Form submission handling
...
...
libraries/htmlGEC/EncodeDecode.icl
View file @
82065d47
libraries/htmlGEC/Examples/CoffeeMachineDeLuxe/coffeemachine.prj
View file @
82065d47
This diff is collapsed.
Click to expand it.
libraries/htmlGEC/Examples/Simple Workflows/workflowExamples.icl
View file @
82065d47
...
...
@@ -7,23 +7,25 @@ derive gUpd []
//Start world = doHtmlServer (multiUser (Quotation myQuotation)) world
//Start world = doHtmlServer (multiUser twotasks3) world
Start
world
=
doHtmlServer
(
multiUser
agenda2
)
world
Start
world
=
doHtmlServer
(
multiUser
twotasks3
)
world
where
singleUser
tasks
hst
#
(_,
html
,
hst
)
=
startTask
0
tasks
hst
=
mkHtml
"test"
html
hst
=
mkHtml
"
s
test"
html
hst
multiUser
tasks
hst
#
(
idform
,
hst
)
=
FuncMenu
(
Init
,
nFormId
"pdm_chooseWorker"
(
0
,[(
"User "
+++
toString
i
,\_
->
i
)
\\
i
<-[
0
..
5
]
]))
hst
#
currentWorker
=
snd
idform
.
value
#
(_,
html
,
hst
)
=
startTask
currentWorker
(
persistent
tasks
)
hst
=
mkHtml
"test"
[
idform
.
form
<=>
html
]
hst
=
mkHtml
"
m
test"
[
idform
.
form
<=>
html
]
hst
where
persistent
tasks
tst
//
# tst = setTaskAttribute Persistent tst
#
tst
=
setTaskAttribute
StaticDynamic
tst
#
tst
=
setTaskAttribute
Database
tst
#
tst
=
setTaskAttribute
Persistent
tst
//
# tst = setTaskAttribute StaticDynamic tst
//
# tst = setTaskAttribute Database tst
=
tasks
tst
...
...
libraries/htmlGEC/Examples/Work Administration/projectAdmin.prj
View file @
82065d47
This diff is collapsed.
Click to expand it.
libraries/htmlGEC/htmlFormlib.icl
View file @
82065d47
...
...
@@ -157,7 +157,8 @@ vertlistForm :: !(InIDataId [a]) !*HSt -> (Form [a],!*HSt) | iData a
vertlistForm
inIDataId
hSt
=
layoutListForm
(\
f1
f2
->
[
f1
<||>
f2
])
mkEditForm
inIDataId
hSt
vertlistFormButs
::
!
Int
!
Bool
!(
InIDataId
[
a
])
!*
HSt
->
(
Form
[
a
],!*
HSt
)
|
iData
a
vertlistFormButs
nbuts
showbuts
(
init
,
formid
)
hst
vertlistFormButs
nbuts
showbuts
(
init
,
formid
=:{
mode
})
hst
#
formid
=
formid
<@
Edit
#
indexId
=
subFormId
formid
"idx"
0
<@
Display
#
(
index
,
hst
)
=
mkEditForm
(
init
,
indexId
)
hst
#
(
olist
,
hst
)
=
listForm
(
init
,
formid
)
hst
...
...
@@ -197,7 +198,7 @@ vertlistFormButs nbuts showbuts (init,formid) hst
#
newlist
=
app
.
value
newlist
#
newlist
=
del
.
value
newlist
#
(
list
,
hst
)
=
listForm
(
setID
formid
newlist
)
hst
#
(
list
,
hst
)
=
listForm
(
Set
,
setFormId
formid
newlist
<@
mode
)
hst
#
lengthlist
=
length
newlist
#
(
index
,
hst
)
=
mkEditForm
(
setID
indexId
obbuts
.
value
)
hst
#
(
bbuts
,
hst
)
=
browseButtons
(
Init
,
bbutsId
)
step
lengthlist
nbuts
hst
...
...
@@ -210,7 +211,10 @@ vertlistFormButs nbuts showbuts (init,formid) hst
=
(
{
form
=
pdbuts
.
form
++
bbuts
.
form
++
[[
toHtml
(
"nr "
<+++
(
i
+1
)
<+++
" / "
<+++
length
list
.
value
)
<.||.>
(
onMode
formid
.
mode
(
if
showbuts
(
del
<.=.>
ins
<.=.>
app
<.=.>
copy
<.=.>
paste
)
EmptyBody
)
EmptyBody
EmptyBody
EmptyBody
)
(
onMode
formid
.
mode
(
if
showbuts
(
del
<.=.>
ins
<.=.>
app
<.=.>
copy
<.=.>
paste
)
EmptyBody
)
(
if
showbuts
(
del
<.=.>
ins
<.=.>
app
<.=.>
copy
<.=.>
paste
)
EmptyBody
)
EmptyBody
EmptyBody
)
\\
del
<-
del
.
form
&
ins
<-
ins
.
form
&
app
<-
app
.
form
&
copy
<-
copy
.
form
&
paste
<-
paste
.
form
&
i
<-
[
bbuts
.
value
..]]
<=|>
list
.
form
%
betweenindex
...
...
@@ -288,7 +292,7 @@ listForm inIDataId hSt = layoutListForm (\f1 f2 -> [BodyTag f1:f2]) mkEditForm
layoutListForm
::
!([
BodyTag
]
[
BodyTag
]
->
[
BodyTag
])
!((
InIDataId
a
)
*
HSt
->
(
Form
a
,
*
HSt
))
!
(
InIDataId
[
a
])
!*
HSt
->
(
Form
[
a
],!*
HSt
)
|
iData
a
layoutListForm
layoutF
formF
(
init
,
formid
)
hst
layoutListForm
layoutF
formF
(
init
,
formid
=:{
mode
}
)
hst
#
(
store
,
hst
)
=
mkStoreForm
(
init
,
formid
)
id
hst
// enables to store list with different # elements
#
(
layout
,
hst
)
=
layoutListForm`
0
store
.
value
hst
#
(
store
,
hst
)
=
mkStoreForm
(
init
,
formid
)
(
const
layout
.
value
)
hst
...
...
libraries/htmlGEC/htmlHandler.icl
View file @
82065d47
...
...
@@ -238,24 +238,25 @@ where
mkForm
::
!(
InIDataId
a
)
!*
HSt
->
*(
Form
a
,
!*
HSt
)
|
gForm
{|*|}
a
mkForm
(
init
,
formid
=:{
mode
=
Submit
})
hst
=:{
submits
=
False
}
#
(
form
,
hst
)
=
gForm
{|*|}
(
init
,
formid
)
{
hst
&
submits
=
True
}
#
hst
=
{
hst
&
submits
=
False
}
#
hidden
=
Input
[
Inp_Name
"hidden"
,
Inp_Type
Inp_Hidden
,
Inp_Value
(
SV
""
)
]
""
#
submit
=
Input
[
Inp_Type
Inp_Button
,
Inp_Value
(
SV
"Submit"
)
,
`
Inp_Events
(
callClean
OnClick
Submit
form
id
.
id
)
,
`
Inp_Events
(
callClean
OnClick
Submit
form
name
)
]
""
#
clear
=
Input
[
Inp_Type
Inp_Reset
,
Inp_Value
(
SV
"Clear"
)]
""
#
sform
=
[
Form
[
Frm_Method
Post
,
Frm_Name
form
id
.
id
,
Frm_Name
form
name
]
(
form
.
form
++
[
hidden
,
Br
,
submit
,
clear
])
]
=
({
form
&
form
=
sform
}
,
hst
)
where
formname
=
encodeString
formid
.
id
// to enable the use of any character in a form name
mkForm
inidataid
hst
=
gForm
{|*|}
inidataid
hst
generic
gForm
a
::
!(
InIDataId
a
)
!*
HSt
->
*(
Form
a
,
!*
HSt
)
gForm
{|
Int
|}
(
init
,
formid
)
hst
...
...
libraries/htmlGEC/htmlSettings.dcl
View file @
82065d47
...
...
@@ -18,8 +18,8 @@ class iDataSerAndDeSerialize a
|
gParse
{|*|}
// To de-serialize a string back to a value
,
iDataSerialize
a
TraceInput
:==
Tru
e
// show what kind of information is received from Client
TraceOutput
:==
Tru
e
// show what kind of information is stored
TraceInput
:==
Fals
e
// show what kind of information is received from Client
TraceOutput
:==
Fals
e
// show what kind of information is stored
MyDataBase
:==
"iDataDatabase"
// name of database being used by iData applications
...
...
Write
Preview
Supports
Markdown
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