taskjuggler 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1144 -2047
- data/README +1 -1
- data/Rakefile +6 -6
- data/data/css/tjmanual.css +20 -0
- data/data/css/tjreport.css +7 -6
- data/doc/AppConfig.html +136 -130
- data/doc/Arguments.html +46 -40
- data/doc/CHANGELOG.html +1162 -2057
- data/doc/COPYING.html +8 -2
- data/doc/Object.html +205 -199
- data/doc/README.html +9 -3
- data/doc/RuntimeConfig.html +75 -69
- data/doc/String.html +69 -63
- data/doc/TaskJuggler.html +350 -291
- data/doc/TaskJuggler/Account.html +26 -20
- data/doc/TaskJuggler/AccountAttribute.html +24 -18
- data/doc/TaskJuggler/AccountScenario.html +24 -18
- data/doc/TaskJuggler/Allocation.html +74 -68
- data/doc/TaskJuggler/AllocationAttribute.html +54 -48
- data/doc/TaskJuggler/AttributeBase.html +172 -93
- data/doc/TaskJuggler/AttributeDefinition.html +22 -16
- data/doc/TaskJuggler/AttributeOverwrite.html +586 -0
- data/doc/TaskJuggler/BatchProcessor.html +263 -257
- data/doc/TaskJuggler/Booking.html +44 -38
- data/doc/TaskJuggler/BookingListAttribute.html +25 -21
- data/doc/TaskJuggler/BooleanAttribute.html +24 -18
- data/doc/TaskJuggler/CSVFile.html +193 -187
- data/doc/TaskJuggler/CellSettingPattern.html +13 -7
- data/doc/TaskJuggler/CellSettingPatternList.html +25 -19
- data/doc/TaskJuggler/Charge.html +49 -43
- data/doc/TaskJuggler/ChargeListAttribute.html +21 -15
- data/doc/TaskJuggler/ChargeSet.html +94 -88
- data/doc/TaskJuggler/ChargeSetListAttribute.html +29 -25
- data/doc/TaskJuggler/CollisionDetector.html +142 -136
- data/doc/TaskJuggler/ColumnListAttribute.html +21 -17
- data/doc/TaskJuggler/ColumnTable.html +50 -44
- data/doc/TaskJuggler/Daemon.html +71 -50
- data/doc/TaskJuggler/DataCache.html +110 -58
- data/doc/TaskJuggler/DataCacheEntry.html +22 -16
- data/doc/TaskJuggler/DateAttribute.html +24 -18
- data/doc/TaskJuggler/DefinitionListAttribute.html +12 -6
- data/doc/TaskJuggler/DependencyListAttribute.html +29 -25
- data/doc/TaskJuggler/DurationAttribute.html +25 -19
- data/doc/TaskJuggler/FileList.html +25 -19
- data/doc/TaskJuggler/FileRecord.html +17 -11
- data/doc/TaskJuggler/FixnumAttribute.html +16 -10
- data/doc/TaskJuggler/FlagListAttribute.html +25 -21
- data/doc/TaskJuggler/FloatAttribute.html +20 -14
- data/doc/TaskJuggler/FormatListAttribute.html +17 -11
- data/doc/TaskJuggler/GanttChart.html +242 -236
- data/doc/TaskJuggler/GanttContainer.html +71 -67
- data/doc/TaskJuggler/GanttHeader.html +113 -107
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +26 -20
- data/doc/TaskJuggler/GanttLine.html +217 -210
- data/doc/TaskJuggler/GanttLoadStack.html +89 -83
- data/doc/TaskJuggler/GanttMilestone.html +11 -6
- data/doc/TaskJuggler/GanttRouter.html +194 -186
- data/doc/TaskJuggler/GanttTaskBar.html +41 -34
- data/doc/TaskJuggler/HTMLDocument.html +52 -46
- data/doc/TaskJuggler/HTMLGraphics.html +58 -52
- data/doc/TaskJuggler/Interval.html +90 -84
- data/doc/TaskJuggler/IntervalList.html +777 -0
- data/doc/TaskJuggler/IntervalListAttribute.html +29 -25
- data/doc/TaskJuggler/JobInfo.html +36 -30
- data/doc/TaskJuggler/Journal.html +188 -177
- data/doc/TaskJuggler/JournalEntry.html +36 -30
- data/doc/TaskJuggler/JournalEntryList.html +88 -82
- data/doc/TaskJuggler/KeywordArray.html +12 -6
- data/doc/TaskJuggler/KeywordDocumentation.html +512 -503
- data/doc/TaskJuggler/Limits.html +111 -105
- data/doc/TaskJuggler/Limits/Limit.html +71 -65
- data/doc/TaskJuggler/LimitsAttribute.html +21 -15
- data/doc/TaskJuggler/ListAttributeBase.html +16 -10
- data/doc/TaskJuggler/Log.html +111 -105
- data/doc/TaskJuggler/LogFile.html +54 -48
- data/doc/TaskJuggler/LogicalAttribute.html +35 -29
- data/doc/TaskJuggler/LogicalExpression.html +32 -26
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +16 -10
- data/doc/TaskJuggler/LogicalExpressionListAttribute.html +671 -0
- data/doc/TaskJuggler/LogicalFlag.html +24 -18
- data/doc/TaskJuggler/LogicalFunction.html +164 -158
- data/doc/TaskJuggler/LogicalOperation.html +138 -132
- data/doc/TaskJuggler/Macro.html +14 -8
- data/doc/TaskJuggler/MacroTable.html +42 -36
- data/doc/TaskJuggler/ManagerResponsibilities.html +19 -13
- data/doc/TaskJuggler/ManagerStatusRecord.html +23 -17
- data/doc/TaskJuggler/Message.html +56 -50
- data/doc/TaskJuggler/MessageHandler.html +73 -67
- data/doc/TaskJuggler/Navigator.html +92 -86
- data/doc/TaskJuggler/NavigatorElement.html +88 -82
- data/doc/TaskJuggler/NikuProject.html +15 -9
- data/doc/TaskJuggler/NikuReport.html +405 -370
- data/doc/TaskJuggler/NikuResource.html +13 -7
- data/doc/TaskJuggler/NodeListAttribute.html +13 -9
- data/doc/TaskJuggler/PlaceHolderCell.html +22 -16
- data/doc/TaskJuggler/ProcessIntercom.html +116 -110
- data/doc/TaskJuggler/ProcessIntercomIface.html +39 -33
- data/doc/TaskJuggler/Project.html +1064 -895
- data/doc/TaskJuggler/ProjectBroker.html +439 -366
- data/doc/TaskJuggler/ProjectBrokerIface.html +63 -53
- data/doc/TaskJuggler/ProjectFileParser.html +329 -319
- data/doc/TaskJuggler/ProjectFileScanner.html +351 -345
- data/doc/TaskJuggler/ProjectRecord.html +66 -60
- data/doc/TaskJuggler/ProjectServer.html +287 -280
- data/doc/TaskJuggler/ProjectServerIface.html +43 -37
- data/doc/TaskJuggler/PropertyAttribute.html +16 -10
- data/doc/TaskJuggler/PropertyList.html +205 -199
- data/doc/TaskJuggler/PropertySet.html +264 -296
- data/doc/TaskJuggler/PropertyTreeNode.html +455 -505
- data/doc/TaskJuggler/Query.html +309 -524
- data/doc/TaskJuggler/RTFHandlers.html +17 -11
- data/doc/TaskJuggler/RTFNavigator.html +33 -27
- data/doc/TaskJuggler/RTFQuery.html +135 -129
- data/doc/TaskJuggler/RTFReport.html +63 -57
- data/doc/TaskJuggler/RTFReportLink.html +55 -49
- data/doc/TaskJuggler/RTFWithQuerySupport.html +17 -11
- data/doc/TaskJuggler/RealFormat.html +64 -58
- data/doc/TaskJuggler/RealFormatAttribute.html +12 -6
- data/doc/TaskJuggler/ReferenceAttribute.html +35 -29
- data/doc/TaskJuggler/Report.html +294 -249
- data/doc/TaskJuggler/ReportBase.html +229 -223
- data/doc/TaskJuggler/ReportContext.html +52 -46
- data/doc/TaskJuggler/ReportServer.html +143 -137
- data/doc/TaskJuggler/ReportServerIface.html +51 -43
- data/doc/TaskJuggler/ReportServerRecord.html +36 -30
- data/doc/TaskJuggler/ReportServlet.html +167 -140
- data/doc/TaskJuggler/ReportTable.html +137 -131
- data/doc/TaskJuggler/ReportTableCell.html +332 -292
- data/doc/TaskJuggler/ReportTableColumn.html +46 -40
- data/doc/TaskJuggler/ReportTableLegend.html +43 -38
- data/doc/TaskJuggler/ReportTableLine.html +66 -60
- data/doc/TaskJuggler/Resource.html +166 -160
- data/doc/TaskJuggler/ResourceListAttribute.html +54 -32
- data/doc/TaskJuggler/ResourceListRE.html +47 -41
- data/doc/TaskJuggler/ResourceScenario.html +671 -644
- data/doc/TaskJuggler/RichText.html +51 -45
- data/doc/TaskJuggler/RichTextAttribute.html +28 -22
- data/doc/TaskJuggler/RichTextDocument.html +96 -90
- data/doc/TaskJuggler/RichTextElement.html +503 -497
- data/doc/TaskJuggler/RichTextFunctionExample.html +41 -35
- data/doc/TaskJuggler/RichTextFunctionHandler.html +19 -13
- data/doc/TaskJuggler/RichTextImage.html +14 -8
- data/doc/TaskJuggler/RichTextIntermediate.html +86 -80
- data/doc/TaskJuggler/RichTextParser.html +59 -53
- data/doc/TaskJuggler/RichTextScanner.html +184 -178
- data/doc/TaskJuggler/RichTextSnip.html +69 -63
- data/doc/TaskJuggler/RichTextSyntaxRules.html +416 -410
- data/doc/TaskJuggler/Scenario.html +13 -7
- data/doc/TaskJuggler/ScenarioData.html +40 -34
- data/doc/TaskJuggler/ScenarioListAttribute.html +21 -15
- data/doc/TaskJuggler/Scoreboard.html +129 -107
- data/doc/TaskJuggler/SheetHandlerBase.html +245 -239
- data/doc/TaskJuggler/SheetReceiver.html +333 -327
- data/doc/TaskJuggler/SheetSender.html +227 -221
- data/doc/TaskJuggler/Shift.html +26 -20
- data/doc/TaskJuggler/ShiftAssignment.html +45 -39
- data/doc/TaskJuggler/ShiftAssignments.html +178 -172
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +21 -15
- data/doc/TaskJuggler/ShiftScenario.html +29 -23
- data/doc/TaskJuggler/SimpleQueryExpander.html +36 -30
- data/doc/TaskJuggler/SortListAttribute.html +17 -13
- data/doc/TaskJuggler/SourceFileInfo.html +19 -13
- data/doc/TaskJuggler/StatusSheetReceiver.html +31 -25
- data/doc/TaskJuggler/StatusSheetReport.html +166 -159
- data/doc/TaskJuggler/StatusSheetSender.html +80 -74
- data/doc/TaskJuggler/StringAttribute.html +20 -14
- data/doc/TaskJuggler/SymbolAttribute.html +16 -10
- data/doc/TaskJuggler/SyntaxReference.html +231 -225
- data/doc/TaskJuggler/TOCEntry.html +46 -40
- data/doc/TaskJuggler/TSResourceRecord.html +15 -9
- data/doc/TaskJuggler/TSTaskRecord.html +16 -10
- data/doc/TaskJuggler/TableColumnDefinition.html +84 -39
- data/doc/TaskJuggler/TableOfContents.html +28 -22
- data/doc/TaskJuggler/TableReport.html +906 -866
- data/doc/TaskJuggler/Task.html +99 -93
- data/doc/TaskJuggler/TaskDependency.html +24 -18
- data/doc/TaskJuggler/TaskListAttribute.html +29 -25
- data/doc/TaskJuggler/TaskListRE.html +46 -39
- data/doc/TaskJuggler/TaskScenario.html +2218 -1965
- data/doc/TaskJuggler/TextFormatter.html +154 -148
- data/doc/TaskJuggler/TextParser.html +362 -348
- data/doc/TaskJuggler/TextParser/Pattern.html +313 -307
- data/doc/TaskJuggler/TextParser/Rule.html +147 -141
- data/doc/TaskJuggler/TextParser/StackElement.html +58 -52
- data/doc/TaskJuggler/TextParser/State.html +88 -82
- data/doc/TaskJuggler/TextParser/StateTransition.html +42 -36
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +20 -14
- data/doc/TaskJuggler/TextParser/TokenDoc.html +19 -13
- data/doc/TaskJuggler/TextReport.html +80 -74
- data/doc/TaskJuggler/TextScanner.html +284 -272
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +14 -8
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +21 -15
- data/doc/TaskJuggler/TextScanner/MacroStackEntry.html +15 -9
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +102 -96
- data/doc/TaskJuggler/TimeSheet.html +123 -117
- data/doc/TaskJuggler/TimeSheetReceiver.html +28 -22
- data/doc/TaskJuggler/TimeSheetRecord.html +212 -206
- data/doc/TaskJuggler/TimeSheetReport.html +206 -199
- data/doc/TaskJuggler/TimeSheetSender.html +27 -21
- data/doc/TaskJuggler/TimeSheetSummary.html +140 -134
- data/doc/TaskJuggler/TimeSheets.html +20 -14
- data/doc/TaskJuggler/Tj3AppBase.html +100 -94
- data/doc/TaskJuggler/Tj3Client.html +407 -483
- data/doc/TaskJuggler/Tj3Daemon.html +116 -107
- data/doc/TaskJuggler/Tj3SheetAppBase.html +45 -39
- data/doc/TaskJuggler/Tj3SsReceiver.html +31 -25
- data/doc/TaskJuggler/Tj3SsSender.html +64 -58
- data/doc/TaskJuggler/Tj3TsReceiver.html +31 -25
- data/doc/TaskJuggler/Tj3TsSender.html +51 -45
- data/doc/TaskJuggler/Tj3TsSummary.html +59 -53
- data/doc/TaskJuggler/TjException.html +13 -7
- data/doc/TaskJuggler/TjTime.html +444 -438
- data/doc/TaskJuggler/TjpExample.html +84 -78
- data/doc/TaskJuggler/TjpExportRE.html +356 -349
- data/doc/TaskJuggler/TjpSyntaxRules.html +4279 -4151
- data/doc/TaskJuggler/URLParameter.html +16 -10
- data/doc/TaskJuggler/UserManual.html +185 -179
- data/doc/TaskJuggler/VimSyntax.html +144 -138
- data/doc/TaskJuggler/WebServer.html +46 -39
- data/doc/TaskJuggler/WelcomePage.html +769 -0
- data/doc/TaskJuggler/WorkingHours.html +185 -179
- data/doc/TaskJuggler/WorkingHoursAttribute.html +42 -36
- data/doc/TaskJuggler/XMLBlob.html +21 -15
- data/doc/TaskJuggler/XMLComment.html +17 -11
- data/doc/TaskJuggler/XMLDocument.html +33 -27
- data/doc/TaskJuggler/XMLElement.html +97 -91
- data/doc/TaskJuggler/XMLNamedText.html +13 -7
- data/doc/TaskJuggler/XMLText.html +32 -26
- data/doc/index.html +601 -563
- data/doc/lib/AccountScenario_rb.html +5 -3
- data/doc/lib/Account_rb.html +5 -3
- data/doc/lib/Allocation_rb.html +5 -3
- data/doc/lib/AppConfig_rb.html +5 -3
- data/doc/lib/AttributeBase_rb.html +5 -3
- data/doc/lib/AttributeDefinition_rb.html +5 -3
- data/doc/lib/Attributes_rb.html +5 -3
- data/doc/lib/BatchProcessor_rb.html +5 -3
- data/doc/lib/Booking_rb.html +5 -3
- data/doc/lib/ChargeSet_rb.html +5 -3
- data/doc/lib/Charge_rb.html +5 -3
- data/doc/lib/DataCache_rb.html +5 -3
- data/doc/lib/FileList_rb.html +5 -3
- data/doc/lib/HTMLDocument_rb.html +5 -3
- data/doc/lib/IntervalList_rb.html +69 -0
- data/doc/lib/Interval_rb.html +5 -3
- data/doc/lib/Journal_rb.html +5 -3
- data/doc/lib/KeywordArray_rb.html +5 -3
- data/doc/lib/KeywordDocumentation_rb.html +5 -3
- data/doc/lib/Limits_rb.html +5 -3
- data/doc/lib/LogFile_rb.html +5 -3
- data/doc/lib/Log_rb.html +5 -3
- data/doc/lib/LogicalExpression_rb.html +5 -3
- data/doc/lib/LogicalFunction_rb.html +5 -3
- data/doc/lib/LogicalOperation_rb.html +5 -3
- data/doc/lib/MacroTable_rb.html +5 -3
- data/doc/lib/MessageHandler_rb.html +5 -3
- data/doc/lib/ProjectFileParser_rb.html +5 -3
- data/doc/lib/ProjectFileScanner_rb.html +5 -3
- data/doc/lib/Project_rb.html +5 -3
- data/doc/lib/PropertyList_rb.html +5 -3
- data/doc/lib/PropertySet_rb.html +5 -3
- data/doc/lib/PropertyTreeNode_rb.html +5 -3
- data/doc/lib/Query_rb.html +5 -3
- data/doc/lib/RTFHandlers_rb.html +5 -3
- data/doc/lib/RTFNavigator_rb.html +5 -3
- data/doc/lib/RTFQuery_rb.html +5 -3
- data/doc/lib/RTFReportLink_rb.html +5 -3
- data/doc/lib/RTFReport_rb.html +5 -3
- data/doc/lib/RTFWithQuerySupport_rb.html +5 -3
- data/doc/lib/RealFormat_rb.html +5 -3
- data/doc/lib/ResourceScenario_rb.html +5 -3
- data/doc/lib/Resource_rb.html +5 -3
- data/doc/lib/RichTextDocument_rb.html +5 -3
- data/doc/lib/RichTextElement_rb.html +5 -3
- data/doc/lib/RichTextFunctionExample_rb.html +5 -3
- data/doc/lib/RichTextFunctionHandler_rb.html +5 -3
- data/doc/lib/RichTextParser_rb.html +5 -3
- data/doc/lib/RichTextScanner_rb.html +5 -3
- data/doc/lib/RichTextSnip_rb.html +5 -3
- data/doc/lib/RichTextSyntaxRules_rb.html +5 -3
- data/doc/lib/RichText_rb.html +5 -3
- data/doc/lib/RuntimeConfig_rb.html +5 -3
- data/doc/lib/ScenarioData_rb.html +5 -3
- data/doc/lib/Scenario_rb.html +5 -3
- data/doc/lib/Scoreboard_rb.html +7 -3
- data/doc/lib/SheetHandlerBase_rb.html +5 -3
- data/doc/lib/SheetReceiver_rb.html +5 -3
- data/doc/lib/SheetSender_rb.html +5 -3
- data/doc/lib/ShiftAssignments_rb.html +5 -3
- data/doc/lib/ShiftScenario_rb.html +5 -3
- data/doc/lib/Shift_rb.html +5 -3
- data/doc/lib/SimpleQueryExpander_rb.html +5 -3
- data/doc/lib/SourceFileInfo_rb.html +5 -3
- data/doc/lib/StatusSheetReceiver_rb.html +5 -3
- data/doc/lib/StatusSheetSender_rb.html +5 -3
- data/doc/lib/SyntaxReference_rb.html +5 -3
- data/doc/lib/TOCEntry_rb.html +5 -3
- data/doc/lib/TableColumnDefinition_rb.html +5 -3
- data/doc/lib/TableOfContents_rb.html +5 -3
- data/doc/lib/TaskDependency_rb.html +5 -3
- data/doc/lib/TaskJuggler_rb.html +5 -3
- data/doc/lib/TaskScenario_rb.html +5 -3
- data/doc/lib/Task_rb.html +5 -3
- data/doc/lib/TextFormatter_rb.html +6 -4
- data/doc/lib/TextParser/Pattern_rb.html +5 -3
- data/doc/lib/TextParser/Rule_rb.html +5 -3
- data/doc/lib/TextParser/StackElement_rb.html +5 -3
- data/doc/lib/TextParser/State_rb.html +6 -4
- data/doc/lib/TextParser/TokenDoc_rb.html +5 -3
- data/doc/lib/TextParser_rb.html +5 -3
- data/doc/lib/TextScanner_rb.html +5 -3
- data/doc/lib/TimeSheetReceiver_rb.html +5 -3
- data/doc/lib/TimeSheetSender_rb.html +5 -3
- data/doc/lib/TimeSheetSummary_rb.html +6 -4
- data/doc/lib/TimeSheets_rb.html +5 -3
- data/doc/lib/Tj3AppBase_rb.html +5 -3
- data/doc/lib/Tj3Config_rb.html +5 -3
- data/doc/lib/Tj3SheetAppBase_rb.html +5 -3
- data/doc/lib/TjException_rb.html +5 -3
- data/doc/lib/TjTime_rb.html +5 -3
- data/doc/lib/TjpExample_rb.html +5 -3
- data/doc/lib/TjpSyntaxRules_rb.html +5 -3
- data/doc/lib/URLParameter_rb.html +5 -3
- data/doc/lib/UTF8String_rb.html +5 -3
- data/doc/lib/UserManual_rb.html +5 -3
- data/doc/lib/VimSyntax_rb.html +6 -4
- data/doc/lib/WorkingHours_rb.html +5 -3
- data/doc/lib/XMLDocument_rb.html +5 -3
- data/doc/lib/XMLElement_rb.html +5 -3
- data/doc/lib/daemon/Daemon_rb.html +5 -3
- data/doc/lib/daemon/ProcessIntercom_rb.html +7 -3
- data/doc/lib/daemon/ProjectBroker_rb.html +5 -3
- data/doc/lib/daemon/ProjectServer_rb.html +5 -3
- data/doc/lib/daemon/ReportServer_rb.html +5 -3
- data/doc/lib/daemon/ReportServlet_rb.html +69 -0
- data/doc/lib/daemon/WebServer_rb.html +9 -3
- data/doc/lib/daemon/WelcomePage_rb.html +71 -0
- data/doc/lib/deep_copy_rb.html +5 -3
- data/doc/lib/reports/CSVFile_rb.html +5 -3
- data/doc/lib/reports/CollisionDetector_rb.html +5 -3
- data/doc/lib/reports/ColumnTable_rb.html +5 -3
- data/doc/lib/reports/GanttChart_rb.html +5 -3
- data/doc/lib/reports/GanttContainer_rb.html +5 -3
- data/doc/lib/reports/GanttHeaderScaleItem_rb.html +5 -3
- data/doc/lib/reports/GanttHeader_rb.html +5 -3
- data/doc/lib/reports/GanttLine_rb.html +5 -3
- data/doc/lib/reports/GanttLoadStack_rb.html +5 -3
- data/doc/lib/reports/GanttMilestone_rb.html +5 -3
- data/doc/lib/reports/GanttRouter_rb.html +5 -3
- data/doc/lib/reports/GanttTaskBar_rb.html +5 -3
- data/doc/lib/reports/HTMLGraphics_rb.html +5 -3
- data/doc/lib/reports/Navigator_rb.html +5 -3
- data/doc/lib/reports/NikuReport_rb.html +5 -3
- data/doc/lib/reports/ReportBase_rb.html +5 -3
- data/doc/lib/reports/ReportContext_rb.html +5 -3
- data/doc/lib/reports/ReportTableCell_rb.html +5 -3
- data/doc/lib/reports/ReportTableColumn_rb.html +5 -3
- data/doc/lib/reports/ReportTableLegend_rb.html +5 -3
- data/doc/lib/reports/ReportTableLine_rb.html +5 -3
- data/doc/lib/reports/ReportTable_rb.html +5 -3
- data/doc/lib/reports/Report_rb.html +5 -3
- data/doc/lib/reports/ResourceListRE_rb.html +5 -3
- data/doc/lib/reports/StatusSheetReport_rb.html +5 -3
- data/doc/lib/reports/TableReport_rb.html +5 -3
- data/doc/lib/reports/TaskListRE_rb.html +5 -3
- data/doc/lib/reports/TextReport_rb.html +5 -3
- data/doc/lib/reports/TimeSheetReport_rb.html +5 -3
- data/doc/lib/reports/TjpExportRE_rb.html +5 -3
- data/doc/lib/{taskjuggler3_rb.html → tj3_rb.html} +7 -5
- data/doc/lib/tj3client_rb.html +5 -3
- data/doc/lib/tj3d_rb.html +6 -4
- data/doc/lib/tj3man_rb.html +5 -3
- data/doc/lib/tj3ss_receiver_rb.html +5 -3
- data/doc/lib/tj3ss_sender_rb.html +5 -3
- data/doc/lib/tj3ts_receiver_rb.html +5 -3
- data/doc/lib/tj3ts_sender_rb.html +5 -3
- data/doc/lib/tj3ts_summary_rb.html +5 -3
- data/examples/tutorial.tjp +13 -5
- data/gem_spec.rb +3 -0
- data/lib/Account.rb +2 -1
- data/lib/AccountScenario.rb +2 -1
- data/lib/Allocation.rb +2 -1
- data/lib/AppConfig.rb +2 -1
- data/lib/AttributeBase.rb +19 -5
- data/lib/AttributeDefinition.rb +2 -1
- data/lib/Attributes.rb +49 -38
- data/lib/BatchProcessor.rb +2 -1
- data/lib/Booking.rb +2 -1
- data/lib/Charge.rb +2 -1
- data/lib/ChargeSet.rb +2 -1
- data/lib/DataCache.rb +15 -1
- data/lib/FileList.rb +2 -1
- data/lib/HTMLDocument.rb +2 -1
- data/lib/Interval.rb +2 -1
- data/lib/IntervalList.rb +100 -0
- data/lib/Journal.rb +8 -2
- data/lib/KeywordArray.rb +2 -1
- data/lib/KeywordDocumentation.rb +10 -6
- data/lib/Limits.rb +2 -1
- data/lib/Log.rb +3 -2
- data/lib/LogFile.rb +2 -1
- data/lib/LogicalExpression.rb +2 -1
- data/lib/LogicalFunction.rb +2 -1
- data/lib/LogicalOperation.rb +2 -1
- data/lib/MacroTable.rb +2 -1
- data/lib/MessageHandler.rb +2 -1
- data/lib/Project.rb +92 -25
- data/lib/ProjectFileParser.rb +7 -2
- data/lib/ProjectFileScanner.rb +2 -1
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +2 -6
- data/lib/PropertyTreeNode.rb +22 -44
- data/lib/Query.rb +32 -13
- data/lib/RTFHandlers.rb +2 -1
- data/lib/RTFNavigator.rb +2 -1
- data/lib/RTFQuery.rb +3 -2
- data/lib/RTFReport.rb +2 -1
- data/lib/RTFReportLink.rb +2 -1
- data/lib/RTFWithQuerySupport.rb +2 -1
- data/lib/RealFormat.rb +2 -1
- data/lib/Resource.rb +2 -1
- data/lib/ResourceScenario.rb +35 -14
- data/lib/RichText.rb +2 -1
- data/lib/RichTextDocument.rb +2 -1
- data/lib/RichTextElement.rb +2 -1
- data/lib/RichTextFunctionExample.rb +2 -1
- data/lib/RichTextFunctionHandler.rb +2 -1
- data/lib/RichTextParser.rb +2 -1
- data/lib/RichTextScanner.rb +2 -1
- data/lib/RichTextSnip.rb +2 -1
- data/lib/RichTextSyntaxRules.rb +2 -1
- data/lib/RuntimeConfig.rb +2 -1
- data/lib/Scenario.rb +2 -1
- data/lib/ScenarioData.rb +2 -1
- data/lib/Scoreboard.rb +27 -8
- data/lib/SheetHandlerBase.rb +2 -1
- data/lib/SheetReceiver.rb +2 -1
- data/lib/SheetSender.rb +2 -1
- data/lib/Shift.rb +2 -1
- data/lib/ShiftAssignments.rb +2 -1
- data/lib/ShiftScenario.rb +2 -1
- data/lib/SimpleQueryExpander.rb +2 -1
- data/lib/SourceFileInfo.rb +2 -1
- data/lib/StatusSheetReceiver.rb +2 -1
- data/lib/StatusSheetSender.rb +2 -1
- data/lib/SyntaxReference.rb +2 -1
- data/lib/TOCEntry.rb +2 -1
- data/lib/TableColumnDefinition.rb +9 -2
- data/lib/TableOfContents.rb +2 -1
- data/lib/Task.rb +2 -1
- data/lib/TaskDependency.rb +2 -1
- data/lib/TaskJuggler.rb +8 -6
- data/lib/TaskScenario.rb +337 -153
- data/lib/TextFormatter.rb +3 -2
- data/lib/TextParser.rb +7 -2
- data/lib/TextParser/Pattern.rb +2 -1
- data/lib/TextParser/Rule.rb +2 -1
- data/lib/TextParser/StackElement.rb +2 -1
- data/lib/TextParser/State.rb +3 -2
- data/lib/TextParser/TokenDoc.rb +2 -1
- data/lib/TextScanner.rb +12 -5
- data/lib/TimeSheetReceiver.rb +2 -1
- data/lib/TimeSheetSender.rb +2 -1
- data/lib/TimeSheetSummary.rb +3 -2
- data/lib/TimeSheets.rb +2 -1
- data/lib/Tj3AppBase.rb +6 -5
- data/lib/Tj3Config.rb +5 -4
- data/lib/Tj3SheetAppBase.rb +2 -1
- data/lib/TjException.rb +2 -1
- data/lib/TjTime.rb +2 -1
- data/lib/TjpExample.rb +2 -1
- data/lib/TjpSyntaxRules.rb +264 -65
- data/lib/URLParameter.rb +2 -1
- data/lib/UTF8String.rb +2 -1
- data/lib/UserManual.rb +2 -1
- data/lib/VimSyntax.rb +3 -2
- data/lib/WorkingHours.rb +2 -1
- data/lib/XMLDocument.rb +2 -1
- data/lib/XMLElement.rb +2 -1
- data/lib/daemon/Daemon.rb +3 -1
- data/lib/daemon/ProcessIntercom.rb +3 -1
- data/lib/daemon/ProjectBroker.rb +84 -32
- data/lib/daemon/ProjectServer.rb +5 -3
- data/lib/daemon/ReportServer.rb +8 -5
- data/lib/daemon/ReportServlet.rb +166 -0
- data/lib/daemon/WebServer.rb +6 -150
- data/lib/daemon/WelcomePage.rb +80 -0
- data/lib/deep_copy.rb +2 -1
- data/lib/reports/CSVFile.rb +2 -1
- data/lib/reports/CollisionDetector.rb +2 -1
- data/lib/reports/ColumnTable.rb +2 -1
- data/lib/reports/GanttChart.rb +2 -1
- data/lib/reports/GanttContainer.rb +3 -4
- data/lib/reports/GanttHeader.rb +2 -1
- data/lib/reports/GanttHeaderScaleItem.rb +2 -1
- data/lib/reports/GanttLine.rb +12 -10
- data/lib/reports/GanttLoadStack.rb +2 -1
- data/lib/reports/GanttMilestone.rb +3 -3
- data/lib/reports/GanttRouter.rb +4 -1
- data/lib/reports/GanttTaskBar.rb +9 -7
- data/lib/reports/HTMLGraphics.rb +2 -1
- data/lib/reports/Navigator.rb +2 -1
- data/lib/reports/NikuReport.rb +79 -49
- data/lib/reports/Report.rb +42 -10
- data/lib/reports/ReportBase.rb +2 -1
- data/lib/reports/ReportContext.rb +2 -1
- data/lib/reports/ReportTable.rb +2 -1
- data/lib/reports/ReportTableCell.rb +63 -28
- data/lib/reports/ReportTableColumn.rb +2 -1
- data/lib/reports/ReportTableLegend.rb +5 -5
- data/lib/reports/ReportTableLine.rb +2 -1
- data/lib/reports/ResourceListRE.rb +2 -1
- data/lib/reports/StatusSheetReport.rb +4 -2
- data/lib/reports/TableReport.rb +42 -38
- data/lib/reports/TaskListRE.rb +4 -2
- data/lib/reports/TextReport.rb +2 -1
- data/lib/reports/TimeSheetReport.rb +4 -2
- data/lib/reports/TjpExportRE.rb +4 -2
- data/lib/{taskjuggler3.rb → tj3.rb} +6 -5
- data/lib/tj3client.rb +19 -36
- data/lib/tj3d.rb +6 -2
- data/lib/tj3man.rb +4 -3
- data/lib/tj3ss_receiver.rb +2 -1
- data/lib/tj3ss_sender.rb +2 -1
- data/lib/tj3ts_receiver.rb +2 -1
- data/lib/tj3ts_sender.rb +2 -1
- data/lib/tj3ts_summary.rb +2 -1
- data/manual/Day_To_Day_Juggling +36 -0
- data/manual/How_To_Contribute +9 -4
- data/manual/Installation +10 -3
- data/manual/TaskJuggler_Internals +0 -2
- data/manual/Tutorial +25 -3
- data/prj_cfg.rb +4 -2
- data/spec/IntervalList_spec.rb +138 -0
- data/spec/ProjectBroker_spec.rb +133 -0
- data/tasks/changelog.rake +41 -24
- data/tasks/csts.rake +1 -0
- data/tasks/gem.rake +1 -0
- data/tasks/rcov.rake +1 -1
- data/tasks/spec.rake +7 -0
- data/tasks/test.rake +1 -0
- data/test/MessageChecker.rb +2 -1
- data/test/TestSuite/CSV-Reports/niku.tjp +70 -0
- data/test/TestSuite/CSV-Reports/{celltext-Reference.csv → refs/celltext.csv} +0 -0
- data/test/TestSuite/CSV-Reports/refs/niku.csv +5 -0
- data/test/TestSuite/CSV-Reports/{resourcereport-Reference.csv → refs/resourcereport.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{resourcereport_with_tasks-Reference.csv → refs/resourcereport_with_tasks.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortByTree-Reference.csv → refs/sortByTree.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_duration.down-Reference.csv → refs/sortBy_duration.down.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_effort.up-Reference.csv → refs/sortBy_effort.up.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{sortBy_plan.start.down-Reference.csv → refs/sortBy_plan.start.down.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{taskreport-Reference.csv → refs/taskreport.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{taskreport_with_resources-Reference.csv → refs/taskreport_with_resources.csv} +0 -0
- data/test/TestSuite/CSV-Reports/{weekly-Reference.csv → refs/weekly.csv} +0 -0
- data/test/TestSuite/HTML-Reports/Alerts.tjp +12 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -2
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +1 -2
- data/test/TestSuite/Scheduler/Correct/InheritedAttributes.tjp +77 -0
- data/test/TestSuite/Scheduler/Correct/WeakDeps.tjp +40 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_12.tjp +2 -2
- data/test/TestSuite/Scheduler/Errors/loop_detected_13.tjp +3 -4
- data/test/TestSuite/Scheduler/Errors/loop_detected_3.tjp +2 -2
- data/test/TestSuite/Scheduler/Errors/loop_detected_6.tjp +8 -7
- data/test/TestSuite/Scheduler/Errors/onend_wrong_direction.tjp +19 -0
- data/test/TestSuite/Scheduler/Errors/onstart_wrong_direction.tjp +18 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_multi.tjp +1 -2
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/boss_2002-03-02.tji +46 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/dev2_2002-03-02.tji +22 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/2002-03-02/resources.yml +11 -0
- data/test/TestSuite/StatusSheets/StatusSheetTemplates/acceptable_intervals +1 -0
- data/test/TestSuite/StatusSheets/sender.log +256 -0
- data/test/TestSuite/StatusSheets/statussheets.log +9 -0
- data/test/TestSuite/StatusSheets/tj3d.log +395 -0
- data/test/TestSuite/Syntax/Correct/Limits-1.tjp +2 -0
- data/test/TestSuite/Syntax/Correct/Niku.tjp +6 -1
- data/test/TestSuite/Syntax/Correct/Scenario.tjp +4 -1
- data/test/TestSuite/Syntax/Correct/Supplement.tjp +12 -5
- data/test/TestSuite/Syntax/Correct/TaskPrefix.tji +3 -0
- data/test/TestSuite/Syntax/Correct/TaskPrefix.tjp +24 -0
- data/test/TestSuite/Syntax/Correct/css/tjreport.css +7 -2
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +15 -5
- data/test/all.rb +2 -4
- data/test/test_BatchProcessor.rb +2 -1
- data/test/test_CSV-Reports.rb +34 -23
- data/test/test_CSVFile.rb +2 -1
- data/test/test_CollisionDetector.rb +3 -2
- data/test/test_Journal.rb +2 -1
- data/test/test_Limits.rb +2 -1
- data/test/test_LogicalExpression.rb +2 -1
- data/test/test_MacroTable.rb +2 -1
- data/test/test_Project.rb +3 -2
- data/test/test_ProjectFileScanner.rb +2 -1
- data/test/test_PropertySet.rb +2 -1
- data/test/test_Query.rb +2 -1
- data/test/test_RealFormat.rb +2 -1
- data/test/test_ReportGenerator.rb +2 -1
- data/test/test_RichText.rb +2 -1
- data/test/test_Scheduler.rb +2 -1
- data/test/test_ShiftAssignments.rb +2 -1
- data/test/test_SimpleQueryExpander.rb +2 -1
- data/test/test_Syntax.rb +2 -1
- data/test/test_TextFormatter.rb +3 -2
- data/test/test_TjTime.rb +2 -1
- data/test/test_TjpExample.rb +2 -1
- data/test/test_URLParameter.rb +2 -1
- data/test/test_UTF8String.rb +2 -1
- data/test/test_WorkingHours.rb +2 -1
- data/test/test_deep_copy.rb +2 -1
- metadata +74 -20
- data/doc/StringIO.html +0 -595
- data/test/TestSuite/Scheduler/Errors/loop_detected_7.tjp +0 -46
- data/test/TestSuite/Scheduler/Errors/loop_detected_8.tjp +0 -51
- data/test/TestSuite/Scheduler/Errors/multiple_durations.tjp +0 -11
|
@@ -107,6 +107,8 @@
|
|
|
107
107
|
|
|
108
108
|
<li><a href="#method-i-scenarioSpecific%3F">#scenarioSpecific?</a></li>
|
|
109
109
|
|
|
110
|
+
<li><a href="#method-i-setCustomCellAttributes">#setCustomCellAttributes</a></li>
|
|
111
|
+
|
|
110
112
|
<li><a href="#method-i-setIndent">#setIndent</a></li>
|
|
111
113
|
|
|
112
114
|
<li><a href="#method-i-setReportPeriod">#setReportPeriod</a></li>
|
|
@@ -179,6 +181,8 @@
|
|
|
179
181
|
|
|
180
182
|
<li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li>
|
|
181
183
|
|
|
184
|
+
<li><a href="../TaskJuggler/AttributeOverwrite.html">TaskJuggler::AttributeOverwrite</a></li>
|
|
185
|
+
|
|
182
186
|
<li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li>
|
|
183
187
|
|
|
184
188
|
<li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li>
|
|
@@ -257,6 +261,8 @@
|
|
|
257
261
|
|
|
258
262
|
<li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li>
|
|
259
263
|
|
|
264
|
+
<li><a href="../TaskJuggler/IntervalList.html">TaskJuggler::IntervalList</a></li>
|
|
265
|
+
|
|
260
266
|
<li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li>
|
|
261
267
|
|
|
262
268
|
<li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li>
|
|
@@ -289,6 +295,8 @@
|
|
|
289
295
|
|
|
290
296
|
<li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li>
|
|
291
297
|
|
|
298
|
+
<li><a href="../TaskJuggler/LogicalExpressionListAttribute.html">TaskJuggler::LogicalExpressionListAttribute</a></li>
|
|
299
|
+
|
|
292
300
|
<li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li>
|
|
293
301
|
|
|
294
302
|
<li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li>
|
|
@@ -569,6 +577,8 @@
|
|
|
569
577
|
|
|
570
578
|
<li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
|
|
571
579
|
|
|
580
|
+
<li><a href="../TaskJuggler/WelcomePage.html">TaskJuggler::WelcomePage</a></li>
|
|
581
|
+
|
|
572
582
|
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
|
573
583
|
|
|
574
584
|
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
|
@@ -595,8 +605,6 @@
|
|
|
595
605
|
|
|
596
606
|
<li><a href="../String.html">String</a></li>
|
|
597
607
|
|
|
598
|
-
<li><a href="../StringIO.html">StringIO</a></li>
|
|
599
|
-
|
|
600
608
|
</ul>
|
|
601
609
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
602
610
|
</div>
|
|
@@ -672,16 +680,16 @@ Returns the default column title for the columns <em>id</em>.
|
|
|
672
680
|
<div class="method-source-code"
|
|
673
681
|
id="default-olumn-itle-source">
|
|
674
682
|
<pre>
|
|
675
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
683
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 134</span>
|
|
684
|
+
134: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">TableReport</span><span class="ruby-operator">::</span><span class="ruby-identifier">defaultColumnTitle</span>(<span class="ruby-identifier">id</span>)
|
|
685
|
+
135: <span class="ruby-comment cmt"># Return an empty string for some special columns that don't have a fixed</span>
|
|
686
|
+
136: <span class="ruby-comment cmt"># title.</span>
|
|
687
|
+
137: <span class="ruby-identifier">specials</span> = <span class="ruby-node">%( chart hourly daily weekly monthly quarterly yearly)</span>
|
|
688
|
+
138: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">specials</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>)
|
|
689
|
+
139:
|
|
690
|
+
140: <span class="ruby-comment cmt"># Return the title for build-in hardwired columns.</span>
|
|
691
|
+
141: <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">@@propertiesById</span>[<span class="ruby-identifier">id</span>][<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
|
692
|
+
142: <span class="ruby-keyword kw">end</span></pre>
|
|
685
693
|
</div>
|
|
686
694
|
|
|
687
695
|
</div>
|
|
@@ -714,18 +722,18 @@ Generate a new <a href="TableReport.html">TableReport</a> object.
|
|
|
714
722
|
<div class="method-source-code"
|
|
715
723
|
id="new-source">
|
|
716
724
|
<pre>
|
|
717
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
725
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 72</span>
|
|
726
|
+
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">report</span>)
|
|
727
|
+
73: <span class="ruby-keyword kw">super</span>
|
|
728
|
+
74: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>
|
|
729
|
+
75:
|
|
730
|
+
76: <span class="ruby-comment cmt"># Reference to the intermediate representation.</span>
|
|
731
|
+
77: <span class="ruby-ivar">@table</span> = <span class="ruby-keyword kw">nil</span>
|
|
732
|
+
78: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
733
|
+
79:
|
|
734
|
+
80: <span class="ruby-ivar">@legend</span> = <span class="ruby-constant">ReportTableLegend</span>.<span class="ruby-identifier">new</span>
|
|
735
|
+
81:
|
|
736
|
+
82: <span class="ruby-keyword kw">end</span></pre>
|
|
729
737
|
</div>
|
|
730
738
|
|
|
731
739
|
</div>
|
|
@@ -765,16 +773,16 @@ Return the alignment of the column based on the <em>colId</em> or the
|
|
|
765
773
|
<div class="method-source-code"
|
|
766
774
|
id="alignment-source">
|
|
767
775
|
<pre>
|
|
768
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 158</span>
|
|
777
|
+
158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alignment</span>(<span class="ruby-identifier">colId</span>, <span class="ruby-identifier">propertyType</span>)
|
|
778
|
+
159: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
779
|
+
160: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">2</span>]
|
|
780
|
+
161: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">@@propertiesByType</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">propertyType</span>)
|
|
781
|
+
162: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesByType</span>[<span class="ruby-identifier">propertyType</span>][<span class="ruby-value">1</span>]
|
|
782
|
+
163: <span class="ruby-keyword kw">else</span>
|
|
783
|
+
164: <span class="ruby-value">:center</span>
|
|
784
|
+
165: <span class="ruby-keyword kw">end</span>
|
|
785
|
+
166: <span class="ruby-keyword kw">end</span></pre>
|
|
778
786
|
</div>
|
|
779
787
|
|
|
780
788
|
</div>
|
|
@@ -808,10 +816,10 @@ to be calculated.
|
|
|
808
816
|
<div class="method-source-code"
|
|
809
817
|
id="calculated--source">
|
|
810
818
|
<pre>
|
|
811
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
819
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 170</span>
|
|
820
|
+
170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculated?</span>(<span class="ruby-identifier">colId</span>)
|
|
821
|
+
171: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
822
|
+
172: <span class="ruby-keyword kw">end</span></pre>
|
|
815
823
|
</div>
|
|
816
824
|
|
|
817
825
|
</div>
|
|
@@ -842,10 +850,10 @@ to be calculated.
|
|
|
842
850
|
<div class="method-source-code"
|
|
843
851
|
id="generate-ntermediate-ormat-source">
|
|
844
852
|
<pre>
|
|
845
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
853
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 84</span>
|
|
854
|
+
84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
855
|
+
85: <span class="ruby-keyword kw">super</span>
|
|
856
|
+
86: <span class="ruby-keyword kw">end</span></pre>
|
|
849
857
|
</div>
|
|
850
858
|
|
|
851
859
|
</div>
|
|
@@ -879,16 +887,16 @@ or the <em>propertyType</em>.
|
|
|
879
887
|
<div class="method-source-code"
|
|
880
888
|
id="indent-source">
|
|
881
889
|
<pre>
|
|
882
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
890
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 146</span>
|
|
891
|
+
146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">indent</span>(<span class="ruby-identifier">colId</span>, <span class="ruby-identifier">propertyType</span>)
|
|
892
|
+
147: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
893
|
+
148: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">1</span>]
|
|
894
|
+
149: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">@@propertiesByType</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">propertyType</span>)
|
|
895
|
+
150: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesByType</span>[<span class="ruby-identifier">propertyType</span>][<span class="ruby-value">0</span>]
|
|
896
|
+
151: <span class="ruby-keyword kw">else</span>
|
|
897
|
+
152: <span class="ruby-keyword kw">false</span>
|
|
898
|
+
153: <span class="ruby-keyword kw">end</span>
|
|
899
|
+
154: <span class="ruby-keyword kw">end</span></pre>
|
|
892
900
|
</div>
|
|
893
901
|
|
|
894
902
|
</div>
|
|
@@ -922,13 +930,13 @@ are scenario specific.
|
|
|
922
930
|
<div class="method-source-code"
|
|
923
931
|
id="scenario-pecific--source">
|
|
924
932
|
<pre>
|
|
925
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
933
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 176</span>
|
|
934
|
+
176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">colId</span>)
|
|
935
|
+
177: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
936
|
+
178: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">3</span>]
|
|
937
|
+
179: <span class="ruby-keyword kw">end</span>
|
|
938
|
+
180: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
939
|
+
181: <span class="ruby-keyword kw">end</span></pre>
|
|
932
940
|
</div>
|
|
933
941
|
|
|
934
942
|
</div>
|
|
@@ -959,10 +967,10 @@ are scenario specific.
|
|
|
959
967
|
<div class="method-source-code"
|
|
960
968
|
id="supported-olumns-source">
|
|
961
969
|
<pre>
|
|
962
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
970
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 183</span>
|
|
971
|
+
183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supportedColumns</span>
|
|
972
|
+
184: <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">keys</span>
|
|
973
|
+
185: <span class="ruby-keyword kw">end</span></pre>
|
|
966
974
|
</div>
|
|
967
975
|
|
|
968
976
|
</div>
|
|
@@ -997,10 +1005,10 @@ column.
|
|
|
997
1005
|
<div class="method-source-code"
|
|
998
1006
|
id="to-csv-source">
|
|
999
1007
|
<pre>
|
|
1000
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1008
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 129</span>
|
|
1009
|
+
129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>
|
|
1010
|
+
130: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_csv</span>
|
|
1011
|
+
131: <span class="ruby-keyword kw">end</span></pre>
|
|
1004
1012
|
</div>
|
|
1005
1013
|
|
|
1006
1014
|
</div>
|
|
@@ -1034,44 +1042,44 @@ element tree.
|
|
|
1034
1042
|
<div class="method-source-code"
|
|
1035
1043
|
id="to-html-source">
|
|
1036
1044
|
<pre>
|
|
1037
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1045
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 89</span>
|
|
1046
|
+
89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_html</span>
|
|
1047
|
+
90: <span class="ruby-identifier">html</span> = []
|
|
1048
|
+
91:
|
|
1049
|
+
92: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">XMLComment</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Dynamic Report ID: "</span> <span class="ruby-operator">+</span>
|
|
1050
|
+
93: <span class="ruby-node">"#{@report.project.reportContexts.last.
|
|
1051
|
+
94: dynamicReportId}"</span>)
|
|
1052
|
+
95: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rt_to_html</span>(<span class="ruby-value str">'header'</span>)
|
|
1053
|
+
96: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tableFrame</span> = <span class="ruby-identifier">generateHtmlTableFrame</span>)
|
|
1054
|
+
97:
|
|
1055
|
+
98: <span class="ruby-comment cmt"># Now generate the actual table with the data.</span>
|
|
1056
|
+
99: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1057
|
+
100: <span class="ruby-identifier">td</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'td'</span>)
|
|
1058
|
+
101: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_html</span>
|
|
1059
|
+
102: <span class="ruby-identifier">td</span>
|
|
1060
|
+
103: <span class="ruby-keyword kw">end</span>
|
|
1061
|
+
104:
|
|
1062
|
+
105: <span class="ruby-comment cmt"># Embedd the caption as RichText into the table footer.</span>
|
|
1063
|
+
106: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>)
|
|
1064
|
+
107: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1065
|
+
108: <span class="ruby-identifier">td</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'td'</span>)
|
|
1066
|
+
109: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">div</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'div'</span>, <span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tj_table_caption'</span>))
|
|
1067
|
+
110: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>).<span class="ruby-identifier">sectionNumbers</span> = <span class="ruby-keyword kw">false</span>
|
|
1068
|
+
111: <span class="ruby-identifier">div</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>).<span class="ruby-identifier">to_html</span>
|
|
1069
|
+
112: <span class="ruby-identifier">td</span>
|
|
1070
|
+
113: <span class="ruby-keyword kw">end</span>
|
|
1071
|
+
114: <span class="ruby-keyword kw">end</span>
|
|
1072
|
+
115:
|
|
1073
|
+
116: <span class="ruby-comment cmt"># The legend.</span>
|
|
1074
|
+
117: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1075
|
+
118: <span class="ruby-identifier">td</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'td'</span>)
|
|
1076
|
+
119: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@legend</span>.<span class="ruby-identifier">to_html</span>
|
|
1077
|
+
120: <span class="ruby-identifier">td</span>
|
|
1078
|
+
121: <span class="ruby-keyword kw">end</span>
|
|
1079
|
+
122:
|
|
1080
|
+
123: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rt_to_html</span>(<span class="ruby-value str">'footer'</span>)
|
|
1081
|
+
124: <span class="ruby-identifier">html</span>
|
|
1082
|
+
125: <span class="ruby-keyword kw">end</span></pre>
|
|
1075
1083
|
</div>
|
|
1076
1084
|
|
|
1077
1085
|
</div>
|
|
@@ -1112,72 +1120,73 @@ is a list of scenario indexes.
|
|
|
1112
1120
|
<div class="method-source-code"
|
|
1113
1121
|
id="adjust-eport-eriod-source">
|
|
1114
1122
|
<pre>
|
|
1115
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1123
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 199</span>
|
|
1124
|
+
199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">adjustReportPeriod</span>(<span class="ruby-identifier">tasks</span>, <span class="ruby-identifier">scenarios</span>, <span class="ruby-identifier">columns</span>)
|
|
1125
|
+
200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span>
|
|
1126
|
+
201: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>) <span class="ruby-operator">!=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>) <span class="ruby-operator">!=</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]
|
|
1127
|
+
202:
|
|
1128
|
+
203: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
1129
|
+
204: <span class="ruby-identifier">scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">scenarioIdx</span><span class="ruby-operator">|</span>
|
|
1130
|
+
205: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
|
|
1131
|
+
206: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">scenarioIdx</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>]
|
|
1132
|
+
207: <span class="ruby-ivar">@start</span> = <span class="ruby-identifier">date</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@start</span>
|
|
1133
|
+
208: <span class="ruby-identifier">date</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">scenarioIdx</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>]
|
|
1134
|
+
209: <span class="ruby-ivar">@end</span> = <span class="ruby-identifier">date</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@end</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@end</span>
|
|
1135
|
+
210: <span class="ruby-keyword kw">end</span>
|
|
1136
|
+
211: <span class="ruby-keyword kw">end</span>
|
|
1137
|
+
212:
|
|
1138
|
+
213: <span class="ruby-comment cmt"># We want to add at least 5% on both ends.</span>
|
|
1139
|
+
214: <span class="ruby-identifier">margin</span> = <span class="ruby-value">0</span>
|
|
1140
|
+
215: <span class="ruby-identifier">minWidth</span> = <span class="ruby-ivar">@end</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
1141
|
+
216: <span class="ruby-identifier">columns</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
1142
|
+
217: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
1143
|
+
218: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
1144
|
+
219: <span class="ruby-comment cmt"># In case we have a 'chart' column, we enforce certain minimum width</span>
|
|
1145
|
+
220: <span class="ruby-comment cmt"># The following table contains an entry for each scale. The entry</span>
|
|
1146
|
+
221: <span class="ruby-comment cmt"># consists of the triple 'seconds per unit', 'minimum width units'</span>
|
|
1147
|
+
222: <span class="ruby-comment cmt"># and 'margin units'. The minimum with does not include the margins</span>
|
|
1148
|
+
223: <span class="ruby-comment cmt"># since they are always added.</span>
|
|
1149
|
+
224: <span class="ruby-identifier">mwMap</span> = {
|
|
1150
|
+
225: <span class="ruby-value str">'hour'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
1151
|
+
226: <span class="ruby-value str">'day'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
1152
|
+
227: <span class="ruby-value str">'week'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">7</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
1153
|
+
228: <span class="ruby-value str">'month'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">31</span>, <span class="ruby-value">10</span>, <span class="ruby-value">1</span> ],
|
|
1154
|
+
229: <span class="ruby-value str">'quarter'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">90</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
1155
|
+
230: <span class="ruby-value str">'year'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">365</span>, <span class="ruby-value">4</span>, <span class="ruby-value">1</span> ]
|
|
1156
|
+
231: }
|
|
1157
|
+
232: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">scale</span>]
|
|
1158
|
+
233: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown scale #{column.scale}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">entry</span>
|
|
1159
|
+
234: <span class="ruby-identifier">margin</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">2</span>]
|
|
1160
|
+
235: <span class="ruby-comment cmt"># If the with determined by start and end dates of the task is below</span>
|
|
1161
|
+
236: <span class="ruby-comment cmt"># the minimum width, we increase the width to the value provided by</span>
|
|
1162
|
+
237: <span class="ruby-comment cmt"># the table.</span>
|
|
1163
|
+
238: <span class="ruby-identifier">minWidth</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">minWidth</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>]
|
|
1164
|
+
239: <span class="ruby-keyword kw">break</span>
|
|
1165
|
+
240: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>, <span class="ruby-value str">'daily'</span>, <span class="ruby-value str">'weekly'</span>, <span class="ruby-value str">'monthly'</span>, <span class="ruby-value str">'quarterly'</span>, <span class="ruby-value str">'yearly'</span>
|
|
1166
|
+
241: <span class="ruby-comment cmt"># For the calendar columns we use a similar approach as we use for</span>
|
|
1167
|
+
242: <span class="ruby-comment cmt"># the 'chart' column.</span>
|
|
1168
|
+
243: <span class="ruby-identifier">mwMap</span> = {
|
|
1169
|
+
244: <span class="ruby-value str">'hourly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
1170
|
+
245: <span class="ruby-value str">'daily'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
1171
|
+
246: <span class="ruby-value str">'weekly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">7</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
1172
|
+
247: <span class="ruby-value str">'monthly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">31</span>, <span class="ruby-value">10</span>, <span class="ruby-value">1</span> ],
|
|
1173
|
+
248: <span class="ruby-value str">'quarterly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">90</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
1174
|
+
249: <span class="ruby-value str">'yearly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span> * <span class="ruby-value">365</span>, <span class="ruby-value">4</span>, <span class="ruby-value">1</span> ]
|
|
1175
|
+
250: }
|
|
1176
|
+
251: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>]
|
|
1177
|
+
252: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown scale #{column.id}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">entry</span>
|
|
1178
|
+
253: <span class="ruby-identifier">margin</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">2</span>]
|
|
1179
|
+
254: <span class="ruby-identifier">minWidth</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">minWidth</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] * <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>]
|
|
1180
|
+
255: <span class="ruby-keyword kw">break</span>
|
|
1181
|
+
256: <span class="ruby-keyword kw">end</span>
|
|
1182
|
+
257: <span class="ruby-keyword kw">end</span>
|
|
1183
|
+
258:
|
|
1184
|
+
259: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">minWidth</span> <span class="ruby-operator">></span> (<span class="ruby-ivar">@end</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
|
1185
|
+
260: <span class="ruby-identifier">margin</span> <span class="ruby-operator">+=</span> (<span class="ruby-identifier">minWidth</span> <span class="ruby-operator">-</span> (<span class="ruby-ivar">@end</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)) <span class="ruby-operator">/</span> <span class="ruby-value">2</span>
|
|
1186
|
+
261: <span class="ruby-keyword kw">end</span>
|
|
1187
|
+
262: <span class="ruby-ivar">@start</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">margin</span>
|
|
1188
|
+
263: <span class="ruby-ivar">@end</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">margin</span>
|
|
1189
|
+
264: <span class="ruby-keyword kw">end</span></pre>
|
|
1181
1190
|
</div>
|
|
1182
1191
|
|
|
1183
1192
|
</div>
|
|
@@ -1213,55 +1222,56 @@ to be taken to generate the header text.
|
|
|
1213
1222
|
<div class="method-source-code"
|
|
1214
1223
|
id="generate-eader-ell-source">
|
|
1215
1224
|
<pre>
|
|
1216
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1225
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 269</span>
|
|
1226
|
+
269: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHeaderCell</span>(<span class="ruby-identifier">columnDef</span>)
|
|
1227
|
+
270: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1228
|
+
271: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
1229
|
+
272: <span class="ruby-comment cmt"># For the 'chart' column we generate a GanttChart object. The sizes are</span>
|
|
1230
|
+
273: <span class="ruby-comment cmt"># set so that the lines of the Gantt chart line up with the lines of the</span>
|
|
1231
|
+
274: <span class="ruby-comment cmt"># table.</span>
|
|
1232
|
+
275: <span class="ruby-identifier">gantt</span> = <span class="ruby-constant">GanttChart</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'now'</span>),
|
|
1233
|
+
276: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'weekStartsMonday'</span>), <span class="ruby-keyword kw">self</span>)
|
|
1234
|
+
277: <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">generateByScale</span>(<span class="ruby-ivar">@start</span>, <span class="ruby-ivar">@end</span>, <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">scale</span>)
|
|
1235
|
+
278: <span class="ruby-comment cmt"># The header consists of 2 lines separated by a 1 pixel boundary.</span>
|
|
1236
|
+
279: <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">height</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">headerLineHeight</span> * <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
1237
|
+
280: <span class="ruby-comment cmt"># The maximum width of the chart. In case it needs more space, a</span>
|
|
1238
|
+
281: <span class="ruby-comment cmt"># scrollbar is shown or the chart gets truncated depending on the output</span>
|
|
1239
|
+
282: <span class="ruby-comment cmt"># format.</span>
|
|
1240
|
+
283: <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">viewWidth</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">:</span> <span class="ruby-value">450</span>
|
|
1241
|
+
284: <span class="ruby-identifier">column</span> = <span class="ruby-constant">ReportTableColumn</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@table</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-value str">''</span>)
|
|
1242
|
+
285: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span> = <span class="ruby-identifier">gantt</span>
|
|
1243
|
+
286: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
1244
|
+
287: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">scrollbar</span> = <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">hasScrollbar?</span>
|
|
1245
|
+
288: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1246
|
+
289: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>
|
|
1247
|
+
290: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>, <span class="ruby-value">:sameTimeNextHour</span>,
|
|
1248
|
+
291: <span class="ruby-value">:weekdayAndDate</span>, <span class="ruby-value">:hour</span>)
|
|
1249
|
+
292: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
1250
|
+
293: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>, <span class="ruby-value">:sameTimeNextDay</span>,
|
|
1251
|
+
294: <span class="ruby-value">:monthAndYear</span>, <span class="ruby-value">:day</span>)
|
|
1252
|
+
295: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'weekly'</span>
|
|
1253
|
+
296: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>,
|
|
1254
|
+
297: <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfWeek</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'weekStartsMonday'</span>)),
|
|
1255
|
+
298: <span class="ruby-value">:sameTimeNextWeek</span>, <span class="ruby-value">:monthAndYear</span>, <span class="ruby-value">:day</span>)
|
|
1256
|
+
299: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'monthly'</span>
|
|
1257
|
+
300: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfMonth</span>, <span class="ruby-value">:sameTimeNextMonth</span>,
|
|
1258
|
+
301: <span class="ruby-value">:year</span>, <span class="ruby-value">:shortMonthName</span>)
|
|
1259
|
+
302: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'quarterly'</span>
|
|
1260
|
+
303: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfQuarter</span>,
|
|
1261
|
+
304: <span class="ruby-value">:sameTimeNextQuarter</span>, <span class="ruby-value">:year</span>, <span class="ruby-value">:quarterName</span>)
|
|
1262
|
+
305: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'yearly'</span>
|
|
1263
|
+
306: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfYear</span>, <span class="ruby-value">:sameTimeNextYear</span>,
|
|
1264
|
+
307: <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">:year</span>)
|
|
1265
|
+
308: <span class="ruby-keyword kw">else</span>
|
|
1266
|
+
309: <span class="ruby-comment cmt"># This is the most common case. It does not need any special treatment.</span>
|
|
1267
|
+
310: <span class="ruby-comment cmt"># We just set the pre-defined or user-defined column title in the first</span>
|
|
1268
|
+
311: <span class="ruby-comment cmt"># row of the header. The 2nd row is not visible.</span>
|
|
1269
|
+
312: <span class="ruby-identifier">column</span> = <span class="ruby-constant">ReportTableColumn</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@table</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">title</span>)
|
|
1270
|
+
313: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">rows</span> = <span class="ruby-value">2</span>
|
|
1271
|
+
314: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
1272
|
+
315: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">width</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span>
|
|
1273
|
+
316: <span class="ruby-keyword kw">end</span>
|
|
1274
|
+
317: <span class="ruby-keyword kw">end</span></pre>
|
|
1265
1275
|
</div>
|
|
1266
1276
|
|
|
1267
1277
|
</div>
|
|
@@ -1298,67 +1308,67 @@ resource lines will be within the scope this task line.
|
|
|
1298
1308
|
<div class="method-source-code"
|
|
1299
1309
|
id="generate-esource-ist-source">
|
|
1300
1310
|
<pre>
|
|
1301
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1311
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 388</span>
|
|
1312
|
+
388: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">taskList</span>, <span class="ruby-identifier">scopeLine</span>)
|
|
1313
|
+
389: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1314
|
+
390: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>,
|
|
1315
|
+
391: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'loadUnit'</span>),
|
|
1316
|
+
392: <span class="ruby-value str">'numberFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'numberFormat'</span>),
|
|
1317
|
+
393: <span class="ruby-value str">'timeFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'timeFormat'</span>),
|
|
1318
|
+
394: <span class="ruby-value str">'currencyFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'currencyFormat'</span>),
|
|
1319
|
+
395: <span class="ruby-value str">'start'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@start</span>, <span class="ruby-value str">'end'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@end</span>,
|
|
1320
|
+
396: <span class="ruby-value str">'costAccount'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'costAccount'</span>),
|
|
1321
|
+
397: <span class="ruby-value str">'revenueAccount'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'revenueAccount'</span>) }
|
|
1322
|
+
398: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">query</span> = <span class="ruby-constant">Query</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">queryAttrs</span>)
|
|
1323
|
+
399: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
1324
|
+
400:
|
|
1325
|
+
401: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
1326
|
+
402: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
1327
|
+
403: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
1328
|
+
404: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">lineNo</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
|
|
1329
|
+
405: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
1330
|
+
406: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
1331
|
+
407: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">resource</span><span class="ruby-operator">|</span>
|
|
1332
|
+
408: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
1333
|
+
409: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
1334
|
+
410: <span class="ruby-identifier">query</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContexts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
1335
|
+
411: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">resource</span>
|
|
1336
|
+
412: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
|
1337
|
+
413:
|
|
1338
|
+
414: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1339
|
+
415: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">activity</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">%</span> <span class="ruby-value">10</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
1340
|
+
416: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1341
|
+
417: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scenarios'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">scenarioIdx</span><span class="ruby-operator">|</span>
|
|
1342
|
+
418: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
1343
|
+
419: <span class="ruby-comment cmt"># Generate line for each resource.</span>
|
|
1344
|
+
420: <span class="ruby-identifier">line</span> = <span class="ruby-constant">ReportTableLine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@table</span>, <span class="ruby-identifier">resource</span>, <span class="ruby-identifier">scopeLine</span>)
|
|
1345
|
+
421:
|
|
1346
|
+
422: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">no</span> = <span class="ruby-identifier">no</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">scopeLine</span>
|
|
1347
|
+
423: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1348
|
+
424: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1349
|
+
425: <span class="ruby-identifier">setIndent</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">a</span>(<span class="ruby-value str">'resourceRoot'</span>), <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">treeMode?</span>)
|
|
1350
|
+
426:
|
|
1351
|
+
427: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
1352
|
+
428: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'columns'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
1353
|
+
429: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
1354
|
+
430: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">generateTableCell</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">resource</span>, <span class="ruby-identifier">column</span>, <span class="ruby-identifier">query</span>)
|
|
1355
|
+
431: <span class="ruby-keyword kw">end</span>
|
|
1356
|
+
432: <span class="ruby-keyword kw">end</span>
|
|
1357
|
+
433:
|
|
1358
|
+
434: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">taskList</span>
|
|
1359
|
+
435: <span class="ruby-comment cmt"># If we have a taskList we generate nested lines for each of the</span>
|
|
1360
|
+
436: <span class="ruby-comment cmt"># tasks that the resource is assigned to and pass the user-defined</span>
|
|
1361
|
+
437: <span class="ruby-comment cmt"># filter.</span>
|
|
1362
|
+
438: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">setSorting</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'sortTasks'</span>))
|
|
1363
|
+
439: <span class="ruby-identifier">assignedTaskList</span> = <span class="ruby-identifier">filterTaskList</span>(<span class="ruby-identifier">taskList</span>, <span class="ruby-identifier">resource</span>,
|
|
1364
|
+
440: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'hideTask'</span>), <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rollupTask'</span>),
|
|
1365
|
+
441: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'openNodes'</span>))
|
|
1366
|
+
442: <span class="ruby-identifier">assignedTaskList</span>.<span class="ruby-identifier">sort!</span>
|
|
1367
|
+
443: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">generateTaskList</span>(<span class="ruby-identifier">assignedTaskList</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">line</span>)
|
|
1368
|
+
444: <span class="ruby-keyword kw">end</span>
|
|
1369
|
+
445: <span class="ruby-keyword kw">end</span>
|
|
1370
|
+
446: <span class="ruby-identifier">lineNo</span>
|
|
1371
|
+
447: <span class="ruby-keyword kw">end</span></pre>
|
|
1362
1372
|
</div>
|
|
1363
1373
|
|
|
1364
1374
|
</div>
|
|
@@ -1395,66 +1405,66 @@ generated task lines will be within the scope this resource line.
|
|
|
1395
1405
|
<div class="method-source-code"
|
|
1396
1406
|
id="generate-ask-ist-source">
|
|
1397
1407
|
<pre>
|
|
1398
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1408
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 324</span>
|
|
1409
|
+
324: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateTaskList</span>(<span class="ruby-identifier">taskList</span>, <span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">scopeLine</span>)
|
|
1410
|
+
325: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1411
|
+
326: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>,
|
|
1412
|
+
327: <span class="ruby-value str">'loadUnit'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'loadUnit'</span>),
|
|
1413
|
+
328: <span class="ruby-value str">'numberFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'numberFormat'</span>),
|
|
1414
|
+
329: <span class="ruby-value str">'timeFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'timeFormat'</span>),
|
|
1415
|
+
330: <span class="ruby-value str">'currencyFormat'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'currencyFormat'</span>),
|
|
1416
|
+
331: <span class="ruby-value str">'start'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@start</span>, <span class="ruby-value str">'end'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@end</span>,
|
|
1417
|
+
332: <span class="ruby-value str">'costAccount'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'costAccount'</span>),
|
|
1418
|
+
333: <span class="ruby-value str">'revenueAccount'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'revenueAccount'</span>) }
|
|
1419
|
+
334: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">query</span> = <span class="ruby-constant">Query</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">queryAttrs</span>)
|
|
1420
|
+
335: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">sort!</span>
|
|
1421
|
+
336:
|
|
1422
|
+
337: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
1423
|
+
338: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
1424
|
+
339: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
1425
|
+
340: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">lineNo</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
|
|
1426
|
+
341: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
1427
|
+
342: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
1428
|
+
343: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span>
|
|
1429
|
+
344: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
1430
|
+
345: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
1431
|
+
346: <span class="ruby-identifier">query</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContexts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
1432
|
+
347: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">task</span>
|
|
1433
|
+
348: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
|
1434
|
+
349:
|
|
1435
|
+
350: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1436
|
+
351: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">activity</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">%</span> <span class="ruby-value">10</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
1437
|
+
352: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1438
|
+
353: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scenarios'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">scenarioIdx</span><span class="ruby-operator">|</span>
|
|
1439
|
+
354: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
1440
|
+
355: <span class="ruby-comment cmt"># Generate line for each task.</span>
|
|
1441
|
+
356: <span class="ruby-identifier">line</span> = <span class="ruby-constant">ReportTableLine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@table</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">scopeLine</span>)
|
|
1442
|
+
357:
|
|
1443
|
+
358: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">no</span> = <span class="ruby-identifier">no</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">scopeLine</span>
|
|
1444
|
+
359: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1445
|
+
360: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1446
|
+
361: <span class="ruby-identifier">setIndent</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">a</span>(<span class="ruby-value str">'taskRoot'</span>), <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">treeMode?</span>)
|
|
1447
|
+
362:
|
|
1448
|
+
363: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
1449
|
+
364: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'columns'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">columnDef</span><span class="ruby-operator">|</span>
|
|
1450
|
+
365: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1451
|
+
366: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">generateTableCell</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">task</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">query</span>)
|
|
1452
|
+
367: <span class="ruby-keyword kw">end</span>
|
|
1453
|
+
368: <span class="ruby-keyword kw">end</span>
|
|
1454
|
+
369:
|
|
1455
|
+
370: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resourceList</span>
|
|
1456
|
+
371: <span class="ruby-comment cmt"># If we have a resourceList we generate nested lines for each of the</span>
|
|
1457
|
+
372: <span class="ruby-comment cmt"># resources that are assigned to this task and pass the user-defined</span>
|
|
1458
|
+
373: <span class="ruby-comment cmt"># filter.</span>
|
|
1459
|
+
374: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">setSorting</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'sortResources'</span>))
|
|
1460
|
+
375: <span class="ruby-identifier">assignedResourceList</span> = <span class="ruby-identifier">filterResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">task</span>,
|
|
1461
|
+
376: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'hideResource'</span>), <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rollupResource'</span>), <span class="ruby-identifier">a</span>(<span class="ruby-value str">'openNodes'</span>))
|
|
1462
|
+
377: <span class="ruby-identifier">assignedResourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
1463
|
+
378: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">generateResourceList</span>(<span class="ruby-identifier">assignedResourceList</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">line</span>)
|
|
1464
|
+
379: <span class="ruby-keyword kw">end</span>
|
|
1465
|
+
380: <span class="ruby-keyword kw">end</span>
|
|
1466
|
+
381: <span class="ruby-identifier">lineNo</span>
|
|
1467
|
+
382: <span class="ruby-keyword kw">end</span></pre>
|
|
1458
1468
|
</div>
|
|
1459
1469
|
|
|
1460
1470
|
</div>
|
|
@@ -1488,11 +1498,11 @@ been changed afterwards.
|
|
|
1488
1498
|
<div class="method-source-code"
|
|
1489
1499
|
id="set-eport-eriod-source">
|
|
1490
1500
|
<pre>
|
|
1491
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1501
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 191</span>
|
|
1502
|
+
191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReportPeriod</span>
|
|
1503
|
+
192: <span class="ruby-ivar">@start</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
|
|
1504
|
+
193: <span class="ruby-ivar">@end</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
|
|
1505
|
+
194: <span class="ruby-keyword kw">end</span></pre>
|
|
1496
1506
|
</div>
|
|
1497
1507
|
|
|
1498
1508
|
</div>
|
|
@@ -1532,13 +1542,13 @@ error. This could happen after scheduling errors.
|
|
|
1532
1542
|
<div class="method-source-code"
|
|
1533
1543
|
id="check-ell-ext-source">
|
|
1534
1544
|
<pre>
|
|
1535
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1545
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 1015</span>
|
|
1546
|
+
1015: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
1547
|
+
1016: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span>
|
|
1548
|
+
1017: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-value str">'<Error>'</span>
|
|
1549
|
+
1018: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontColor</span> = <span class="ruby-value str">'#FF0000'</span>
|
|
1550
|
+
1019: <span class="ruby-keyword kw">end</span>
|
|
1551
|
+
1020: <span class="ruby-keyword kw">end</span></pre>
|
|
1542
1552
|
</div>
|
|
1543
1553
|
|
|
1544
1554
|
</div>
|
|
@@ -1577,67 +1587,67 @@ the particular column.
|
|
|
1577
1587
|
<div class="method-source-code"
|
|
1578
1588
|
id="gen-al-hart-eader-source">
|
|
1579
1589
|
<pre>
|
|
1580
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
456:
|
|
1584
|
-
457: <span class="ruby-comment cmt"># Calendar chars only work when all lines have same height.</span>
|
|
1585
|
-
458: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1590
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 457</span>
|
|
1591
|
+
457: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">t</span>, <span class="ruby-identifier">sameTimeNextFunc</span>, <span class="ruby-identifier">name1Func</span>, <span class="ruby-identifier">name2Func</span>)
|
|
1592
|
+
458: <span class="ruby-identifier">tableColumn</span> = <span class="ruby-constant">ReportTableColumn</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@table</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-value str">''</span>)
|
|
1586
1593
|
459:
|
|
1587
|
-
460: <span class="ruby-comment cmt">#
|
|
1588
|
-
461: <span class="ruby-
|
|
1589
|
-
462:
|
|
1590
|
-
463:
|
|
1591
|
-
464: <span class="ruby-comment cmt">#
|
|
1592
|
-
465: <span class="ruby-identifier">tableColumn</span>.<span class="ruby-identifier">
|
|
1593
|
-
466:
|
|
1594
|
-
467: <span class="ruby-
|
|
1595
|
-
468: <span class="ruby-identifier">
|
|
1596
|
-
469:
|
|
1597
|
-
470: <span class="ruby-
|
|
1598
|
-
471: <span class="ruby-
|
|
1599
|
-
472:
|
|
1600
|
-
473: <span class="ruby-comment cmt">#
|
|
1601
|
-
474: <span class="ruby-
|
|
1602
|
-
475:
|
|
1603
|
-
476:
|
|
1604
|
-
477:
|
|
1605
|
-
478: <span class="ruby-identifier">
|
|
1606
|
-
479: <span class="ruby-comment cmt">#
|
|
1607
|
-
480: <span class="ruby-
|
|
1608
|
-
481: <span class="ruby-
|
|
1609
|
-
482:
|
|
1610
|
-
483:
|
|
1611
|
-
484:
|
|
1612
|
-
485:
|
|
1613
|
-
486: <span class="ruby-comment cmt">#
|
|
1614
|
-
487: <span class="ruby-identifier">
|
|
1615
|
-
488: <span class="ruby-
|
|
1616
|
-
489: <span class="ruby-
|
|
1617
|
-
490: <span class="ruby-
|
|
1618
|
-
491: <span class="ruby-comment cmt">#
|
|
1619
|
-
492: <span class="ruby-
|
|
1620
|
-
493:
|
|
1621
|
-
494:
|
|
1622
|
-
495: <span class="ruby-keyword kw">
|
|
1623
|
-
496: <span class="ruby-identifier">
|
|
1624
|
-
497:
|
|
1625
|
-
498: <span class="ruby-
|
|
1626
|
-
499:
|
|
1627
|
-
500: <span class="ruby-
|
|
1628
|
-
501: <span class="ruby-
|
|
1629
|
-
502: <span class="ruby-
|
|
1630
|
-
503:
|
|
1631
|
-
504: <span class="ruby-
|
|
1632
|
-
505: <span class="ruby-
|
|
1633
|
-
506:
|
|
1634
|
-
507: <span class="ruby-
|
|
1635
|
-
508:
|
|
1636
|
-
509:
|
|
1637
|
-
510:
|
|
1638
|
-
511: <span class="ruby-
|
|
1639
|
-
512:
|
|
1640
|
-
513:
|
|
1594
|
+
460: <span class="ruby-comment cmt"># Calendar chars only work when all lines have same height.</span>
|
|
1595
|
+
461: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1596
|
+
462:
|
|
1597
|
+
463: <span class="ruby-comment cmt"># Embedded tables have unpredictable width. So we always need to make room</span>
|
|
1598
|
+
464: <span class="ruby-comment cmt"># for a potential scrollbar.</span>
|
|
1599
|
+
465: <span class="ruby-identifier">tableColumn</span>.<span class="ruby-identifier">scrollbar</span> = <span class="ruby-keyword kw">true</span>
|
|
1600
|
+
466:
|
|
1601
|
+
467: <span class="ruby-comment cmt"># Create the table that is embedded in this column.</span>
|
|
1602
|
+
468: <span class="ruby-identifier">tableColumn</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span> = <span class="ruby-identifier">table</span> = <span class="ruby-constant">ColumnTable</span>.<span class="ruby-identifier">new</span>
|
|
1603
|
+
469: <span class="ruby-identifier">table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1604
|
+
470: <span class="ruby-identifier">tableColumn</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
1605
|
+
471: <span class="ruby-identifier">table</span>.<span class="ruby-identifier">viewWidth</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">:</span> <span class="ruby-value">450</span>
|
|
1606
|
+
472:
|
|
1607
|
+
473: <span class="ruby-comment cmt"># Iterate over the report interval until we hit the end date. The</span>
|
|
1608
|
+
474: <span class="ruby-comment cmt"># iteration is done with 2 nested loops. The outer loops generates the</span>
|
|
1609
|
+
475: <span class="ruby-comment cmt"># intervals for the upper (larger) scale. The inner loop generates the</span>
|
|
1610
|
+
476: <span class="ruby-comment cmt"># lower (smaller) scale.</span>
|
|
1611
|
+
477: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1612
|
+
478: <span class="ruby-identifier">cellsInInterval</span> = <span class="ruby-value">0</span>
|
|
1613
|
+
479: <span class="ruby-comment cmt"># Label for upper scale. The yearly calendar only has a lower scale.</span>
|
|
1614
|
+
480: <span class="ruby-identifier">currentInterval</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name1Func</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name1Func</span>
|
|
1615
|
+
481: <span class="ruby-identifier">firstColumn</span> = <span class="ruby-keyword kw">nil</span>
|
|
1616
|
+
482: <span class="ruby-comment cmt"># The innter loops terminates when the label for the upper scale has</span>
|
|
1617
|
+
483: <span class="ruby-comment cmt"># changed to the next scale cell.</span>
|
|
1618
|
+
484: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">name1Func</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
|
|
1619
|
+
485: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name1Func</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">currentInterval</span>)
|
|
1620
|
+
486: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function to get the end of the column.</span>
|
|
1621
|
+
487: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1622
|
+
488: <span class="ruby-identifier">iv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>, <span class="ruby-identifier">nextT</span>)
|
|
1623
|
+
489: <span class="ruby-comment cmt"># Create the new column object.</span>
|
|
1624
|
+
490: <span class="ruby-identifier">column</span> = <span class="ruby-constant">ReportTableColumn</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">table</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">''</span>)
|
|
1625
|
+
491: <span class="ruby-comment cmt"># Store the date of the column in the original form.</span>
|
|
1626
|
+
492: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">data</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'timeFormat'</span>))
|
|
1627
|
+
493: <span class="ruby-comment cmt"># The upper scale cells will be merged into one large cell that spans</span>
|
|
1628
|
+
494: <span class="ruby-comment cmt"># all lower scale cells that belong to this upper cell.</span>
|
|
1629
|
+
495: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">firstColumn</span>.<span class="ruby-identifier">nil?</span>
|
|
1630
|
+
496: <span class="ruby-identifier">firstColumn</span> = <span class="ruby-identifier">column</span>
|
|
1631
|
+
497: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">currentInterval</span>.<span class="ruby-identifier">to_s</span>
|
|
1632
|
+
498: <span class="ruby-keyword kw">else</span>
|
|
1633
|
+
499: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
1634
|
+
500: <span class="ruby-keyword kw">end</span>
|
|
1635
|
+
501: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name2Func</span>).<span class="ruby-identifier">to_s</span>
|
|
1636
|
+
502: <span class="ruby-comment cmt"># TODO: The width should be taken from some data structure.</span>
|
|
1637
|
+
503: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">width</span> = <span class="ruby-value">20</span>
|
|
1638
|
+
504: <span class="ruby-comment cmt"># Off-duty cells will have a different color than working time cells.</span>
|
|
1639
|
+
505: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">iv</span>)
|
|
1640
|
+
506: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'tabhead_offduty'</span>
|
|
1641
|
+
507: <span class="ruby-keyword kw">end</span>
|
|
1642
|
+
508: <span class="ruby-identifier">cellsInInterval</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1643
|
+
509:
|
|
1644
|
+
510: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1645
|
+
511: <span class="ruby-keyword kw">end</span>
|
|
1646
|
+
512: <span class="ruby-comment cmt"># The the first upper scale cell how many trailing hidden cells are</span>
|
|
1647
|
+
513: <span class="ruby-comment cmt"># following.</span>
|
|
1648
|
+
514: <span class="ruby-identifier">firstColumn</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">columns</span> = <span class="ruby-identifier">cellsInInterval</span>
|
|
1649
|
+
515: <span class="ruby-keyword kw">end</span>
|
|
1650
|
+
516: <span class="ruby-keyword kw">end</span></pre>
|
|
1641
1651
|
</div>
|
|
1642
1652
|
|
|
1643
1653
|
</div>
|
|
@@ -1677,121 +1687,124 @@ next cell.
|
|
|
1677
1687
|
<div class="method-source-code"
|
|
1678
1688
|
id="gen-al-hart-esource-ell-source">
|
|
1679
1689
|
<pre>
|
|
1680
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1690
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 805</span>
|
|
1691
|
+
805: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genCalChartResourceCell</span>(<span class="ruby-identifier">origQuery</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">t</span>,
|
|
1692
|
+
806: <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1693
|
+
807: <span class="ruby-comment cmt"># Find out if we have an enclosing task scope.</span>
|
|
1694
|
+
808: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
1695
|
+
809: <span class="ruby-identifier">task</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>
|
|
1696
|
+
810: <span class="ruby-comment cmt"># Get the interval of the task. In case a date is invalid due to a</span>
|
|
1697
|
+
811: <span class="ruby-comment cmt"># scheduling problem, we use the full project interval.</span>
|
|
1698
|
+
812: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">scenarioIdx</span>]
|
|
1699
|
+
813: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">scenarioIdx</span>]
|
|
1700
|
+
814: <span class="ruby-identifier">taskIv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">taskStart</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">taskStart</span>,
|
|
1701
|
+
815: <span class="ruby-identifier">taskEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">taskEnd</span>)
|
|
1702
|
+
816: <span class="ruby-keyword kw">else</span>
|
|
1703
|
+
817: <span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>
|
|
1704
|
+
818: <span class="ruby-keyword kw">end</span>
|
|
1705
|
+
819:
|
|
1706
|
+
820: <span class="ruby-identifier">firstCell</span> = <span class="ruby-keyword kw">nil</span>
|
|
1707
|
+
821: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1708
|
+
822: <span class="ruby-comment cmt"># We modify the start and end dates to match the cell boundaries. So</span>
|
|
1709
|
+
823: <span class="ruby-comment cmt"># we need to make sure we don't modify the original Query but our own</span>
|
|
1710
|
+
824: <span class="ruby-comment cmt"># copies.</span>
|
|
1711
|
+
825: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">dup</span>
|
|
1712
|
+
826:
|
|
1713
|
+
827: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1714
|
+
828: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1715
|
+
829:
|
|
1716
|
+
830: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function</span>
|
|
1717
|
+
831: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1718
|
+
832: <span class="ruby-identifier">cellIv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>, <span class="ruby-identifier">nextT</span>)
|
|
1719
|
+
833: <span class="ruby-comment cmt"># Get work load for all tasks.</span>
|
|
1720
|
+
834: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-keyword kw">nil</span>
|
|
1721
|
+
835: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'effort'</span>
|
|
1722
|
+
836: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">startIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">t</span>, <span class="ruby-keyword kw">true</span>)
|
|
1723
|
+
837: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">endIdx</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">dateToIdx</span>(<span class="ruby-identifier">nextT</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
1724
|
+
838: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1725
|
+
839: <span class="ruby-identifier">workLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1726
|
+
840: <span class="ruby-identifier">scaledWorkLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
1727
|
+
841: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
1728
|
+
842: <span class="ruby-comment cmt"># Get work load for the particular task.</span>
|
|
1729
|
+
843: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">task</span>
|
|
1730
|
+
844: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1731
|
+
845: <span class="ruby-identifier">workLoadTask</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1732
|
+
846: <span class="ruby-identifier">scaledWorkLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
1733
|
+
847: <span class="ruby-keyword kw">else</span>
|
|
1734
|
+
848: <span class="ruby-identifier">workLoadTask</span> = <span class="ruby-value">0.0</span>
|
|
1735
|
+
849: <span class="ruby-keyword kw">end</span>
|
|
1736
|
+
850: <span class="ruby-comment cmt"># Get unassigned work load.</span>
|
|
1737
|
+
851: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'freework'</span>
|
|
1738
|
+
852: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1739
|
+
853: <span class="ruby-identifier">freeLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1740
|
+
854: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">content</span>
|
|
1741
|
+
855: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'empty'</span>
|
|
1742
|
+
856: <span class="ruby-comment cmt"># We only generate cells will different background colors.</span>
|
|
1743
|
+
857: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'load'</span>
|
|
1744
|
+
858: <span class="ruby-comment cmt"># Report the workload of the resource in this time interval.</span>
|
|
1745
|
+
859: <span class="ruby-comment cmt"># To increase readability, we don't show 0.0 values.</span>
|
|
1746
|
+
860: <span class="ruby-identifier">wLoad</span> = <span class="ruby-identifier">task</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">workLoadTask</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">workLoad</span>
|
|
1747
|
+
861: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">wLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
|
|
1748
|
+
862: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">scaledWorkLoad</span>
|
|
1749
|
+
863: <span class="ruby-keyword kw">end</span>
|
|
1750
|
+
864: <span class="ruby-keyword kw">else</span>
|
|
1751
|
+
865: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown column content #{column.content}"</span>
|
|
1752
|
+
866: <span class="ruby-keyword kw">end</span>
|
|
1753
|
+
867:
|
|
1754
|
+
868: <span class="ruby-identifier">cdText</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellText</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
1755
|
+
869: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">cdText</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cdText</span>
|
|
1756
|
+
870:
|
|
1757
|
+
871: <span class="ruby-comment cmt"># Set the tooltip for the cell. We might delete it again.</span>
|
|
1758
|
+
872: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">nil</span>
|
|
1759
|
+
873: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">showTooltipHint</span> = <span class="ruby-keyword kw">false</span>
|
|
1760
|
+
874:
|
|
1761
|
+
875: <span class="ruby-comment cmt"># Determine cell category (mostly the background color)</span>
|
|
1762
|
+
876: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
1763
|
+
877: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cellIv</span>.<span class="ruby-identifier">overlaps?</span>(<span class="ruby-identifier">taskIv</span>)
|
|
1764
|
+
878: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">workLoadTask</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
|
|
1765
|
+
879: <span class="ruby-value str">'busy'</span>
|
|
1766
|
+
880: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
|
|
1767
|
+
881: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1768
|
+
882: <span class="ruby-value str">'offduty'</span>
|
|
1769
|
+
883: <span class="ruby-keyword kw">else</span>
|
|
1770
|
+
884: <span class="ruby-value str">'loaded'</span>
|
|
1771
|
+
885: <span class="ruby-keyword kw">end</span>
|
|
1772
|
+
886: <span class="ruby-keyword kw">else</span>
|
|
1773
|
+
887: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
|
|
1774
|
+
888: <span class="ruby-value str">'free'</span>
|
|
1775
|
+
889: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
|
|
1776
|
+
890: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1777
|
+
891: <span class="ruby-value str">'offduty'</span>
|
|
1778
|
+
892: <span class="ruby-keyword kw">else</span>
|
|
1779
|
+
893: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1780
|
+
894: <span class="ruby-value str">'resourcecell'</span>
|
|
1781
|
+
895: <span class="ruby-keyword kw">end</span>
|
|
1782
|
+
896: <span class="ruby-keyword kw">end</span>
|
|
1783
|
+
897: <span class="ruby-keyword kw">else</span>
|
|
1784
|
+
898: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span>
|
|
1785
|
+
899: <span class="ruby-value str">'busy'</span>
|
|
1786
|
+
900: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
|
|
1787
|
+
901: <span class="ruby-value str">'loaded'</span>
|
|
1788
|
+
902: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">workLoad</span> <span class="ruby-operator">==</span> <span class="ruby-value">0.0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">freeLoad</span> <span class="ruby-operator">></span> <span class="ruby-value">0.0</span>
|
|
1789
|
+
903: <span class="ruby-value str">'free'</span>
|
|
1759
1790
|
904: <span class="ruby-keyword kw">else</span>
|
|
1760
|
-
905: <span class="ruby-
|
|
1761
|
-
906:
|
|
1762
|
-
907:
|
|
1763
|
-
908:
|
|
1764
|
-
909:
|
|
1765
|
-
910:
|
|
1766
|
-
911:
|
|
1767
|
-
912:
|
|
1768
|
-
913:
|
|
1769
|
-
914:
|
|
1770
|
-
915:
|
|
1771
|
-
916:
|
|
1772
|
-
917:
|
|
1773
|
-
918:
|
|
1774
|
-
919:
|
|
1775
|
-
920:
|
|
1776
|
-
921:
|
|
1777
|
-
922: <span class="ruby-keyword kw">else</span>
|
|
1778
|
-
923: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1779
|
-
924: <span class="ruby-value str">'offduty'</span>
|
|
1780
|
-
925: <span class="ruby-keyword kw">end</span>
|
|
1781
|
-
926: <span class="ruby-keyword kw">end</span>
|
|
1782
|
-
927: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'index'</span>) <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'2'</span>
|
|
1783
|
-
928:
|
|
1784
|
-
929: <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
1785
|
-
930:
|
|
1786
|
-
931: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1787
|
-
932: <span class="ruby-identifier">firstCell</span> = <span class="ruby-identifier">cell</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">firstCell</span>
|
|
1788
|
-
933: <span class="ruby-keyword kw">end</span>
|
|
1789
|
-
934:
|
|
1790
|
-
935: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is fully loaded'</span>, <span class="ruby-value str">'busy1'</span>)
|
|
1791
|
-
936: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is partially loaded'</span>, <span class="ruby-value str">'loaded1'</span>)
|
|
1792
|
-
937: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is available'</span>, <span class="ruby-value str">'free'</span>)
|
|
1793
|
-
938: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Off duty time'</span>, <span class="ruby-value str">'offduty'</span>)
|
|
1794
|
-
939: <span class="ruby-keyword kw">end</span></pre>
|
|
1791
|
+
905: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1792
|
+
906: <span class="ruby-value str">'offduty'</span>
|
|
1793
|
+
907: <span class="ruby-keyword kw">end</span>
|
|
1794
|
+
908: <span class="ruby-keyword kw">end</span>
|
|
1795
|
+
909: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'index'</span>) <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'2'</span>
|
|
1796
|
+
910:
|
|
1797
|
+
911: <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
1798
|
+
912:
|
|
1799
|
+
913: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1800
|
+
914: <span class="ruby-identifier">firstCell</span> = <span class="ruby-identifier">cell</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">firstCell</span>
|
|
1801
|
+
915: <span class="ruby-keyword kw">end</span>
|
|
1802
|
+
916:
|
|
1803
|
+
917: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is fully loaded'</span>, <span class="ruby-value str">'busy1'</span>)
|
|
1804
|
+
918: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is partially loaded'</span>, <span class="ruby-value str">'loaded1'</span>)
|
|
1805
|
+
919: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Resource is available'</span>, <span class="ruby-value str">'free'</span>)
|
|
1806
|
+
920: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Off duty time'</span>, <span class="ruby-value str">'offduty'</span>)
|
|
1807
|
+
921: <span class="ruby-keyword kw">end</span></pre>
|
|
1795
1808
|
</div>
|
|
1796
1809
|
|
|
1797
1810
|
</div>
|
|
@@ -1831,78 +1844,81 @@ next cell.
|
|
|
1831
1844
|
<div class="method-source-code"
|
|
1832
1845
|
id="gen-al-hart-ask-ell-source">
|
|
1833
1846
|
<pre>
|
|
1834
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1847
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 723</span>
|
|
1848
|
+
723: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genCalChartTaskCell</span>(<span class="ruby-identifier">origQuery</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">t</span>, <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1849
|
+
724: <span class="ruby-identifier">task</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
1850
|
+
725: <span class="ruby-comment cmt"># Find out if we have an enclosing resource scope.</span>
|
|
1851
|
+
726: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resource</span>)
|
|
1852
|
+
727: <span class="ruby-identifier">resource</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>
|
|
1853
|
+
728: <span class="ruby-keyword kw">else</span>
|
|
1854
|
+
729: <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>
|
|
1855
|
+
730: <span class="ruby-keyword kw">end</span>
|
|
1856
|
+
731:
|
|
1857
|
+
732: <span class="ruby-comment cmt"># Get the interval of the task. In case a date is invalid due to a</span>
|
|
1858
|
+
733: <span class="ruby-comment cmt"># scheduling problem, we use the full project interval.</span>
|
|
1859
|
+
734: <span class="ruby-identifier">taskStart</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'start'</span>, <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">scenarioIdx</span>]
|
|
1860
|
+
735: <span class="ruby-identifier">taskEnd</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value str">'end'</span>, <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">scenarioIdx</span>]
|
|
1861
|
+
736: <span class="ruby-identifier">taskIv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">taskStart</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'start'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">taskStart</span>,
|
|
1862
|
+
737: <span class="ruby-identifier">taskEnd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@project</span>[<span class="ruby-value str">'end'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">taskEnd</span>)
|
|
1863
|
+
738:
|
|
1864
|
+
739: <span class="ruby-identifier">firstCell</span> = <span class="ruby-keyword kw">nil</span>
|
|
1865
|
+
740: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1866
|
+
741: <span class="ruby-comment cmt"># We modify the start and end dates to match the cell boundaries. So</span>
|
|
1867
|
+
742: <span class="ruby-comment cmt"># we need to make sure we don't modify the original Query but our own</span>
|
|
1868
|
+
743: <span class="ruby-comment cmt"># copies.</span>
|
|
1869
|
+
744: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">dup</span>
|
|
1870
|
+
745: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function</span>
|
|
1871
|
+
746: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1872
|
+
747: <span class="ruby-identifier">cellIv</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>, <span class="ruby-identifier">nextT</span>)
|
|
1873
|
+
748: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">content</span>
|
|
1874
|
+
749: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'empty'</span>
|
|
1875
|
+
750: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1876
|
+
751: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1877
|
+
752: <span class="ruby-comment cmt"># We only generate cells will different background colors.</span>
|
|
1878
|
+
753: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'load'</span>
|
|
1879
|
+
754: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'effort'</span>
|
|
1880
|
+
755: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">start</span> = <span class="ruby-identifier">t</span>
|
|
1881
|
+
756: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">end</span> = <span class="ruby-identifier">nextT</span>
|
|
1882
|
+
757: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1883
|
+
758:
|
|
1884
|
+
759: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1885
|
+
760: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1886
|
+
761:
|
|
1887
|
+
762: <span class="ruby-comment cmt"># To increase readability, we don't show 0.0 values.</span>
|
|
1888
|
+
763: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0.0</span>
|
|
1889
|
+
764: <span class="ruby-keyword kw">else</span>
|
|
1890
|
+
765: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown column content #{column.content}"</span>
|
|
1891
|
+
766: <span class="ruby-keyword kw">end</span>
|
|
1892
|
+
767:
|
|
1893
|
+
768: <span class="ruby-identifier">cdText</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellText</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
1894
|
+
769: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">cdText</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cdText</span>
|
|
1895
|
+
770:
|
|
1896
|
+
771: <span class="ruby-comment cmt"># Determine cell category (mostly the background color)</span>
|
|
1897
|
+
772: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cellIv</span>.<span class="ruby-identifier">overlaps?</span>(<span class="ruby-identifier">taskIv</span>)
|
|
1898
|
+
773: <span class="ruby-comment cmt"># The cell is either a container or leaf task</span>
|
|
1899
|
+
774: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-identifier">task</span>.<span class="ruby-identifier">container?</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'calconttask'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'caltask'</span>
|
|
1900
|
+
775: <span class="ruby-comment cmt"># If the user has requested a custom tooltip, add it to each task cell.</span>
|
|
1901
|
+
776: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">nil</span>
|
|
1902
|
+
777: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">showTooltipHint</span> = <span class="ruby-keyword kw">false</span>
|
|
1903
|
+
778: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@project</span>.<span class="ruby-identifier">isWorkingTime</span>(<span class="ruby-identifier">cellIv</span>)
|
|
1904
|
+
779: <span class="ruby-comment cmt"># The cell is a vacation cell.</span>
|
|
1905
|
+
780: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'offduty'</span>
|
|
1906
|
+
781: <span class="ruby-keyword kw">else</span>
|
|
1907
|
+
782: <span class="ruby-comment cmt"># The cell is just filled with the background color.</span>
|
|
1908
|
+
783: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'taskcell'</span>
|
|
1909
|
+
784: <span class="ruby-keyword kw">end</span>
|
|
1910
|
+
785: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'index'</span>) <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'2'</span>
|
|
1911
|
+
786:
|
|
1912
|
+
787: <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
1913
|
+
788:
|
|
1914
|
+
789: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1915
|
+
790: <span class="ruby-identifier">firstCell</span> = <span class="ruby-identifier">cell</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">firstCell</span>
|
|
1916
|
+
791: <span class="ruby-keyword kw">end</span>
|
|
1917
|
+
792:
|
|
1918
|
+
793: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Container Task'</span>, <span class="ruby-value str">'calconttask1'</span>)
|
|
1919
|
+
794: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Task'</span>, <span class="ruby-value str">'caltask1'</span>)
|
|
1920
|
+
795: <span class="ruby-identifier">legend</span>.<span class="ruby-identifier">addCalendarItem</span>(<span class="ruby-value str">'Off duty time'</span>, <span class="ruby-value str">'offduty'</span>)
|
|
1921
|
+
796: <span class="ruby-keyword kw">end</span></pre>
|
|
1906
1922
|
</div>
|
|
1907
1923
|
|
|
1908
1924
|
</div>
|
|
@@ -1944,87 +1960,73 @@ cell.
|
|
|
1944
1960
|
<div class="method-source-code"
|
|
1945
1961
|
id="gen-alculated-ell-source">
|
|
1946
1962
|
<pre>
|
|
1947
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1963
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 649</span>
|
|
1964
|
+
649: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genCalculatedCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">property</span>)
|
|
1965
|
+
650: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
1966
|
+
651: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">listType</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">listType</span>
|
|
1967
|
+
652: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">listMode</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">listMode</span>
|
|
1968
|
+
653:
|
|
1969
|
+
654: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1970
|
+
655: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1971
|
+
656:
|
|
1972
|
+
657: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">setScenarioSettings</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>,
|
|
1973
|
+
658: <span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>))
|
|
1974
|
+
659: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
1975
|
+
660: <span class="ruby-keyword kw">end</span>
|
|
1976
|
+
661:
|
|
1977
|
+
662: <span class="ruby-identifier">setStandardCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">line</span>)
|
|
1978
|
+
663:
|
|
1979
|
+
664: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1980
|
+
665: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = (<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_rti</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">rti</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
1955
1981
|
666: <span class="ruby-keyword kw">end</span>
|
|
1956
1982
|
667:
|
|
1957
|
-
668: <span class="ruby-
|
|
1958
|
-
669:
|
|
1959
|
-
670: <span class="ruby-keyword kw">
|
|
1960
|
-
671: <span class="ruby-identifier">
|
|
1961
|
-
672:
|
|
1962
|
-
673:
|
|
1963
|
-
674: <span class="ruby-
|
|
1964
|
-
675:
|
|
1965
|
-
676:
|
|
1966
|
-
677:
|
|
1967
|
-
678: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">
|
|
1968
|
-
679:
|
|
1969
|
-
680:
|
|
1970
|
-
681:
|
|
1971
|
-
682:
|
|
1972
|
-
683:
|
|
1973
|
-
684:
|
|
1974
|
-
685:
|
|
1975
|
-
686:
|
|
1976
|
-
687: <span class="ruby-keyword kw">
|
|
1983
|
+
668: <span class="ruby-comment cmt"># Some columns need some extra care.</span>
|
|
1984
|
+
669: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1985
|
+
670: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'alert'</span>
|
|
1986
|
+
671: <span class="ruby-identifier">id</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">alertLevelId</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>)
|
|
1987
|
+
672: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> = <span class="ruby-node">"flag-#{id}"</span>
|
|
1988
|
+
673: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontColor</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">alertLevelColor</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_sort</span>)
|
|
1989
|
+
674: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'alerttrend'</span>
|
|
1990
|
+
675: <span class="ruby-identifier">icons</span> = <span class="ruby-node">%( up flat down )</span>
|
|
1991
|
+
676: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> = <span class="ruby-node">"trend-#{icons[query.to_sort]}"</span>
|
|
1992
|
+
677: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'line'</span>
|
|
1993
|
+
678: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span>.<span class="ruby-identifier">to_s</span>
|
|
1994
|
+
679: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'name'</span>
|
|
1995
|
+
680: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> =
|
|
1996
|
+
681: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
1997
|
+
682: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">container?</span>
|
|
1998
|
+
683: <span class="ruby-value str">'taskgroup'</span>
|
|
1999
|
+
684: <span class="ruby-keyword kw">else</span>
|
|
2000
|
+
685: <span class="ruby-value str">'task'</span>
|
|
2001
|
+
686: <span class="ruby-keyword kw">end</span>
|
|
2002
|
+
687: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resource</span>)
|
|
1977
2003
|
688: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">container?</span>
|
|
1978
|
-
689: <span class="ruby-value str">'
|
|
2004
|
+
689: <span class="ruby-value str">'resourcegroup'</span>
|
|
1979
2005
|
690: <span class="ruby-keyword kw">else</span>
|
|
1980
|
-
691: <span class="ruby-value str">'
|
|
2006
|
+
691: <span class="ruby-value str">'resource'</span>
|
|
1981
2007
|
692: <span class="ruby-keyword kw">end</span>
|
|
1982
|
-
693: <span class="ruby-keyword kw">
|
|
1983
|
-
694: <span class="ruby-keyword kw">
|
|
1984
|
-
695:
|
|
1985
|
-
696:
|
|
1986
|
-
697:
|
|
1987
|
-
698:
|
|
1988
|
-
699:
|
|
1989
|
-
700:
|
|
1990
|
-
701:
|
|
1991
|
-
702:
|
|
1992
|
-
703:
|
|
1993
|
-
704: <span class="ruby-keyword kw">
|
|
1994
|
-
705:
|
|
1995
|
-
706: <span class="ruby-
|
|
1996
|
-
707:
|
|
1997
|
-
708: <span class="ruby-keyword kw">
|
|
1998
|
-
709:
|
|
1999
|
-
710: <span class="ruby-
|
|
2000
|
-
711:
|
|
2001
|
-
712:
|
|
2002
|
-
713: <span class="ruby-
|
|
2003
|
-
714:
|
|
2004
|
-
715:
|
|
2005
|
-
716: <span class="ruby-comment cmt"># Replace the cell background color if the user has requested a custom</span>
|
|
2006
|
-
717: <span class="ruby-comment cmt"># color.</span>
|
|
2007
|
-
718: <span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellColor</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2008
|
-
719: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">cellColor</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cellColor</span>
|
|
2009
|
-
720:
|
|
2010
|
-
721: <span class="ruby-comment cmt"># Replace the font color setting if the user has requested a custom</span>
|
|
2011
|
-
722: <span class="ruby-comment cmt"># color.</span>
|
|
2012
|
-
723: <span class="ruby-identifier">fontColor</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">fontColor</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2013
|
-
724: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontColor</span> = <span class="ruby-identifier">fontColor</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fontColor</span>
|
|
2014
|
-
725:
|
|
2015
|
-
726: <span class="ruby-comment cmt"># Replace the default cell alignment if the user has requested a custom</span>
|
|
2016
|
-
727: <span class="ruby-comment cmt"># alignment.</span>
|
|
2017
|
-
728: <span class="ruby-identifier">hAlign</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">hAlign</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2018
|
-
729: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-identifier">hAlign</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hAlign</span>
|
|
2019
|
-
730:
|
|
2020
|
-
731: <span class="ruby-comment cmt"># Register the custom tooltip if the user has requested one.</span>
|
|
2021
|
-
732: <span class="ruby-identifier">cdTooltip</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2022
|
-
733: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-identifier">cdTooltip</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cdTooltip</span>
|
|
2023
|
-
734:
|
|
2024
|
-
735: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2025
|
-
736:
|
|
2026
|
-
737: <span class="ruby-keyword kw">true</span>
|
|
2027
|
-
738: <span class="ruby-keyword kw">end</span></pre>
|
|
2008
|
+
693: <span class="ruby-keyword kw">else</span>
|
|
2009
|
+
694: <span class="ruby-keyword kw">nil</span>
|
|
2010
|
+
695: <span class="ruby-keyword kw">end</span>
|
|
2011
|
+
696: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">iconTooltip</span> = <span class="ruby-constant">RichText</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"'''ID:''' #{property.fullId}"</span>).
|
|
2012
|
+
697: <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
2013
|
+
698: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'no'</span>
|
|
2014
|
+
699: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">no</span>.<span class="ruby-identifier">to_s</span>
|
|
2015
|
+
700: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'wbs'</span>
|
|
2016
|
+
701: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">indent</span> = <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>
|
|
2017
|
+
702: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'scenario'</span>
|
|
2018
|
+
703: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">scenario</span>(<span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>).<span class="ruby-identifier">name</span>
|
|
2019
|
+
704: <span class="ruby-keyword kw">end</span>
|
|
2020
|
+
705:
|
|
2021
|
+
706: <span class="ruby-comment cmt"># Replace the cell text if the user has requested a custom cell text.</span>
|
|
2022
|
+
707: <span class="ruby-identifier">cdText</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellText</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2023
|
+
708: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">cdText</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cdText</span>
|
|
2024
|
+
709:
|
|
2025
|
+
710: <span class="ruby-identifier">setCustomCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">query</span>)
|
|
2026
|
+
711: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2027
|
+
712:
|
|
2028
|
+
713: <span class="ruby-keyword kw">true</span>
|
|
2029
|
+
714: <span class="ruby-keyword kw">end</span></pre>
|
|
2028
2030
|
</div>
|
|
2029
2031
|
|
|
2030
2032
|
</div>
|
|
@@ -2059,59 +2061,46 @@ the cell exists, false for a hidden cell.
|
|
|
2059
2061
|
<div class="method-source-code"
|
|
2060
2062
|
id="gen-tandard-ell-source">
|
|
2061
2063
|
<pre>
|
|
2062
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
636: <span class="ruby-comment cmt"># color.</span>
|
|
2100
|
-
637: <span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellColor</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2101
|
-
638: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">cellColor</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cellColor</span>
|
|
2064
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 603</span>
|
|
2065
|
+
603: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genStandardCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>)
|
|
2066
|
+
604: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
2067
|
+
605: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">listType</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">listType</span>
|
|
2068
|
+
606: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">listMode</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">listMode</span>
|
|
2069
|
+
607:
|
|
2070
|
+
608: <span class="ruby-comment cmt"># Find out, what type of PropertyTreeNode we are dealing with.</span>
|
|
2071
|
+
609: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2072
|
+
610: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
2073
|
+
611: <span class="ruby-identifier">propertyList</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tasks</span>
|
|
2074
|
+
612: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resource</span>)
|
|
2075
|
+
613: <span class="ruby-identifier">propertyList</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">resources</span>
|
|
2076
|
+
614: <span class="ruby-keyword kw">else</span>
|
|
2077
|
+
615: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown property type #{property.class}"</span>
|
|
2078
|
+
616: <span class="ruby-keyword kw">end</span>
|
|
2079
|
+
617:
|
|
2080
|
+
618: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
2081
|
+
619: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
2082
|
+
620:
|
|
2083
|
+
621: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">setScenarioSettings</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span>,
|
|
2084
|
+
622: <span class="ruby-identifier">propertyList</span>.<span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>))
|
|
2085
|
+
623: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
2086
|
+
624: <span class="ruby-keyword kw">end</span>
|
|
2087
|
+
625:
|
|
2088
|
+
626: <span class="ruby-identifier">setStandardCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>,
|
|
2089
|
+
627: <span class="ruby-identifier">propertyList</span>.<span class="ruby-identifier">attributeType</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>), <span class="ruby-identifier">line</span>)
|
|
2090
|
+
628:
|
|
2091
|
+
629: <span class="ruby-comment cmt"># If the user has requested a custom cell text, this will be used</span>
|
|
2092
|
+
630: <span class="ruby-comment cmt"># instead of the queried one.</span>
|
|
2093
|
+
631: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cdText</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellText</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>))
|
|
2094
|
+
632: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">cdText</span>
|
|
2095
|
+
633: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
2096
|
+
634: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = (<span class="ruby-identifier">rti</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_rti</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">rti</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
2097
|
+
635: <span class="ruby-keyword kw">end</span>
|
|
2098
|
+
636:
|
|
2099
|
+
637: <span class="ruby-identifier">setCustomCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">query</span>)
|
|
2100
|
+
638: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2102
2101
|
639:
|
|
2103
|
-
640: <span class="ruby-
|
|
2104
|
-
641:
|
|
2105
|
-
642: <span class="ruby-identifier">hAlign</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">hAlign</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2106
|
-
643: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-identifier">hAlign</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hAlign</span>
|
|
2107
|
-
644:
|
|
2108
|
-
645: <span class="ruby-comment cmt"># If the user has requested a custom tooltip, add it to the cell.</span>
|
|
2109
|
-
646: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">nil</span>
|
|
2110
|
-
647:
|
|
2111
|
-
648: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2112
|
-
649:
|
|
2113
|
-
650: <span class="ruby-keyword kw">true</span>
|
|
2114
|
-
651: <span class="ruby-keyword kw">end</span></pre>
|
|
2102
|
+
640: <span class="ruby-keyword kw">true</span>
|
|
2103
|
+
641: <span class="ruby-keyword kw">end</span></pre>
|
|
2115
2104
|
</div>
|
|
2116
2105
|
|
|
2117
2106
|
</div>
|
|
@@ -2160,75 +2149,75 @@ objects that belong to the property in this line.
|
|
|
2160
2149
|
<div class="method-source-code"
|
|
2161
2150
|
id="generate-able-ell-source">
|
|
2162
2151
|
<pre>
|
|
2163
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
553: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>
|
|
2190
|
-
554: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextHour</span>
|
|
2191
|
-
555: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
2152
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 531</span>
|
|
2153
|
+
531: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateTableCell</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">property</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">query</span>)
|
|
2154
|
+
532: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">start</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">end</span>
|
|
2155
|
+
533: <span class="ruby-comment cmt"># If the user has specified a new start or end time for this column,</span>
|
|
2156
|
+
534: <span class="ruby-comment cmt"># we have to duplicate the query before we modify it.</span>
|
|
2157
|
+
535: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
2158
|
+
536: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">start</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">start</span>
|
|
2159
|
+
537: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">end</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">end</span>
|
|
2160
|
+
538: <span class="ruby-keyword kw">end</span>
|
|
2161
|
+
539:
|
|
2162
|
+
540: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
2163
|
+
541: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
2164
|
+
542: <span class="ruby-comment cmt"># Generate a hidden cell. The real meat is in the actual chart object,</span>
|
|
2165
|
+
543: <span class="ruby-comment cmt"># not in this cell.</span>
|
|
2166
|
+
544: <span class="ruby-identifier">cell</span> = <span class="ruby-constant">ReportTableCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">query</span>, <span class="ruby-value str">''</span>)
|
|
2167
|
+
545: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2168
|
+
546: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-keyword kw">nil</span>
|
|
2169
|
+
547: <span class="ruby-comment cmt"># The GanttChart can be reached via the special variable of the column</span>
|
|
2170
|
+
548: <span class="ruby-comment cmt"># header.</span>
|
|
2171
|
+
549: <span class="ruby-identifier">chart</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span>
|
|
2172
|
+
550: <span class="ruby-constant">GanttLine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">chart</span>, <span class="ruby-identifier">query</span>, (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) * (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">height</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>),
|
|
2173
|
+
551: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">height</span>, <span class="ruby-identifier">a</span>(<span class="ruby-value str">'selfcontained'</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>)
|
|
2174
|
+
552: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
2175
|
+
553: <span class="ruby-comment cmt"># The calendar cells can be all generated by the same function. But we</span>
|
|
2176
|
+
554: <span class="ruby-comment cmt"># need to use different parameters.</span>
|
|
2177
|
+
555: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>
|
|
2192
2178
|
556: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>
|
|
2193
|
-
557: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:
|
|
2194
|
-
558: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'
|
|
2195
|
-
559: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">
|
|
2196
|
-
560: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:
|
|
2197
|
-
561: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'
|
|
2198
|
-
562: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">
|
|
2199
|
-
563: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:
|
|
2200
|
-
564: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'
|
|
2201
|
-
565: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">
|
|
2202
|
-
566: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:
|
|
2203
|
-
567: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'
|
|
2204
|
-
568: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">
|
|
2205
|
-
569: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:
|
|
2206
|
-
570: <span class="ruby-keyword kw">
|
|
2207
|
-
571: <span class="ruby-
|
|
2208
|
-
572:
|
|
2209
|
-
573:
|
|
2210
|
-
574:
|
|
2211
|
-
575:
|
|
2212
|
-
576:
|
|
2213
|
-
577:
|
|
2214
|
-
578:
|
|
2215
|
-
579: <span class="ruby-
|
|
2216
|
-
580:
|
|
2217
|
-
581: <span class="ruby-
|
|
2218
|
-
582:
|
|
2219
|
-
583:
|
|
2220
|
-
584: <span class="ruby-constant">
|
|
2221
|
-
585:
|
|
2222
|
-
586:
|
|
2223
|
-
587:
|
|
2224
|
-
588: <span class="ruby-
|
|
2225
|
-
589:
|
|
2226
|
-
590:
|
|
2227
|
-
591: <span class="ruby-keyword kw">
|
|
2228
|
-
592: <span class="ruby-identifier">
|
|
2229
|
-
593:
|
|
2230
|
-
594: <span class="ruby-keyword kw">
|
|
2231
|
-
595:
|
|
2179
|
+
557: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextHour</span>
|
|
2180
|
+
558: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
2181
|
+
559: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>
|
|
2182
|
+
560: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextDay</span>
|
|
2183
|
+
561: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'weekly'</span>
|
|
2184
|
+
562: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfWeek</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'weekStartsMonday'</span>))
|
|
2185
|
+
563: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextWeek</span>
|
|
2186
|
+
564: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'monthly'</span>
|
|
2187
|
+
565: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfMonth</span>
|
|
2188
|
+
566: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextMonth</span>
|
|
2189
|
+
567: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'quarterly'</span>
|
|
2190
|
+
568: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfQuarter</span>
|
|
2191
|
+
569: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextQuarter</span>
|
|
2192
|
+
570: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'yearly'</span>
|
|
2193
|
+
571: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfYear</span>
|
|
2194
|
+
572: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextYear</span>
|
|
2195
|
+
573: <span class="ruby-keyword kw">else</span>
|
|
2196
|
+
574: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calculated?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>)
|
|
2197
|
+
575: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">genCalculatedCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">property</span>)
|
|
2198
|
+
576: <span class="ruby-keyword kw">else</span>
|
|
2199
|
+
577: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">genStandardCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">columnDef</span>)
|
|
2200
|
+
578: <span class="ruby-keyword kw">end</span>
|
|
2201
|
+
579: <span class="ruby-keyword kw">end</span>
|
|
2202
|
+
580:
|
|
2203
|
+
581: <span class="ruby-comment cmt"># The calendar cells don't live in this ReportTable but in an embedded</span>
|
|
2204
|
+
582: <span class="ruby-comment cmt"># ReportTable that can be reached via the column header special variable.</span>
|
|
2205
|
+
583: <span class="ruby-comment cmt"># For embedded column tables we need to create a new line.</span>
|
|
2206
|
+
584: <span class="ruby-identifier">tcLine</span> = <span class="ruby-constant">ReportTableLine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span>,
|
|
2207
|
+
585: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>, <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>)
|
|
2208
|
+
586:
|
|
2209
|
+
587: <span class="ruby-constant">PlaceHolderCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">tcLine</span>)
|
|
2210
|
+
588: <span class="ruby-comment cmt"># Depending on the property type we use different generator functions.</span>
|
|
2211
|
+
589: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
2212
|
+
590: <span class="ruby-identifier">genCalChartTaskCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">tcLine</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">start</span>, <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
2213
|
+
591: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resource</span>)
|
|
2214
|
+
592: <span class="ruby-identifier">genCalChartResourceCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">tcLine</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">start</span>,
|
|
2215
|
+
593: <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
2216
|
+
594: <span class="ruby-keyword kw">else</span>
|
|
2217
|
+
595: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown property type #{property.class}"</span>
|
|
2218
|
+
596: <span class="ruby-keyword kw">end</span>
|
|
2219
|
+
597: <span class="ruby-keyword kw">true</span>
|
|
2220
|
+
598: <span class="ruby-keyword kw">end</span></pre>
|
|
2232
2221
|
</div>
|
|
2233
2222
|
|
|
2234
2223
|
</div>
|
|
@@ -2262,16 +2251,67 @@ initialize some common values.
|
|
|
2262
2251
|
<div class="method-source-code"
|
|
2263
2252
|
id="new-ell-source">
|
|
2264
2253
|
<pre>
|
|
2265
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2254
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 989</span>
|
|
2255
|
+
989: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
2256
|
+
990: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2257
|
+
991: <span class="ruby-identifier">cell</span> = <span class="ruby-constant">ReportTableCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">query</span>)
|
|
2258
|
+
992:
|
|
2259
|
+
993: <span class="ruby-comment cmt"># Cells for containers should be using bold font face.</span>
|
|
2260
|
+
994: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">bold</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">container?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">bold</span>
|
|
2261
|
+
995: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">selfcontained</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'selfcontained'</span>)
|
|
2262
|
+
996: <span class="ruby-identifier">cell</span>
|
|
2263
|
+
997: <span class="ruby-keyword kw">end</span></pre>
|
|
2264
|
+
</div>
|
|
2265
|
+
|
|
2266
|
+
</div>
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
</div>
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
<div id="set-ustom-ell-ttributes-method" class="method-detail ">
|
|
2275
|
+
<a name="method-i-setCustomCellAttributes"></a>
|
|
2276
|
+
|
|
2277
|
+
<div class="method-heading">
|
|
2278
|
+
|
|
2279
|
+
<span class="method-name">setCustomCellAttributes</span><span
|
|
2280
|
+
class="method-args">(cell, columnDef, query)</span>
|
|
2281
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
2282
|
+
|
|
2283
|
+
</div>
|
|
2284
|
+
|
|
2285
|
+
<div class="method-description">
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
<div class="method-source-code"
|
|
2292
|
+
id="set-ustom-ell-ttributes-source">
|
|
2293
|
+
<pre>
|
|
2294
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 947</span>
|
|
2295
|
+
947: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setCustomCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">query</span>)
|
|
2296
|
+
948: <span class="ruby-comment cmt"># Replace the cell background color if the user has requested a custom</span>
|
|
2297
|
+
949: <span class="ruby-comment cmt"># color.</span>
|
|
2298
|
+
950: <span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">cellColor</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2299
|
+
951: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">cellColor</span> = <span class="ruby-identifier">cellColor</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cellColor</span>
|
|
2300
|
+
952:
|
|
2301
|
+
953: <span class="ruby-comment cmt"># Replace the font color setting if the user has requested a custom</span>
|
|
2302
|
+
954: <span class="ruby-comment cmt"># color.</span>
|
|
2303
|
+
955: <span class="ruby-identifier">fontColor</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">fontColor</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2304
|
+
956: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontColor</span> = <span class="ruby-identifier">fontColor</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fontColor</span>
|
|
2305
|
+
957:
|
|
2306
|
+
958: <span class="ruby-comment cmt"># Replace the default cell alignment if the user has requested a custom</span>
|
|
2307
|
+
959: <span class="ruby-comment cmt"># alignment.</span>
|
|
2308
|
+
960: <span class="ruby-identifier">hAlign</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">hAlign</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2309
|
+
961: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-identifier">hAlign</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hAlign</span>
|
|
2310
|
+
962:
|
|
2311
|
+
963: <span class="ruby-comment cmt"># Register the custom tooltip if the user has requested one.</span>
|
|
2312
|
+
964: <span class="ruby-identifier">cdTooltip</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">getPattern</span>(<span class="ruby-identifier">query</span>)
|
|
2313
|
+
965: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-identifier">cdTooltip</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cdTooltip</span>
|
|
2314
|
+
966: <span class="ruby-keyword kw">end</span></pre>
|
|
2275
2315
|
</div>
|
|
2276
2316
|
|
|
2277
2317
|
</div>
|
|
@@ -2304,19 +2344,19 @@ Determine the indentation for this line.
|
|
|
2304
2344
|
<div class="method-source-code"
|
|
2305
2345
|
id="set-ndent-source">
|
|
2306
2346
|
<pre>
|
|
2307
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2347
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 1000</span>
|
|
2348
|
+
1000: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setIndent</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">propertyRoot</span>, <span class="ruby-identifier">treeMode</span>)
|
|
2349
|
+
1001: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2350
|
+
1002: <span class="ruby-identifier">scopeLine</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>
|
|
2351
|
+
1003: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">property</span>.<span class="ruby-identifier">level</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">propertyRoot</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">propertyRoot</span>.<span class="ruby-identifier">level</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
|
|
2352
|
+
1004: <span class="ruby-comment cmt"># We indent at least as much as the scopeline + 1, if we have a scope.</span>
|
|
2353
|
+
1005: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">indentation</span> = <span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">indentation</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">scopeLine</span>
|
|
2354
|
+
1006: <span class="ruby-comment cmt"># In tree mode we indent according to the level.</span>
|
|
2355
|
+
1007: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">treeMode</span>
|
|
2356
|
+
1008: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">indentation</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">level</span>
|
|
2357
|
+
1009: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">bold</span> = <span class="ruby-keyword kw">true</span>
|
|
2358
|
+
1010: <span class="ruby-keyword kw">end</span>
|
|
2359
|
+
1011: <span class="ruby-keyword kw">end</span></pre>
|
|
2320
2360
|
</div>
|
|
2321
2361
|
|
|
2322
2362
|
</div>
|
|
@@ -2347,25 +2387,25 @@ Determine the indentation for this line.
|
|
|
2347
2387
|
<div class="method-source-code"
|
|
2348
2388
|
id="set-cenario-ettings-source">
|
|
2349
2389
|
<pre>
|
|
2350
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2390
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 969</span>
|
|
2391
|
+
969: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setScenarioSettings</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">scenarioIdx</span>, <span class="ruby-identifier">scenarioSpecific</span>)
|
|
2392
|
+
970: <span class="ruby-comment cmt"># Check if we are dealing with multiple scenarios.</span>
|
|
2393
|
+
971: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scenarios'</span>).<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
|
2394
|
+
972: <span class="ruby-comment cmt"># Check if the attribute is not scenario specific</span>
|
|
2395
|
+
973: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">scenarioSpecific</span>
|
|
2396
|
+
974: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">scenarioIdx</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scenarios'</span>).<span class="ruby-identifier">first</span>
|
|
2397
|
+
975: <span class="ruby-comment cmt"># Use a somewhat bigger font.</span>
|
|
2398
|
+
976: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontSize</span> = <span class="ruby-value">15</span>
|
|
2399
|
+
977: <span class="ruby-keyword kw">else</span>
|
|
2400
|
+
978: <span class="ruby-comment cmt"># And hide the cells for all but the first scenario.</span>
|
|
2401
|
+
979: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2402
|
+
980: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
2403
|
+
981: <span class="ruby-keyword kw">end</span>
|
|
2404
|
+
982: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">rows</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'scenarios'</span>).<span class="ruby-identifier">length</span>
|
|
2405
|
+
983: <span class="ruby-keyword kw">end</span>
|
|
2406
|
+
984: <span class="ruby-keyword kw">end</span>
|
|
2407
|
+
985: <span class="ruby-keyword kw">true</span>
|
|
2408
|
+
986: <span class="ruby-keyword kw">end</span></pre>
|
|
2369
2409
|
</div>
|
|
2370
2410
|
|
|
2371
2411
|
</div>
|
|
@@ -2399,28 +2439,28 @@ alignment and background color.
|
|
|
2399
2439
|
<div class="method-source-code"
|
|
2400
2440
|
id="set-tandard-ell-ttributes-source">
|
|
2401
2441
|
<pre>
|
|
2402
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2442
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 925</span>
|
|
2443
|
+
925: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setStandardCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>, <span class="ruby-identifier">attributeType</span>, <span class="ruby-identifier">line</span>)
|
|
2444
|
+
926: <span class="ruby-comment cmt"># Determine whether it should be indented</span>
|
|
2445
|
+
927: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">indent</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">attributeType</span>)
|
|
2446
|
+
928: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">indent</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">indentation</span>
|
|
2447
|
+
929: <span class="ruby-keyword kw">end</span>
|
|
2448
|
+
930:
|
|
2449
|
+
931: <span class="ruby-comment cmt"># Determine the cell alignment</span>
|
|
2450
|
+
932: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-identifier">alignment</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">attributeType</span>)
|
|
2451
|
+
933:
|
|
2452
|
+
934: <span class="ruby-comment cmt"># Set background color</span>
|
|
2453
|
+
935: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Task</span>)
|
|
2454
|
+
936: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'index'</span>) <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span>
|
|
2455
|
+
937: <span class="ruby-value str">'taskcell1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'taskcell2'</span>
|
|
2456
|
+
938: <span class="ruby-keyword kw">else</span>
|
|
2457
|
+
939: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">'index'</span>) <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span>
|
|
2458
|
+
940: <span class="ruby-value str">'resourcecell1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'resourcecell2'</span>
|
|
2459
|
+
941: <span class="ruby-keyword kw">end</span>
|
|
2460
|
+
942:
|
|
2461
|
+
943: <span class="ruby-comment cmt"># Set column width</span>
|
|
2462
|
+
944: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">width</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span>
|
|
2463
|
+
945: <span class="ruby-keyword kw">end</span></pre>
|
|
2424
2464
|
</div>
|
|
2425
2465
|
|
|
2426
2466
|
</div>
|
|
@@ -2453,13 +2493,13 @@ Try to merge equal cells without text to multi-column cells.
|
|
|
2453
2493
|
<div class="method-source-code"
|
|
2454
2494
|
id="try-ell-erging-source">
|
|
2455
2495
|
<pre>
|
|
2456
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2496
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 1023</span>
|
|
2497
|
+
1023: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
2498
|
+
1024: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">firstCell</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">last</span>(<span class="ruby-value">1</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">cell</span>
|
|
2499
|
+
1025: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2500
|
+
1026: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">columns</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
2501
|
+
1027: <span class="ruby-keyword kw">end</span>
|
|
2502
|
+
1028: <span class="ruby-keyword kw">end</span></pre>
|
|
2463
2503
|
</div>
|
|
2464
2504
|
|
|
2465
2505
|
</div>
|