Commit ed61dc27 authored by Steffen Michels's avatar Steffen Michels

added tasks for having different views on shared value & some small examples

does not work for Google maps and documents yet
also gVisualize still has to be improved (for now all values are updated for shared editors)

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@840 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent cf7eb64f
...@@ -556,7 +556,10 @@ itasks.TaskFormPanel = Ext.extend(Ext.Panel, { ...@@ -556,7 +556,10 @@ itasks.TaskFormPanel = Ext.extend(Ext.Panel, {
case "TUISetValue": case "TUISetValue":
var ct = Ext.getCmp(update[1]); var ct = Ext.getCmp(update[1]);
if(ct && ct.setValue) { if(ct && ct.setValue) {
// suspend events to prevent check-event for checkbox
ct.suspendEvents();
ct.setValue(update[2]); ct.setValue(update[2]);
ct.resumeEvents();
} }
break; break;
} }
......
...@@ -43,6 +43,8 @@ import FormEditor ...@@ -43,6 +43,8 @@ import FormEditor
import FlowEditor import FlowEditor
import LaunchFlow import LaunchFlow
//Shared Value Examples
import SharedValues
Start :: *World -> *World Start :: *World -> *World
Start world = startEngine workflows world Start world = startEngine workflows world
...@@ -75,4 +77,5 @@ where ...@@ -75,4 +77,5 @@ where
, showStoredDefinitions , showStoredDefinitions
, launchFlow , launchFlow
] ]
, sharedValueExamples
] ]
\ No newline at end of file
implementation module SharedValues
import iTasks, CommonDomain, Text
derive bimap Maybe, (,)
quitButton = ButtonAction (ActionQuit, Always)
//Text-Lines Examples
noteEditor = editor {editorFrom = (\txt -> Note txt), editorTo = (\(Note txt) _ -> txt)}
listEditor = editor {editorFrom = (\txt -> split "\n" txt), editorTo = (\l _ -> join "\n" l)}
trimAction = ActionLabel "Trim"
linesPar :: Task Void
linesPar =
createShared ""
>>= \sid. ignoreResult (noteE sid -||- ignoreResult (updateShared "Lines" [quitButton] sid [listEditor]))
where
noteE sid =
updateShared "Text" [ButtonAction (trimAction, Always), quitButton] sid [noteEditor]
>>= \(action,txt). case action of
trimAction = setShared sid (trim txt)
>>| noteE sid
_ = stop
linesSingle :: Task Void
linesSingle = ignoreResult (updateSharedLocal "Text & Lines" [quitButton] "" [noteEditor,listEditor])
//Calculate Sum Example
calculateSum :: Task Void
calculateSum = ignoreResult (updateSharedLocal "Sum" [quitButton] (0,0) [idEditor, listener {listenerFrom = (\(x,y) -> x + y)}])
//Tree Example
:: Tree a = Leaf | Node (Node a)
:: Node a = { rightChildren :: Tree a
, value :: a
, leftChildren :: Tree a
}
derive gPrint Tree, Node
derive gParse Tree, Node
derive gVisualize Tree, Node
derive gUpdate Tree, Node
toTree :: [a] -> (Tree a) | Ord a
toTree list = makeTree (sort list)
where
makeTree :: [a] -> (Tree a)
makeTree [] = Leaf
makeTree [el:[]] = Node {rightChildren = Leaf, value = el, leftChildren = Leaf}
makeTree list = Node {rightChildren = makeTree end, value = middle, leftChildren = makeTree begin}
where
middlePos = (length list) / 2
begin = take (middlePos) list
middle = list !! (middlePos)
end = drop (middlePos + 1) list
tree :: Task Void
tree = ignoreResult (updateSharedLocal "List & Balanced Binary Tree" [quitButton] emptyL [idEditor, listener {listenerFrom = toTree}])
where
emptyL :: [Int]
emptyL = []
//Merge Test
mergeTest :: Task Void
mergeTest =
getCurrentUser
>>= \user. createShared emptyL
>>= \sid. ignoreResult ((user @: ("1st View", view sid)) -||- (user @: ("2nd View", view sid)))
where
view sid = updateShared "List" [quitButton] sid [idEditor]
emptyL :: [String]
emptyL = []
import StdMaybe, GeoDomain
sharedValueExamples :: [Workflow]
sharedValueExamples = [ workflow "Examples/Shared Values/Text-Lines (parallel tasks)" linesPar
, workflow "Examples/Shared Values/Text-Lines (single editor)" linesSingle
, workflow "Examples/Shared Values/Calculate Sum" calculateSum
, workflow "Examples/Shared Values/Balanced Binary Tree" tree
, workflow "Examples/Shared Values/Merge Test" mergeTest
]
\ No newline at end of file
definition module InteractionTasks definition module InteractionTasks
from TSt import :: Task from TSt import :: Task, :: SharedID
from Types import :: Role from Types import :: Role
from Html import :: HtmlTag from Html import :: HtmlTag
from iTasks import class iTask(..) from iTasks import class iTask(..)
from ProcessDB import :: Action from ProcessDB import :: Action
import GenPrint, GenParse, GenVisualize, GenUpdate import GenPrint, GenParse, GenVisualize, GenUpdate, GenMerge
// This type class contains types that may be used as // This type class contains types that may be used as
// messages and questions: plain strings and html. // messages and questions: plain strings and html.
...@@ -81,6 +81,23 @@ showStickyMessageAbout :: message a -> Task Void | html message & iTa ...@@ -81,6 +81,23 @@ showStickyMessageAbout :: message a -> Task Void | html message & iTa
notifyUser :: message UserName -> Task Void | html message notifyUser :: message UserName -> Task Void | html message
notifyGroup :: message Role -> Task Void | html message notifyGroup :: message Role -> Task Void | html message
//*** Shared value tasks ***//
:: Editor s a = {editorFrom :: s -> a, editorTo :: a s -> s}
:: Listener s a = {listenerFrom :: s -> a}
:: View s
listener :: !(Listener s a) -> View s | iTask a & iTask s & gMerge{|*|} s
editor :: !(Editor s a) -> View s | iTask a & iTask s & gMerge{|*|} s
idEditor :: View s | iTask s & gMerge{|*|} s
idListener :: View s | iTask s & gMerge{|*|} s
createShared :: a -> Task (SharedID a) | iTask a
getShared :: (SharedID a) -> Task a | iTask a
setShared :: (SharedID a) a -> Task Void | iTask a
updateShared :: question ![TaskAction s] !(SharedID s) ![View s] -> Task (!Action, !s) | html question & iTask s & gMerge{|*|} s
updateSharedLocal :: question ![TaskAction s] !s ![View s] -> Task (!Action, !s) | html question & iTask s & gMerge{|*|} s
//*** Utility Functions ***// //*** Utility Functions ***//
//Generate a set of action buttons by joining the buttons that are always shown and those only active when valid //Generate a set of action buttons by joining the buttons that are always shown and those only active when valid
makeButtons :: !String ![(Action, Bool)] -> [(!Action,!String,!String,!String,!Bool)] makeButtons :: !String ![(Action, Bool)] -> [(!Action,!String,!String,!String,!Bool)]
......
implementation module InteractionTasks implementation module InteractionTasks
import StdList, StdOrdList, StdTuple, StdBool, StdMisc, Text import StdList, StdOrdList, StdTuple, StdBool, StdMisc, Text, GenMerge
from StdFunc import id, const from StdFunc import id, const
import TSt, ProcessDB import TSt, ProcessDB
from CoreCombinators import >>=, >>|, return
from ExceptionCombinators import throw from ExceptionCombinators import throw
from TaskTree import :: InteractiveTask(..)
import GenVisualize, GenUpdate, Util, Http import GenVisualize, GenUpdate, Util, Http
...@@ -56,10 +58,10 @@ makeInformationTask question initial context actions actionStored tst=:{taskNr} ...@@ -56,10 +58,10 @@ makeInformationTask question initial context actions actionStored tst=:{taskNr}
//Check for user updates //Check for user updates
# (updates,tst) = getUserUpdates tst # (updates,tst) = getUserUpdates tst
| isEmpty updates | isEmpty updates
# (form,valid) = visualizeAsEditor editorId omask ovalue # (form,valid) = visualizeAsEditor editorId "" omask ovalue
# tst = setAccActions (evaluateConditions (getMenuActions actions) valid ovalue) tst # menuActions = evaluateConditions (getMenuActions actions) valid ovalue
# buttonActions = evaluateConditions buttonActions valid ovalue # buttonActions = evaluateConditions buttonActions valid ovalue
# tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) tst # tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) menuActions tst
= (TaskBusy,tst) = (TaskBusy,tst)
| otherwise | otherwise
# (nvalue,nmask,lmask,tst) = applyUpdates updates ovalue omask [] tst # (nvalue,nmask,lmask,tst) = applyUpdates updates ovalue omask [] tst
...@@ -68,10 +70,10 @@ makeInformationTask question initial context actions actionStored tst=:{taskNr} ...@@ -68,10 +70,10 @@ makeInformationTask question initial context actions actionStored tst=:{taskNr}
| otherwise | otherwise
# tst = setTaskStore "value" nvalue tst # tst = setTaskStore "value" nvalue tst
# tst = setTaskStore "mask" nmask tst # tst = setTaskStore "mask" nmask tst
# (updates,valid) = determineEditorUpdates editorId omask nmask lmask ovalue nvalue # (updates,valid) = determineEditorUpdates editorId "" omask nmask lmask ovalue nvalue False
# tst = setAccActions (evaluateConditions (getMenuActions actions) valid nvalue) tst # menuActions = evaluateConditions (getMenuActions actions) valid nvalue
# buttonActions = evaluateConditions buttonActions valid nvalue # buttonActions = evaluateConditions buttonActions valid nvalue
# tst = setTUIUpdates (enables editorId buttonActions ++ updates) tst # tst = setTUIUpdates (enables editorId buttonActions ++ updates) menuActions tst
= (TaskBusy, tst) = (TaskBusy, tst)
where where
readValue initial tst readValue initial tst
...@@ -157,9 +159,9 @@ makeChoiceTask question options initsel context actions tst=:{taskNr} ...@@ -157,9 +159,9 @@ makeChoiceTask question options initsel context actions tst=:{taskNr}
, columns = 1 , columns = 1
, items = radios , items = radios
}] }]
# tst = setAccActions (evaluateConditions (getMenuActions actions) valid (if valid (options !! selection) (hd options))) tst # menuActions = evaluateConditions (getMenuActions actions) valid (if valid (options !! selection) (hd options))
# buttonActions = evaluateConditions buttonActions valid (if valid (options !! selection) (hd options)) # buttonActions = evaluateConditions buttonActions valid (if valid (options !! selection) (hd options))
# tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) tst # tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) menuActions tst
= (TaskBusy, tst) = (TaskBusy, tst)
| otherwise | otherwise
# (action,tst) = getAction updates (map fst buttonActions) tst # (action,tst) = getAction updates (map fst buttonActions) tst
...@@ -173,13 +175,13 @@ makeChoiceTask question options initsel context actions tst=:{taskNr} ...@@ -173,13 +175,13 @@ makeChoiceTask question options initsel context actions tst=:{taskNr}
| index <> -1 | index <> -1
# valid = index >= 0 && index < length options //Recompute validity # valid = index >= 0 && index < length options //Recompute validity
# tst = setTaskStore "selection" index tst # tst = setTaskStore "selection" index tst
# tst = setAccActions (evaluateConditions (getMenuActions actions) valid (if valid (options !! selection) (hd options))) tst # menuActions = evaluateConditions (getMenuActions actions) valid (if valid (options !! selection) (hd options))
# buttonActions = evaluateConditions buttonActions valid (if valid (options !! selection) (hd options)) # buttonActions = evaluateConditions buttonActions valid (if valid (options !! selection) (hd options))
# tst = setTUIUpdates (enables editorId buttonActions) tst # tst = setTUIUpdates (enables editorId buttonActions) menuActions tst
= (TaskBusy, tst) = (TaskBusy, tst)
// Fallback case (shouldn't really happen) // Fallback case (shouldn't really happen)
| otherwise | otherwise
# tst = setTUIUpdates [] tst # tst = setTUIUpdates [] [] tst
= (TaskBusy, tst) = (TaskBusy, tst)
enterMultipleChoice :: question [a] -> Task [a] | html question & iTask a enterMultipleChoice :: question [a] -> Task [a] | html question & iTask a
...@@ -228,8 +230,8 @@ makeMultipleChoiceTask question options initsel context actions tst=:{taskNr} ...@@ -228,8 +230,8 @@ makeMultipleChoiceTask question options initsel context actions tst=:{taskNr}
, boxLabel = Just (visualizeAsTextLabel o) , boxLabel = Just (visualizeAsTextLabel o)
, checked = c} \\ o <- options & i <- [0..] & c <- checks ] , checked = c} \\ o <- options & i <- [0..] & c <- checks ]
# form = [ TUICheckBoxGroup {TUICheckBoxGroup |name = "selection", id = editorId +++ "-selection", fieldLabel = Nothing, hideLabel = True, columns = 1, items = cboxes}] # form = [ TUICheckBoxGroup {TUICheckBoxGroup |name = "selection", id = editorId +++ "-selection", fieldLabel = Nothing, hideLabel = True, columns = 1, items = cboxes}]
# tst = setAccActions (evaluateConditions (getMenuActions actions) True (select selection options)) tst # menuActions = evaluateConditions (getMenuActions actions) True (select selection options)
# tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) tst # tst = setTUIDef (taskPanel taskId (html question) context (Just form) (makeButtons editorId buttonActions)) menuActions tst
= (TaskBusy, tst) = (TaskBusy, tst)
| otherwise | otherwise
// One of the buttons was pressed // One of the buttons was pressed
...@@ -241,8 +243,7 @@ makeMultipleChoiceTask question options initsel context actions tst=:{taskNr} ...@@ -241,8 +243,7 @@ makeMultipleChoiceTask question options initsel context actions tst=:{taskNr}
# mbSel = parseSelection updates # mbSel = parseSelection updates
# selection = case mbSel of Nothing = selection; Just sel = map toInt sel # selection = case mbSel of Nothing = selection; Just sel = map toInt sel
# tst = setTaskStore "selection" (sort selection) tst # tst = setTaskStore "selection" (sort selection) tst
# tst = setAccActions (evaluateConditions (getMenuActions actions) True (select selection options)) tst # tst = setTUIUpdates [] (evaluateConditions (getMenuActions actions) True (select selection options)) tst
# tst = setTUIUpdates [] tst
= (TaskBusy, tst) = (TaskBusy, tst)
where where
parseSelection :: [(String,String)] -> Maybe [String] parseSelection :: [(String,String)] -> Maybe [String]
...@@ -291,9 +292,9 @@ makeMessageTask message context actions tst=:{taskNr} ...@@ -291,9 +292,9 @@ makeMessageTask message context actions tst=:{taskNr}
# buttonActions = getButtonActions actions # buttonActions = getButtonActions actions
# (updates,tst) = getUserUpdates tst # (updates,tst) = getUserUpdates tst
| isEmpty updates | isEmpty updates
# tst = setAccActions (evaluateConditions (getMenuActions actions) True Void) tst # menuActions = evaluateConditions (getMenuActions actions) True Void
# buttonActions = evaluateConditions buttonActions True Void # buttonActions = evaluateConditions buttonActions True Void
# tst = setTUIDef (taskPanel taskId (html message) context Nothing (makeButtons editorId buttonActions)) tst # tst = setTUIDef (taskPanel taskId (html message) context Nothing (makeButtons editorId buttonActions)) menuActions tst
= (TaskBusy, tst) = (TaskBusy, tst)
| otherwise | otherwise
# (action,tst) = getAction updates (map fst buttonActions) tst # (action,tst) = getAction updates (map fst buttonActions) tst
...@@ -301,6 +302,168 @@ makeMessageTask message context actions tst=:{taskNr} ...@@ -301,6 +302,168 @@ makeMessageTask message context actions tst=:{taskNr}
Just action = (TaskFinished action, tst) Just action = (TaskFinished action, tst)
Nothing = (TaskBusy, tst) Nothing = (TaskBusy, tst)
//Shared value tasks
createShared :: a -> Task (SharedID a) | iTask a
createShared v = mkInstantTask "createShared" createShared`
where
createShared` tst
#(id, tst) = createSharedStore v tst
= (TaskFinished id, tst)
getShared :: (SharedID a) -> Task a | iTask a
getShared id = mkInstantTask "getShared" getShared`
where
getShared` tst
#(v, tst) = getSharedStore id tst
= (TaskFinished v, tst)
setShared :: (SharedID a) a -> Task Void | iTask a
setShared id v = mkInstantTask "setShared" setShared`
where
setShared` tst
#tst = setSharedStore id v tst
= (TaskFinished Void, tst)
:: View s = E.a: Listener (Listener` s a) | E.a: Editor (Editor` s a)
:: Listener` s a = { visualize :: s -> [HtmlTag] }
:: Editor` s a = { getNewValue :: Int [(!String,!String)] s s *TSt -> *(!s,!*TSt)
, determineUpdates :: Int s s *TSt -> *((![TUIUpdate],!Bool),!*TSt)
, visualize :: !TaskNr Int s *TSt -> *((![TUIDef],!Bool),!*TSt)
}
editor :: !(Editor s a) -> View s | iTask a & iTask s & gMerge{|*|} s
editor {editorFrom, editorTo} = Editor {getNewValue = getNewValue, determineUpdates = determineUpdates, visualize = visualize}
where
getNewValue n updates old cur tst
# oEditV = editorFrom old
# (omask,tst) = readMask n (Just oEditV) tst
# myUpdates = [(subString namePrefixLen ((textSize key) - namePrefixLen) key,value) \\ (key,value) <- updates | startsWith (namePrefix n) key]
| isEmpty myUpdates = (cur, tst)
| otherwise
# (nEditV,_,_,tst) = applyUpdates myUpdates oEditV omask [] tst
= (mergeValues old cur (editorTo nEditV old), tst)
where
namePrefixLen = textSize (namePrefix n)
determineUpdates n old new tst=:{taskNr}
# oEditV = editorFrom old
# nEditV = editorFrom new
# (omask,tst) = readMask n (Just oEditV) tst
# (nmask,tst) = accWorldTSt (defaultMask nEditV) tst
# tst = setTaskStore (addStorePrefix n "mask") nmask tst
= (determineEditorUpdates (editorId taskNr n) (namePrefix n) omask nmask [] oEditV nEditV True,tst)
visualize taskNr n stateV tst
# editV = editorFrom stateV
# (mask,tst) = accWorldTSt (defaultMask editV) tst
# tst = setTaskStoreFor taskNr (addStorePrefix n "mask") mask tst
= (visualizeAsEditor (editorId taskNr n) (namePrefix n) mask editV,tst)
readMask n initial tst
# (mbmask,tst) = getTaskStore(addStorePrefix n "mask") tst
= case mbmask of
Just m = (m,tst)
Nothing = case initial of
Just v
# (mask,tst) = accWorldTSt (defaultMask v) tst
# tst = setTaskStore (addStorePrefix n "mask") mask tst // <- store the initial mask
= (mask,tst)
Nothing = ([],tst)
namePrefix n = (toString n) +++ "_"
applyUpdates [] val mask lmask tst = (val,mask,lmask,tst)
applyUpdates [(p,v):us] val mask lmask tst=:{TSt|world}
# (val,mask,lmask,world) = updateValueAndMask p v val mask lmask world
= applyUpdates us val mask lmask {TSt|tst & world = world}
listener :: !(Listener s a) -> View s | iTask a & iTask s & gMerge{|*|} s
listener {listenerFrom} = Listener {Listener`|visualize = visualize}
where
visualize v = visualizeAsHtmlDisplay (listenerFrom v)
idEditor :: View s | iTask s & gMerge{|*|} s
idEditor = editor {editorFrom = id, editorTo = (\a _ -> a)}
idListener :: View s | iTask s & gMerge{|*|} s
idListener = listener {listenerFrom = id}
updateShared :: question ![TaskAction s] !(SharedID s) ![View s] -> Task (!Action, !s) | html question & iTask s & gMerge{|*|} s
updateShared question actions sharedId views = mkInteractiveTask "updateShared" (makeSharedTask question actions sharedId views False)
updateSharedLocal :: question ![TaskAction s] !s ![View s] -> Task (!Action, !s) | html question & iTask s & gMerge{|*|} s
updateSharedLocal question actions initial views =
createShared initial
>>= \sid. mkInteractiveTask "updateShared" (makeSharedTask question actions sid views False)
>>= \res. mkInstantTask "removeShared" (removeShared sid)
>>| return res
where
removeShared id tst
#tst = removeSharedStore id tst
= (TaskFinished Void, tst)
makeSharedTask :: question ![TaskAction s] !(SharedID s) ![View s] !Bool !*TSt -> (!TaskResult (!Action,!s),!*TSt) | html question & iTask s & gMerge{|*|} s
makeSharedTask question actions sharedId views actionStored tst=:{taskNr}
# (updates,tst) = getUserUpdates tst
| isEmpty updates
# tst = setTUIFunc createDefs tst
= (TaskBusy, tst)
| otherwise
# (cvalue,tst) = getSharedStore sharedId tst
# (action,tst) = getAction updates (map fst buttonActions) tst
| isJust action = (TaskFinished (fromJust action,cvalue),tst)
| otherwise
# (nvalue,_,tst) = foldl (updateV updates) (cvalue,0,tst) views
# tst = setSharedStore sharedId nvalue tst
# (upd,valid,_,tst) = foldl (detUpd nvalue) ([],True,0,tst) views
# menuActions = evaluateConditions menuActions valid nvalue
# buttonActions = evaluateConditions buttonActions valid nvalue
# tst = setTUIUpdates (enables baseEditorId buttonActions ++ upd) menuActions tst
= (TaskBusy, tst)
where
createDefs tst
# (svalue,tst) = getSharedStore sharedId tst
# (form,valid,_,tst) = foldl (createDef svalue) ([],True,0,tst) views
# menuActions = evaluateConditions menuActions valid svalue
# buttonActions = evaluateConditions buttonActions valid svalue
= (Definition (taskPanel taskId (html question) Nothing (Just form) (makeButtons baseEditorId buttonActions)) menuActions,tst)
createDef svalue (def,valid,n,tst) (Editor editor)
# tst = setTaskStoreFor taskNr (addStorePrefix n "value") svalue tst
# ((ndef,nvalid),tst) = editor.Editor`.visualize taskNr n svalue tst
= (def ++ ndef,valid && nvalid,n + 1,tst)
createDef svalue (def,valid,n,tst) (Listener listener) = (def ++ [listenerPanel svalue listener n],valid,n + 1,tst)
updateV updates (cvalue,n,tst) (Editor editor)
# (ovalue,tst) = readValue n tst
# (nvalue,tst) = editor.getNewValue n updates ovalue cvalue tst
= (nvalue,n + 1,tst)
updateV _ (cvalue,n,tst) (Listener _) = (cvalue,n + 1,tst)
detUpd nvalue (upd,valid,n,tst) (Editor editor)
# (ovalue,tst) = readValue n tst
# tst = setTaskStore (addStorePrefix n "value") nvalue tst
# ((nupd,nvalid),tst) = editor.determineUpdates n ovalue nvalue tst
= (upd ++ nupd, valid && nvalid, n + 1, tst)
detUpd nvalue (upd,valid,n,tst) (Listener listener) = ([TUIReplace (editorId taskNr n) (listenerPanel nvalue listener n):upd],valid,n + 1,tst)
listenerPanel value listener n = TUIHtmlPanel {TUIHtmlPanel| id = (editorId taskNr n), html = toString (DivTag [] (html (listener.Listener`.visualize value))), border = True, bodyCssClass = "task-context", fieldLabel = Nothing, hideLabel = True}
taskId = taskNrToString taskNr
baseEditorId = "tf-" +++ taskId
menuActions = getMenuActions actions
buttonActions = getButtonActions actions
readValue n tst
# (mbvalue,tst) = getTaskStore (addStorePrefix n "value") tst
= case mbvalue of
Just v = (v,tst)
Nothing = abort "cannot get local value!"
addStorePrefix n key = (toString n) +++ "_" +++ key
editorId taskNr n = "tf-" +++ (taskNrToString taskNr) +++ "_" +++ (toString n)
taskPanel :: String [HtmlTag] (Maybe [HtmlTag]) (Maybe [TUIDef]) [(Action,String,String,String,Bool)] -> TUIDef taskPanel :: String [HtmlTag] (Maybe [HtmlTag]) (Maybe [TUIDef]) [(Action,String,String,String,Bool)] -> TUIDef
taskPanel taskid description mbContext mbForm buttons taskPanel taskid description mbContext mbForm buttons
= TUIPanel {TUIPanel| layout = "", autoHeight = True, autoWidth = True, border = False, items = items, buttons = Just (taskButtons buttons), bodyCssClass = "basic-task", fieldLabel = Nothing, renderingHint = 0, unstyled=False} = TUIPanel {TUIPanel| layout = "", autoHeight = True, autoWidth = True, border = False, items = items, buttons = Just (taskButtons buttons), bodyCssClass = "basic-task", fieldLabel = Nothing, renderingHint = 0, unstyled=False}
......
...@@ -3,7 +3,7 @@ definition module CommonDomain ...@@ -3,7 +3,7 @@ definition module CommonDomain
* This module provides a series of data types, their iTask generics obligations and utility * This module provides a series of data types, their iTask generics obligations and utility
* functions for common data in workflows. * functions for common data in workflows.
*/ */
import GenPrint, GenParse, GenVisualize, GenUpdate import GenPrint, GenParse, GenVisualize, GenUpdate, GenMerge
import StdString import StdString
from Html import :: HtmlTag from Html import :: HtmlTag
...@@ -46,6 +46,7 @@ derive gPrint EmailAddress, Password, Note, Date, Time, DateTime, Currency ...@@ -46,6 +46,7 @@ derive gPrint EmailAddress, Password, Note, Date, Time, DateTime, Currency
derive gParse EmailAddress, Password, Note, Date, Time, DateTime, Currency derive gParse EmailAddress, Password, Note, Date, Time, DateTime, Currency
derive gVisualize EmailAddress, Password, Note, Date, Time, DateTime, Currency derive gVisualize EmailAddress, Password, Note, Date, Time, DateTime, Currency
derive gUpdate EmailAddress, Password, Note, Date, Time, DateTime, Currency derive gUpdate EmailAddress, Password, Note, Date, Time, DateTime, Currency
derive gMerge EmailAddress, Password, Note, Date, Time, DateTime, Currency
instance html Note instance html Note
......
...@@ -9,29 +9,46 @@ derive gPrint EmailAddress, Password, Note, Date, Time, DateTime, Currency ...@@ -9,29 +9,46 @@ derive gPrint EmailAddress, Password, Note, Date, Time, DateTime, Currency
derive gParse EmailAddress, Password, Note, Date, Time, DateTime, Currency derive gParse EmailAddress, Password, Note, Date, Time, DateTime, Currency