Commit d2f0142c authored by Bas Lijnse's avatar Bas Lijnse

Merge branch 'master' into ui-reorg

# Conflicts:
#	Dependencies/graph_copy/win32/Clean System Files/graph_to_sapl_string.o
#	Server/iTasks/API/Extensions/SVG/SVGlet.dcl
#	Server/iTasks/API/Extensions/User.dcl
#	Server/iTasks/API/Extensions/User.icl
parents e8712829 f6121a8b
Subproject commit 5cae9475201ab3c1ee7df82a87efc351855ec6ea
Subproject commit 4c71bc580e5fabb653cf211b53ef4fb2db923cbb
definition module graph_to_string_and_descriptors;
// includes unboxed record descriptors
graph_to_string_with_descriptors :: !a -> {#Char};
graph_to_string_with_descriptor_and_module_table :: !a -> (!{#Char},!{#{#Char}},!{#{#Char}});
// (graph,descriptor_table,module_table)
definition module graph_to_sapl_string
// JMJ 2007
// Convert a graph to a SAPL string that can be evaluated by the SAPL interpreter
// DynamicSapl is only for debugging purposes
:: DynamicSapl = IntS Int | BoolS Bool | CharS Char | RealS Real | StringS String | CstrS String String Int [DynamicSapl] |
FunctionS String String Int [DynamicSapl] | ArrayS Int [DynamicSapl] | ListS [DynamicSapl] |
TupleS Int [DynamicSapl] | RecS String String Int [DynamicSapl]
// Conversion to a SAPL string
graph_to_sapl_string :: !a -> String
string_to_graph :: !String -> .a
// Conversion to a SAPL intermediate format, only for debugging
graph_to_sapl_dynamic :: !a -> DynamicSapl
// Testing function for debugging, also gives decoding
graph_to_sapl_dynamic_test :: !a -> (({#Int},Char,{#String},Char,{#String}),Char,DynamicSapl,Char,String)
// Testing function for debugging, also gives decoding
print_graph :: !a -> String
\ No newline at end of file
definition module graph_to_string_and_descriptors;
// includes unboxed record descriptors
graph_to_string_with_descriptors :: !a -> {#Char};
graph_to_string_with_descriptor_and_module_table :: !a -> (!{#Char},!{#{#Char}},!{#{#Char}});
// (graph,descriptor_table,module_table)
definition module graph_to_sapl_string
// JMJ 2007
// Convert a graph to a SAPL string that can be evaluated by the SAPL interpreter
// DynamicSapl is only for debugging purposes
:: DynamicSapl = IntS Int | BoolS Bool | CharS Char | RealS Real | StringS String | CstrS String String Int [DynamicSapl] |
FunctionS String String Int [DynamicSapl] | ArrayS Int [DynamicSapl] | ListS [DynamicSapl] |
TupleS Int [DynamicSapl] | RecS String String Int [DynamicSapl]
// Conversion to a SAPL string
graph_to_sapl_string :: !a -> String
string_to_graph :: !String -> .a
// Conversion to a SAPL intermediate format, only for debugging
graph_to_sapl_dynamic :: !a -> DynamicSapl
// Testing function for debugging, also gives decoding
graph_to_sapl_dynamic_test :: !a -> (({#Int},Char,{#String},Char,{#String}),Char,DynamicSapl,Char,String)
// Testing function for debugging, also gives decoding
print_graph :: !a -> String
\ No newline at end of file
definition module graph_to_string_and_descriptors;
// includes unboxed record descriptors
graph_to_string_with_descriptors :: !a -> {#Char};
graph_to_string_with_descriptor_and_module_table :: !a -> (!{#Char},!{#{#Char}},!{#{#Char}});
// (graph,descriptor_table,module_table)
definition module graph_to_sapl_string
// JMJ 2007
// Convert a graph to a SAPL string that can be evaluated by the SAPL interpreter
// DynamicSapl is only for debugging purposes
:: DynamicSapl = IntS Int | BoolS Bool | CharS Char | RealS Real | StringS String | CstrS String String Int [DynamicSapl] |
FunctionS String String Int [DynamicSapl] | ArrayS Int [DynamicSapl] | ListS [DynamicSapl] |
TupleS Int [DynamicSapl] | RecS String String Int [DynamicSapl]
// Conversion to a SAPL string
graph_to_sapl_string :: !a -> String
string_to_graph :: !String -> .a
// Conversion to a SAPL intermediate format, only for debugging
graph_to_sapl_dynamic :: !a -> DynamicSapl
// Testing function for debugging, also gives decoding
graph_to_sapl_dynamic_test :: !a -> (({#Int},Char,{#String},Char,{#String}),Char,DynamicSapl,Char,String)
// Testing function for debugging, also gives decoding
print_graph :: !a -> String
\ No newline at end of file
This diff is collapsed.
definition module graph_to_string_and_descriptors;
// includes unboxed record descriptors
graph_to_string_with_descriptors :: !a -> {#Char};
graph_to_string_with_descriptor_and_module_table :: !a -> (!{#Char},!{#{#Char}},!{#{#Char}});
// (graph,descriptor_table,module_table)
......@@ -16,6 +16,7 @@ Version: 1.0
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Linux
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Linux-64
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/linux64
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/common
Path: {Application}/lib/iTasks-SDK/Dependencies/SAPL
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-sapl/src
Path: {Application}/lib/StdEnv
......
......@@ -16,6 +16,7 @@ Version: 1.0
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Linux
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Linux-64
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/linux64
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/common
Path: {Application}/lib/iTasks-SDK/Dependencies/SAPL
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-sapl/src
Path: {Application}/lib/StdEnv
......
......@@ -16,6 +16,7 @@ Version: 1.0
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Posix
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Mac
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/macosx
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/common
Path: {Application}/lib/iTasks-SDK/Dependencies/SAPL
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-sapl/src
Path: {Application}/lib/iTasks-SDK/Server/lib
......
......@@ -16,6 +16,7 @@ Version: 1.0
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Posix
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Mac
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/macosx
Path: {Application}/lib/iTasks-SDK/Dependencies/graph_copy/common
Path: {Application}/lib/iTasks-SDK/Dependencies/SAPL
Path: {Application}/lib/iTasks-SDK/Dependencies/clean-sapl/src
Path: {Application}/lib/iTasks-SDK/Server/lib
......
......@@ -21,6 +21,7 @@ Environments
Path: {Application}\iTasks-SDK\Dependencies\Platform\OS-Windows
Path: {Application}\iTasks-SDK\Dependencies\Platform\OS-Windows-32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\win32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\common
Path: {Application}\Libraries\StdEnv
Path: {Application}\Libraries\StdLib
Path: {Application}\Libraries\Generics
......
......@@ -18,6 +18,7 @@ Environments
Path: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Windows
Path: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Windows-32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\win32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\common
Path: {Application}\iTasks-SDK\Dependencies\SAPL
Path: {Application}\iTasks-SDK\Dependencies\clean-sapl\src
Path: {Application}\Libraries\StdEnv
......
......@@ -18,6 +18,7 @@ Environments
Path: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Windows
Path: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Windows-32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\win32
Path: {Application}\iTasks-SDK\Dependencies\graph_copy\common
Path: {Application}\iTasks-SDK\Dependencies\SAPL
Path: {Application}\iTasks-SDK\Dependencies\clean-sapl\src
Path: {Application}\Libraries\StdEnv
......
......@@ -16,6 +16,18 @@ import iTasks
= E.a: WorkflowTask (Task a) & iTask a
| E.a b: ParamWorkflowTask (a -> (Task b)) & iTask a & iTask b
:: WorklistRow =
{ taskNr :: Maybe String
, title :: Maybe String
, priority :: Maybe String
, createdBy :: Maybe String
, date :: Maybe String
, deadline :: Maybe String
, createdFor:: Maybe String
}
derive class iTask WorklistRow
derive class iTask Workflow
derive gText WorkflowTaskContainer
......@@ -91,3 +103,5 @@ viewTask :: Task AttachmentStatus
//The default external services
externalTaskInterface :: [PublishedTask]
appendOnce :: TaskId (Task a) (SharedTaskList a) -> Task () | iTask a
......@@ -286,6 +286,7 @@ where
lookup [wf=:{Workflow|path}:wfs] cid = if (path == cid) (Just wf) (lookup wfs cid)
lookup [] _ = Nothing
appendOnce :: TaskId (Task a) (SharedTaskList a) -> Task () | iTask a
appendOnce identity task slist
= get (taskListMeta slist)
>>- \items -> if (checkItems name items)
......@@ -298,6 +299,7 @@ where
| maybe False ((==) name) ('DM'.get "name" attributes) = True //Item with name exists!
= checkItems name is
removeWhenStable :: (Task a) (SharedTaskList a) -> Task a | iTask a
removeWhenStable task slist
= task
>>* [OnValue (ifStable (\_ -> get (taskListSelfId slist) >>- \selfId -> removeTask selfId slist))]
......
definition module iTasks.API.Extensions.Platform
import iTasks
from Math.Geometry import :: Angle
derive class iTask Angle
implementation module iTasks.API.Extensions.Platform
import iTasks
from Math.Geometry import :: Angle
from Data.Map import :: Map
derive class iTask Angle
......@@ -5,6 +5,8 @@ import Graphics.Scalable.Internal
import iTasks
import iTasks.UI.Editor
import iTasks.API.Core.Types
import iTasks.API.Extensions.Platform
//An SVGLet let's you specify an editor as an interactive SVG image
:: SVGLet m v =
......@@ -21,4 +23,4 @@ derive class iTask ImageContent, BasicImage, CompositeImage, LineImage, Markers
derive class iTask LineContent, Compose, XAlign, YAlign, OnMouseOutAttr, OnMouseMoveAttr
derive class iTask OpacityAttr, FillAttr, XRadiusAttr, YRadiusAttr, StrokeWidthAttr, StrokeAttr
derive class iTask Slash, DraggableAttr, OnMouseOverAttr, OnMouseUpAttr, DashAttr
derive class iTask OnMouseDownAttr, OnClickAttr, Angle
derive class iTask OnMouseDownAttr, OnClickAttr
......@@ -20,13 +20,14 @@ import Text
from Data.IntMap.Strict import :: IntMap, instance Functor IntMap
import qualified Data.IntMap.Strict as DIS
import Data.Matrix
import iTasks.API.Extensions.Platform
derive class iTask Image, Span, LookupSpan, FontDef, ImageTransform, ImageAttr
derive class iTask ImageContent, BasicImage, CompositeImage, LineImage, Markers
derive class iTask LineContent, Compose, XAlign, YAlign, OnMouseOutAttr, OnMouseMoveAttr
derive class iTask OpacityAttr, FillAttr, XRadiusAttr, YRadiusAttr, StrokeWidthAttr, StrokeAttr
derive class iTask Slash, DraggableAttr, OnMouseOverAttr, OnMouseUpAttr, DashAttr
derive class iTask OnMouseDownAttr, OnClickAttr, Angle
derive class iTask OnMouseDownAttr, OnClickAttr
CLICK_DELAY :== 225
......
......@@ -68,7 +68,8 @@ currentUser :: RWShared () User User
taskInstanceUser :: RWShared InstanceNo User User
//* Selected task instances
processesForCurrentUser :: ReadOnlyShared [TaskListItem ()]
processesForUser :: User -> ReadOnlyShared [TaskListItem ()]
processesForCurrentUser :: ReadOnlyShared [TaskListItem ()]
/*
* Copies authentication attributes of current task
......@@ -113,6 +114,8 @@ assign :: !TaskAttributes !(Task a) -> Task a | iTask a
*/
(@:) infix 3 :: !worker !(Task a) -> Task a | iTask a & toUserConstraint worker
workerAttributes :: worker [(String, String)] -> TaskAttributes | toUserConstraint worker
appendTopLevelTaskFor :: !worker !Bool !(Task a) -> Task TaskId | iTask a & toUserConstraint worker
appendTopLevelTaskPrioFor :: !worker !String !String !Bool !(Task a) -> Task TaskId | iTask a & toUserConstraint worker
......
......@@ -142,20 +142,23 @@ userToAttr _ attr _
# attr = 'DM'.del "auth-title" attr
= Ok (Just attr)
processesForUser :: User -> ReadOnlyShared [TaskListItem ()]
processesForUser user = mapRead (filter (forWorker user)) currentProcesses
processesForCurrentUser :: ReadOnlyShared [TaskListItem ()]
processesForCurrentUser = mapRead readPrj (currentProcesses >+| currentUser)
where
readPrj (items,user) = filter (forWorker user) items
forWorker user {TaskListItem|attributes} = case 'DM'.get "user" attributes of
Just uid1 = case user of
(AuthenticatedUser uid2 _ _) = uid1 == uid2
forWorker user {TaskListItem|attributes} = case 'DM'.get "user" attributes of
Just uid1 = case user of
(AuthenticatedUser uid2 _ _) = uid1 == uid2
_ = False
Nothing = case 'DM'.get "role" attributes of
Just role = case user of
(AuthenticatedUser _ roles _) = isMember role roles
_ = False
Nothing = case 'DM'.get "role" attributes of
Just role = case user of
(AuthenticatedUser _ roles _) = isMember role roles
_ = False
Nothing = True
Nothing = True
workOn :: !TaskId -> Task AttachmentStatus
workOn taskId=:(TaskId no _)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment