Commit d58f01b5 authored by Bas Lijnse's avatar Bas Lijnse

Changed arrangeWithSideBar layout to css based alternative

parent c21cfae7
...@@ -438,7 +438,7 @@ communicationItemTask (contactNo,mbP2000Template) status ...@@ -438,7 +438,7 @@ communicationItemTask (contactNo,mbP2000Template) status
) )
//Manage list of communication attempts and initiate communications //Manage list of communication attempts and initiate communications
-&&- attemptCommunication contactNo -&&- attemptCommunication contactNo
) <<@ ArrangeWithSideBar 0 LeftSide 200 True) <<@ ArrangeWithSideBar 0 TopSide 50 True ) <<@ ArrangeWithSideBar 0 LeftSide True) <<@ ArrangeWithHeader 0
@! () @! ()
where where
attemptCommunication contactNo attemptCommunication contactNo
...@@ -730,7 +730,7 @@ addSubAction initContacts initIncidents list ...@@ -730,7 +730,7 @@ addSubAction initContacts initIncidents list
addPredefinedAction initContacts initIncidents list addPredefinedAction initContacts initIncidents list
= (enterChoiceWithShared (Title "Choose action") [/*ChooseFromTree groupCatalog*/] actionCatalog = (enterChoiceWithShared (Title "Choose action") [/*ChooseFromTree groupCatalog*/] actionCatalog
>&> \mbSel -> configureAction mbSel) <<@ (ArrangeWithSideBar 0 LeftSide 300 True) >&> \mbSel -> configureAction mbSel) <<@ (ArrangeWithSideBar 0 LeftSide True)
where where
configureAction selSds = whileUnchanged selSds configTask configureAction selSds = whileUnchanged selSds configTask
where where
......
...@@ -7,7 +7,7 @@ import Text.HTML ...@@ -7,7 +7,7 @@ import Text.HTML
selectVideoWallContent :: Task () selectVideoWallContent :: Task ()
selectVideoWallContent selectVideoWallContent
= (header ||- selectContent) <<@ (ArrangeWithSideBar 0 TopSide 30 False) = (header ||- selectContent) <<@ (ArrangeWithHeader 0)
@! () @! ()
where where
header header
...@@ -15,7 +15,7 @@ where ...@@ -15,7 +15,7 @@ where
mapContacts = mapRead (\(x,y) -> x++y) (contactsOfOpenIncidentsGeo |*| contactsProvidingHelpGeo) mapContacts = mapRead (\(x,y) -> x++y) (contactsOfOpenIncidentsGeo |*| contactsProvidingHelpGeo)
selectContent selectContent
= (switchContent >&> withSelection viewNoSelection configureContent) <<@ (ArrangeWithSideBar 0 LeftSide 300 False) = (switchContent >&> withSelection viewNoSelection configureContent) <<@ (ArrangeWithSideBar 0 LeftSide False)
switchContent = enterChoice (Title "Choose Content") [ChooseFromList bigLabel] contentOptions switchContent = enterChoice (Title "Choose Content") [ChooseFromList bigLabel] contentOptions
contentOptions contentOptions
......
...@@ -12,7 +12,7 @@ wallContent = sharedStore "WallContent" (WallOverview defaultValue) ...@@ -12,7 +12,7 @@ wallContent = sharedStore "WallContent" (WallOverview defaultValue)
viewVideoWallContent :: Task WallContent viewVideoWallContent :: Task WallContent
viewVideoWallContent viewVideoWallContent
= (header ||- content) <<@ (ArrangeWithSideBar 0 TopSide 30 False) //<<@ AfterLayout plainLayoutFinal //FIXME = (header ||- content) <<@ (ArrangeWithHeader 0) //<<@ AfterLayout plainLayoutFinal //FIXME
where where
header header
= viewSharedInformation () [ViewAs view] (currentTime |*| currentUTCTime) //<<@ (AfterLayout (uiDefSetHalign AlignRight o uiDefSetBaseCls "wall-header")) //FIXME = viewSharedInformation () [ViewAs view] (currentTime |*| currentUTCTime) //<<@ (AfterLayout (uiDefSetHalign AlignRight o uiDefSetBaseCls "wall-header")) //FIXME
...@@ -39,7 +39,7 @@ viewWallOverview perspective ...@@ -39,7 +39,7 @@ viewWallOverview perspective
(get standardMapLayers (get standardMapLayers
>>- \baseLayers -> >>- \baseLayers ->
viewSharedInformation () [ViewAs (toMap perspective baseLayers)] mapContacts /* <<@ AfterLayout (tweakUI (setMargins 0 0 0 0 o fill))*/ ) //FIXME viewSharedInformation () [ViewAs (toMap perspective baseLayers)] mapContacts /* <<@ AfterLayout (tweakUI (setMargins 0 0 0 0 o fill))*/ ) //FIXME
) <<@ ArrangeWithSideBar 0 LeftSide 300 False ) <<@ ArrangeWithSideBar 0 LeftSide False
where where
toMap perspective baseLayers contacts toMap perspective baseLayers contacts
= toLeafletMap {ContactMap|perspective=perspective,layers=baseLayers++[{title="Contacts",def=CMMarkersLayer [contactGeoToMapMarker False False c \\ c=:{ContactGeo|position=Just _} <- contacts]}]} = toLeafletMap {ContactMap|perspective=perspective,layers=baseLayers++[{title="Contacts",def=CMMarkersLayer [contactGeoToMapMarker False False c \\ c=:{ContactGeo|position=Just _} <- contacts]}]}
...@@ -55,8 +55,8 @@ viewWallContactSummary contactNo ...@@ -55,8 +55,8 @@ viewWallContactSummary contactNo
= withHeader viewContactTitle = withHeader viewContactTitle
((viewDetails ((viewDetails
-&&- -&&-
((viewPosition -&&- viewCommunication ) <<@ArrangeWithSideBar 1 RightSide 350 False) ((viewPosition -&&- viewCommunication ) <<@ArrangeWithSideBar 1 RightSide False)
) <<@ArrangeWithSideBar 0 LeftSide 250 False) ) <<@ArrangeWithSideBar 0 LeftSide False)
where where
contact = sdsFocus contactNo contactByNo contact = sdsFocus contactNo contactByNo
......
...@@ -38,8 +38,8 @@ answerPhoneCall communicationNo ...@@ -38,8 +38,8 @@ answerPhoneCall communicationNo
>>| connectInboundPhoneCall communicationNo >>| connectInboundPhoneCall communicationNo
||- ((manageCommunicationContact communicationNo ||- ((manageCommunicationContact communicationNo
-&&- -&&-
manageVoiceCallContent PhoneCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide 300 True) manageVoiceCallContent PhoneCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title ("Answer phone call") <<@ Title ("Answer phone call")
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME
@! communicationNo @! communicationNo
...@@ -51,8 +51,8 @@ initiatePhoneCall communicationNo ...@@ -51,8 +51,8 @@ initiatePhoneCall communicationNo
>>| connectOutboundPhoneCall communicationNo >>| connectOutboundPhoneCall communicationNo
||- ((manageCommunicationContact communicationNo ||- ((manageCommunicationContact communicationNo
-&&- -&&-
manageVoiceCallContent PhoneCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide 300 True) manageVoiceCallContent PhoneCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title ("Make phone call") <<@ Title ("Make phone call")
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME
@! communicationNo @! communicationNo
...@@ -64,8 +64,8 @@ answerRadioCall communicationNo ...@@ -64,8 +64,8 @@ answerRadioCall communicationNo
>>| updateRadioCallMeta communicationNo >>| updateRadioCallMeta communicationNo
||- ((manageCommunicationContact communicationNo ||- ((manageCommunicationContact communicationNo
-&&- -&&-
manageVoiceCallContent RadioCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide 300 True) manageVoiceCallContent RadioCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title ("Answer radio call") <<@ Title ("Answer radio call")
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME
@! communicationNo @! communicationNo
...@@ -77,8 +77,8 @@ initiateRadioCall communicationNo ...@@ -77,8 +77,8 @@ initiateRadioCall communicationNo
>>| updateRadioCallMeta communicationNo >>| updateRadioCallMeta communicationNo
||- ((manageCommunicationContact communicationNo ||- ((manageCommunicationContact communicationNo
-&&- -&&-
manageVoiceCallContent RadioCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide 300 True) manageVoiceCallContent RadioCall communicationNo) <<@ ArrangeWithSideBar 0 LeftSide True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title "Initiate radio call" <<@ Title "Initiate radio call"
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME
@! communicationNo @! communicationNo
...@@ -91,7 +91,7 @@ composeEmailMessage communicationNo ...@@ -91,7 +91,7 @@ composeEmailMessage communicationNo
||- ((composeAndSendMessage communicationNo message transmitEmailMessage ||- ((composeAndSendMessage communicationNo message transmitEmailMessage
-&&- -&&-
relateMessageToIncidents communicationNo) <<@ ArrangeWithTabs True) relateMessageToIncidents communicationNo) <<@ ArrangeWithTabs True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title "Compose E-mail" <<@ Title "Compose E-mail"
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600) ) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600) ) */ //FIXME
@! communicationNo @! communicationNo
...@@ -106,7 +106,7 @@ composeP2000Message communicationNo ...@@ -106,7 +106,7 @@ composeP2000Message communicationNo
||- ((composeAndSendMessage communicationNo message transmitP2000Message ||- ((composeAndSendMessage communicationNo message transmitP2000Message
-&&- -&&-
relateMessageToIncidents communicationNo) <<@ ArrangeWithTabs True) relateMessageToIncidents communicationNo) <<@ ArrangeWithTabs True)
<<@ ArrangeWithSideBar 0 TopSide 60 False <<@ ArrangeWithHeader 0
<<@ Title "Compose P2000 message" <<@ Title "Compose P2000 message"
/* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME /* <<@ AfterLayout (uiDefSetSize (ExactSize 800) (ExactSize 600)) */ //FIXME
@! communicationNo @! communicationNo
......
...@@ -183,7 +183,7 @@ manageContactCommunication contactNo ...@@ -183,7 +183,7 @@ manageContactCommunication contactNo
= ((manageContactCommunicationMeans True contactNo) // <<@ AfterLayout (tweakUI fill)) //FIXME = ((manageContactCommunicationMeans True contactNo) // <<@ AfterLayout (tweakUI fill)) //FIXME
-&&- -&&-
(viewContactCommunications contactNo) //<<@ AfterLayout (tweakUI fill)) //FIXME (viewContactCommunications contactNo) //<<@ AfterLayout (tweakUI fill)) //FIXME
) <<@ ArrangeWithSideBar 0 LeftSide 200 True <<@ Title "Communication" <<@ Icon "communication" ) <<@ ArrangeWithSideBar 0 LeftSide True <<@ Title "Communication" <<@ Icon "communication"
@! () @! ()
where where
viewContactCommunications contactNo viewContactCommunications contactNo
...@@ -259,7 +259,7 @@ where ...@@ -259,7 +259,7 @@ where
Just taskId = workOnActionItem taskId @! taskId Just taskId = workOnActionItem taskId @! taskId
Nothing = viewInformation () [] () @? const NoValue Nothing = viewInformation () [] () @? const NoValue
) )
) <<@ (ArrangeWithSideBar 0 LeftSide 250 True) <<@ (Icon "actions") <<@ (Title "Actions") ) <<@ (ArrangeWithSideBar 0 LeftSide True) <<@ (Icon "actions") <<@ (Title "Actions")
manageContactIncidents :: Workspace ContactNo -> Task () manageContactIncidents :: Workspace ContactNo -> Task ()
manageContactIncidents ws contactNo manageContactIncidents ws contactNo
...@@ -268,7 +268,7 @@ manageContactIncidents ws contactNo ...@@ -268,7 +268,7 @@ manageContactIncidents ws contactNo
withSelection viewNoSelection viewIncidentDetails sel withSelection viewNoSelection viewIncidentDetails sel
-&&- -&&-
doAddRemoveOpen (add <<@ InWindow) (\c -> (remove c) <<@ InWindow) (\c -> doOrClose (open c)) ws sel doAddRemoveOpen (add <<@ InWindow) (\c -> (remove c) <<@ InWindow) (\c -> doOrClose (open c)) ws sel
) <<@ (ArrangeWithSideBar 1 RightSide 300 True) <<@ (Icon "incidents") <<@ (Title "Incidents") ) <<@ (ArrangeWithSideBar 1 RightSide True) <<@ (Icon "incidents") <<@ (Title "Incidents")
@! () @! ()
where where
incidents = sdsFocus contactNo incidentsByContactDetails incidents = sdsFocus contactNo incidentsByContactDetails
......
...@@ -62,7 +62,7 @@ manageIncidentContacts ws incidentNo ...@@ -62,7 +62,7 @@ manageIncidentContacts ws incidentNo
@! () @! ()
where where
contacts = sdsFocus incidentNo contactsByIncident contacts = sdsFocus incidentNo contactsByIncident
manageContacts = ((withShared Nothing (\sel -> (chooseFromList sel -||- chooseFromMap sel) <<@ (ArrangeWithSideBar 0 LeftSide 250 True)))) manageContacts = ((withShared Nothing (\sel -> (chooseFromList sel -||- chooseFromMap sel) <<@ (ArrangeWithSideBar 0 LeftSide True))))
>^* [(OnAction (Action "/Add contact") (always (add <<@ InWindow @! ()))) >^* [(OnAction (Action "/Add contact") (always (add <<@ InWindow @! ())))
,(OnAction (Action "/Remove contact") (ifValue (\c -> c=:(Left _)) (\(Left c) -> (remove c <<@ InWindow @! ())))) ,(OnAction (Action "/Remove contact") (ifValue (\c -> c=:(Left _)) (\(Left c) -> (remove c <<@ InWindow @! ()))))
,(OnAction (Action "/Update position") (ifValue (\c -> c=:(Left _)) (\(Left c) -> updateContactPosition c <<@ InWindow @! ()))) ,(OnAction (Action "/Update position") (ifValue (\c -> c=:(Left _)) (\(Left c) -> updateContactPosition c <<@ InWindow @! ())))
...@@ -108,13 +108,13 @@ where ...@@ -108,13 +108,13 @@ where
Just taskId = workOnActionItem taskId Just taskId = workOnActionItem taskId
Nothing = viewInformation () [] () Nothing = viewInformation () [] ()
) )
)) <<@ (ArrangeWithSideBar 0 LeftSide 250 True) <<@ (Icon "actions") <<@ (Title "Incident Actions") //FIXME )) <<@ (ArrangeWithSideBar 0 LeftSide True) <<@ (Icon "actions") <<@ (Title "Incident Actions") //FIXME
manageIncidentWeather :: IncidentNo -> Task () manageIncidentWeather :: IncidentNo -> Task ()
manageIncidentWeather incidentNo manageIncidentWeather incidentNo
= (get webLinksConfig = (get webLinksConfig
>>- \webConfig -> case webConfig.weatherWidgets of >>- \webConfig -> case webConfig.weatherWidgets of
Just widgets = (viewWebWeather widgets ||- viewOrEdit (Title "Weather on scene") weather log) <<@ (ArrangeWithSideBar 0 RightSide 300 True) Just widgets = (viewWebWeather widgets ||- viewOrEdit (Title "Weather on scene") weather log) <<@ (ArrangeWithSideBar 0 RightSide True)
Nothing = viewOrEdit (Title "Weather on scene") weather log Nothing = viewOrEdit (Title "Weather on scene") weather log
) <<@ Title "Weather" <<@ Icon "weather" ) <<@ Title "Weather" <<@ Icon "weather"
...@@ -126,7 +126,7 @@ where ...@@ -126,7 +126,7 @@ where
manageIncidentLog :: IncidentNo -> Task () manageIncidentLog :: IncidentNo -> Task ()
manageIncidentLog incidentNo manageIncidentLog incidentNo
= addMessages incidentNo = addMessages incidentNo
||- viewIncidentLog incidentNo <<@ ArrangeWithSideBar 0 TopSide 100 False <<@ Title "Log" <<@ Icon "Log" ||- viewIncidentLog incidentNo <<@ ArrangeWithHeader 0 <<@ Title "Log" <<@ Icon "Log"
@! () @! ()
where where
viewIncidentLog :: IncidentNo -> Task [LogEntry] viewIncidentLog :: IncidentNo -> Task [LogEntry]
......
...@@ -108,7 +108,7 @@ where ...@@ -108,7 +108,7 @@ where
catchAll ( catchAll (
viewSharedInformation (Title ("Schema of"+++ table)) [] (sdsFocus (db,table) sqlTableDefinition) @! () viewSharedInformation (Title ("Schema of"+++ table)) [] (sdsFocus (db,table) sqlTableDefinition) @! ()
) (\e -> viewInformation () [] e @! ()) ) (\e -> viewInformation () [] e @! ())
) <<@ (ArrangeWithSideBar 0 LeftSide 300 True) ) <<@ (ArrangeWithSideBar 0 LeftSide True)
where where
//group items _ = [{ChoiceTree|defaultValue & label=o,value=ChoiceNode i}\\(i,o) <- items] //group items _ = [{ChoiceTree|defaultValue & label=o,value=ChoiceNode i}\\(i,o) <- items]
...@@ -143,7 +143,7 @@ where ...@@ -143,7 +143,7 @@ where
manageExistingUsers manageExistingUsers
= (enterChoiceWithSharedAs () [ChooseFromGrid id] allContactsShort contactIdentity = (enterChoiceWithSharedAs () [ChooseFromGrid id] allContactsShort contactIdentity
>&> withSelection viewNoSelection manageContactAccess >&> withSelection viewNoSelection manageContactAccess
)<<@ ArrangeWithSideBar 0 LeftSide 200 True )<<@ ArrangeWithSideBar 0 LeftSide True
viewNoSelection = viewInformation "Select a user" [] () viewNoSelection = viewInformation "Select a user" [] ()
addUser addUser
......
...@@ -52,7 +52,7 @@ browseIncidents ws ...@@ -52,7 +52,7 @@ browseIncidents ws
] ]
) )
( withSelection viewNoSelection viewIncidentDetails ( withSelection viewNoSelection viewIncidentDetails
) <<@ (ArrangeWithSideBar 1 RightSide 300 True) <<@ (Icon "incidents") <<@ (Title "Incidents") ) <<@ (ArrangeWithSideBar 1 RightSide True) <<@ (Icon "incidents") <<@ (Title "Incidents")
@! () @! ()
where where
selectIncident selectIncident
...@@ -74,7 +74,7 @@ browseContacts ws ...@@ -74,7 +74,7 @@ browseContacts ws
] ]
) )
( withSelection viewNoSelection viewDetails ( withSelection viewNoSelection viewDetails
) <<@ (ArrangeWithSideBar 1 RightSide 300 True) <<@ (Icon "contacts") <<@ (Title "Contacts") ) <<@ (ArrangeWithSideBar 1 RightSide True) <<@ (Icon "contacts") <<@ (Title "Contacts")
@! () @! ()
where where
viewDetails (Left contactNo) = viewContactDetails contactNo viewDetails (Left contactNo) = viewContactDetails contactNo
...@@ -109,7 +109,7 @@ where ...@@ -109,7 +109,7 @@ where
Just taskId = workOnActionItem taskId Just taskId = workOnActionItem taskId
Nothing = viewInformation () [] () Nothing = viewInformation () [] ()
) )
) <<@ (ArrangeWithSideBar 0 LeftSide 250 True) <<@ (Icon "actions") <<@ (Title "Actions") ) <<@ (ArrangeWithSideBar 0 LeftSide True) <<@ (Icon "actions") <<@ (Title "Actions")
...@@ -83,7 +83,7 @@ where ...@@ -83,7 +83,7 @@ where
whileAuthenticated :: User [Workspace -> Task ()] -> Task () whileAuthenticated :: User [Workspace -> Task ()] -> Task ()
whileAuthenticated user tasks whileAuthenticated user tasks
= (controlDash -|| workOnTasks) <<@ (ArrangeWithSideBar 0 TopSide 30 False) = (controlDash -|| workOnTasks) <<@ (ArrangeWithHeader 0)
where where
controlDash = ( controlDash = (
viewInformation () [] ("Welcome " +++ toString user) viewInformation () [] ("Welcome " +++ toString user)
...@@ -99,6 +99,6 @@ where ...@@ -99,6 +99,6 @@ where
,moveSubUIs (SelectByPath [0,0]) [] 2 ,moveSubUIs (SelectByPath [0,0]) [] 2
,removeSubUIs (SelectByPath [0]) ,removeSubUIs (SelectByPath [0])
,layoutSubUIs (SelectByType UIAction) actionToButton ,layoutSubUIs (SelectByType UIAction) actionToButton
,setUIAttributes ('DM'.unions [directionAttr Horizontal,paddingAttr 2 2 2 250, classAttr "summary-bar"]) ,setUIAttributes ('DM'.unions [directionAttr Horizontal,paddingAttr 2 2 2 250, classAttr ["summary-bar"]])
,setUIType UIContainer ,setUIType UIContainer
] ]
...@@ -224,7 +224,7 @@ where ...@@ -224,7 +224,7 @@ where
, moveSubAt[2] [1,0] , moveSubAt[2] [1,0]
, moveSubAt[2] [1,1] , moveSubAt[2] [1,1]
, moveSubAt[2] [1,2] , moveSubAt[2] [1,2]
, arrangeWithSideBar 1 LeftSide 350 False //Move the 'tool' tasks to the side , arrangeWithSideBar 1 LeftSide False //Move the 'tool' tasks to the side
] ]
*/ */
...@@ -292,7 +292,7 @@ editSectionContents ...@@ -292,7 +292,7 @@ editSectionContents
,moveSubAt [2] [1,0] ,moveSubAt [2] [1,0]
,moveSubAt [2] [1,1] ,moveSubAt [2] [1,1]
,moveSubAt [2] [1,2] ,moveSubAt [2] [1,2]
,arrangeWithSideBar 1 BottomSide 250 False ,arrangeWithSideBar 1 BottomSide False
] ]
*/ */
......
...@@ -36,7 +36,7 @@ whileAuthenticated :: User [Entity] ...@@ -36,7 +36,7 @@ whileAuthenticated :: User [Entity]
(User -> [(String, User [Entity] -> Task ())]) (User -> [(String, User [Entity] -> Task ())])
-> Task () -> Task ()
whileAuthenticated user ents alwaysOnTasks tlist whileAuthenticated user ents alwaysOnTasks tlist
= controlDash -|| workOnTasks <<@ ApplyLayout (arrangeWithSideBar 0 TopSide 30 False) = controlDash -|| workOnTasks <<@ ApplyLayout (arrangeWithHeader 0)
where where
controlDash :: Task () controlDash :: Task ()
controlDash controlDash
...@@ -61,7 +61,7 @@ whileAuthenticated user ents alwaysOnTasks tlist ...@@ -61,7 +61,7 @@ whileAuthenticated user ents alwaysOnTasks tlist
layout = sequenceLayouts layout = sequenceLayouts
[removeSubUIs (SelectByPath [1]) //Don't show the openAssignedTasks UI [removeSubUIs (SelectByPath [1]) //Don't show the openAssignedTasks UI
,arrangeWithSideBar 0 RightSide 300 True ,arrangeWithSideBar 0 RightSide True
,layoutSubUIs (SelectByPath [0]) (arrangeWithTabs True) ,layoutSubUIs (SelectByPath [0]) (arrangeWithTabs True)
] ]
......
...@@ -117,30 +117,30 @@ doTasksSequentially [t:ts] = t >>| doTasksSequentially ts ...@@ -117,30 +117,30 @@ doTasksSequentially [t:ts] = t >>| doTasksSequentially ts
allTabs :: [Task a] -> (Task [a]) | iTask a allTabs :: [Task a] -> (Task [a]) | iTask a
allTabs ts = allTasks ts <<@ ArrangeWithTabs True allTabs ts = allTasks ts <<@ ArrangeWithTabs True
allSideBar :: Int UISide Int [Task a] -> (Task [a]) | iTask a allSideBar :: Int UISide [Task a] -> (Task [a]) | iTask a
allSideBar b place size ts allSideBar b place ts
= allTasks ts <<@ (ArrangeWithSideBar b place size True) = allTasks ts <<@ (ArrangeWithSideBar b place True)
c2view :: (Task a) (Task ()) [Task c] [Task d] -> Task () | iTask a & iTask c & iTask d c2view :: (Task a) (Task ()) [Task c] [Task d] -> Task () | iTask a & iTask c & iTask d
c2view main top left right c2view main top left right
= allSideBar 0 TopSide 30 = allSideBar 0 TopSide
[ top [ top
, splitscreenview main left right , splitscreenview main left right
] @! () ] @! ()
splitscreenview main left right splitscreenview main left right
= allSideBar 1 RightSide 300 = allSideBar 1 RightSide
[ innersplitscreenview main left [ innersplitscreenview main left
, sidebar right , sidebar right
] @! () ] @! ()
innersplitscreenview main left innersplitscreenview main left
= allSideBar 0 LeftSide 25 = allSideBar 0 LeftSide
[ sidebar left [ sidebar left
, main @! () , main @! ()
] @! () ] @! ()
sidebar ts = allSideBar 0 TopSide 25 ts @! () sidebar ts = allSideBar 0 TopSide ts @! ()
chats :: SimpleSDSLens [ChatMessage] chats :: SimpleSDSLens [ChatMessage]
chats = sharedStore "chats" [] chats = sharedStore "chats" []
......
...@@ -29,7 +29,7 @@ viewSelectedCitizen :: Task () ...@@ -29,7 +29,7 @@ viewSelectedCitizen :: Task ()
viewSelectedCitizen viewSelectedCitizen
= (enterChoiceWithShared () [ChooseFromGrid (\{Citizen|name,ssn} -> "" <+++ name <+++ " (" <+++ ssn <+++ ")") ] citizens = (enterChoiceWithShared () [ChooseFromGrid (\{Citizen|name,ssn} -> "" <+++ name <+++ " (" <+++ ssn <+++ ")") ] citizens
>&> withSelection (viewInformation () [] "Select a citizen") >&> withSelection (viewInformation () [] "Select a citizen")
(\citizen -> viewCitizenInformation citizen.Citizen.ssn defaultValue) )<<@ ApplyLayout (arrangeWithSideBar 0 LeftSide 200 True) (\citizen -> viewCitizenInformation citizen.Citizen.ssn defaultValue) )<<@ ApplyLayout (arrangeWithSideBar 0 LeftSide True)
viewCitizenInformation :: SSN Date -> Task () viewCitizenInformation :: SSN Date -> Task ()
viewCitizenInformation ssn date viewCitizenInformation ssn date
......
...@@ -13,7 +13,7 @@ crudWith descr choiceOpts enterOpts viewOpts updateOpts toList putItem delItem s ...@@ -13,7 +13,7 @@ crudWith descr choiceOpts enterOpts viewOpts updateOpts toList putItem delItem s
where where
crud crud
= ( enterChoiceWithShared descr [ChooseFromGrid id:choiceOpts] (mapRead toList sh) = ( enterChoiceWithShared descr [ChooseFromGrid id:choiceOpts] (mapRead toList sh)
>&^ viewSharedInformation (Title "Selected") []) <<@ ApplyLayout (arrangeWithSideBar 1 RightSide 350 True) >&^ viewSharedInformation (Title "Selected") []) <<@ ApplyLayout (arrangeWithSideBar 1 RightSide True)
>>* [ OnAction (Action "New") (always newItem) >>* [ OnAction (Action "New") (always newItem)
, OnAction (Action "Edit") (hasValue editItem) , OnAction (Action "Edit") (hasValue editItem)
, OnAction (Action "Delete") (hasValue deleteItem) , OnAction (Action "Delete") (hasValue deleteItem)
......
...@@ -10,7 +10,7 @@ playWithMaps = withShared {defaultValue & icons = shipIcons} (\m -> ...@@ -10,7 +10,7 @@ playWithMaps = withShared {defaultValue & icons = shipIcons} (\m ->
(allTasks [managePerspective m, manageMapObjects m]) (allTasks [managePerspective m, manageMapObjects m])
-&&- -&&-
manipulateMap m manipulateMap m
) <<@ ArrangeWithSideBar 0 LeftSide 600 True @! () ) <<@ ArrangeWithSideBar 0 LeftSide True @! ()
manipulateMap :: (Shared sds LeafletMap) -> Task () | RWShared sds manipulateMap :: (Shared sds LeafletMap) -> Task () | RWShared sds
manipulateMap m = updateSharedInformation () [] m manipulateMap m = updateSharedInformation () [] m
......
...@@ -63,7 +63,7 @@ tonicStaticBrowser rs ...@@ -63,7 +63,7 @@ tonicStaticBrowser rs
>&> withSelection noModuleSelection ( >&> withSelection noModuleSelection (
\mn -> getModule mn \mn -> getModule mn
>>- \tm -> tonicBrowseWithModule allbps rs navstack tm >>- \tm -> tonicBrowseWithModule allbps rs navstack tm
)) <<@ ArrangeWithSideBar 0 LeftSide 200 True )) <<@ ArrangeWithSideBar 0 LeftSide True
)) ) @! () )) ) @! ()
where where
selectModule = getTonicModules >>- enterChoice "Select a module" [ChooseFromDropdown id] selectModule = getTonicModules >>- enterChoice "Select a module" [ChooseFromDropdown id]
...@@ -84,7 +84,7 @@ tonicBrowseWithModule allbps rs navstack tm ...@@ -84,7 +84,7 @@ tonicBrowseWithModule allbps rs navstack tm
, bpr_taskName = tt.tf_name , bpr_taskName = tt.tf_name
} tm tt sett.StaticDisplaySettings.unfold_depth sett.StaticDisplaySettings.display_compact @! ())) } tm tt sett.StaticDisplaySettings.unfold_depth sett.StaticDisplaySettings.display_compact @! ()))
(getTonicFunc tm tn) (getTonicFunc tm tn)
)) <<@ ArrangeWithSideBar 0 LeftSide 200 True )) <<@ ArrangeWithSideBar 0 LeftSide True
@! () @! ()
where