taskjuggler 0.0.5 → 0.0.6
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 +2086 -0
- data/benchmarks/666tasks.tjp +3183 -0
- data/benchmarks/booking.tjp +14 -10
- data/doc/AppConfig.html +95 -73
- data/doc/Arguments.html +22 -2
- data/doc/CHANGELOG.html +2587 -0
- data/doc/COPYING.html +21 -1
- data/doc/Object.html +161 -122
- data/doc/README.html +21 -1
- data/doc/RuntimeConfig.html +26 -6
- data/doc/String.html +38 -18
- data/doc/StringIO.html +579 -0
- data/doc/TaskJuggler.html +251 -143
- data/doc/TaskJuggler/Account.html +26 -6
- data/doc/TaskJuggler/AccountAttribute.html +28 -8
- data/doc/TaskJuggler/AccountScenario.html +24 -4
- data/doc/TaskJuggler/Allocation.html +30 -10
- data/doc/TaskJuggler/AllocationAttribute.html +28 -8
- data/doc/TaskJuggler/AttributeBase.html +46 -26
- data/doc/TaskJuggler/AttributeDefinition.html +22 -2
- data/doc/TaskJuggler/BatchProcessor.html +40 -20
- data/doc/TaskJuggler/Booking.html +26 -6
- data/doc/TaskJuggler/BookingListAttribute.html +28 -8
- data/doc/TaskJuggler/BooleanAttribute.html +28 -8
- data/doc/TaskJuggler/CSVFile.html +308 -146
- data/doc/TaskJuggler/CellSettingPattern.html +22 -2
- data/doc/TaskJuggler/CellSettingPatternList.html +26 -6
- data/doc/TaskJuggler/Charge.html +26 -6
- data/doc/TaskJuggler/ChargeListAttribute.html +26 -6
- data/doc/TaskJuggler/ChargeSet.html +33 -13
- data/doc/TaskJuggler/ChargeSetListAttribute.html +28 -8
- data/doc/TaskJuggler/ColumnListAttribute.html +26 -6
- data/doc/TaskJuggler/ColumnTable.html +24 -4
- data/doc/TaskJuggler/Daemon.html +26 -6
- data/doc/TaskJuggler/DateAttribute.html +26 -6
- data/doc/TaskJuggler/DefinitionListAttribute.html +22 -2
- data/doc/TaskJuggler/DependencyListAttribute.html +28 -8
- data/doc/TaskJuggler/DurationAttribute.html +28 -8
- data/doc/TaskJuggler/FixnumAttribute.html +24 -4
- data/doc/TaskJuggler/FlagListAttribute.html +28 -8
- data/doc/TaskJuggler/FloatAttribute.html +26 -6
- data/doc/TaskJuggler/FormatListAttribute.html +24 -4
- data/doc/TaskJuggler/GanttChart.html +147 -126
- data/doc/TaskJuggler/GanttContainer.html +34 -14
- data/doc/TaskJuggler/GanttHeader.html +28 -8
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +24 -4
- data/doc/TaskJuggler/GanttLine.html +38 -18
- data/doc/TaskJuggler/GanttLoadStack.html +26 -6
- data/doc/TaskJuggler/GanttMilestone.html +34 -14
- data/doc/TaskJuggler/GanttRouter.html +50 -30
- data/doc/TaskJuggler/GanttTaskBar.html +34 -14
- data/doc/TaskJuggler/HTMLDocument.html +26 -6
- data/doc/TaskJuggler/HTMLGraphics.html +30 -10
- data/doc/TaskJuggler/Interval.html +40 -22
- data/doc/TaskJuggler/IntervalListAttribute.html +28 -8
- data/doc/TaskJuggler/JobInfo.html +24 -4
- data/doc/TaskJuggler/Journal.html +226 -147
- data/doc/TaskJuggler/JournalEntry.html +22 -2
- data/doc/TaskJuggler/JournalEntryList.html +129 -112
- data/doc/TaskJuggler/KeywordArray.html +26 -6
- data/doc/TaskJuggler/KeywordDocumentation.html +46 -26
- data/doc/TaskJuggler/Limits.html +152 -123
- data/doc/TaskJuggler/Limits/Limit.html +149 -70
- data/doc/TaskJuggler/LimitsAttribute.html +36 -51
- data/doc/TaskJuggler/ListAttributeBase.html +24 -4
- data/doc/TaskJuggler/Log.html +50 -32
- data/doc/TaskJuggler/LogFile.html +37 -17
- data/doc/TaskJuggler/LogicalAttribute.html +53 -33
- data/doc/TaskJuggler/LogicalExpression.html +26 -6
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +32 -12
- data/doc/TaskJuggler/LogicalFlag.html +42 -22
- data/doc/TaskJuggler/LogicalFunction.html +204 -140
- data/doc/TaskJuggler/LogicalOperation.html +135 -111
- data/doc/TaskJuggler/Macro.html +22 -2
- data/doc/TaskJuggler/MacroParser.html +32 -12
- data/doc/TaskJuggler/MacroTable.html +32 -12
- data/doc/TaskJuggler/ManagerResponsibilities.html +24 -4
- data/doc/TaskJuggler/ManagerStatusRecord.html +24 -4
- data/doc/TaskJuggler/Message.html +24 -4
- data/doc/TaskJuggler/MessageHandler.html +24 -4
- data/doc/TaskJuggler/Navigator.html +104 -71
- data/doc/TaskJuggler/NavigatorElement.html +32 -12
- data/doc/TaskJuggler/NikuProject.html +22 -2
- data/doc/TaskJuggler/NikuReport.html +310 -228
- data/doc/TaskJuggler/NikuResource.html +22 -2
- data/doc/TaskJuggler/NodeListAttribute.html +615 -0
- data/doc/TaskJuggler/OnShiftCache.html +32 -12
- data/doc/TaskJuggler/ProcessIntercom.html +205 -78
- data/doc/TaskJuggler/ProcessIntercomIface.html +26 -6
- data/doc/TaskJuggler/Project.html +708 -660
- data/doc/TaskJuggler/ProjectBroker.html +506 -304
- data/doc/TaskJuggler/ProjectBrokerIface.html +61 -41
- data/doc/TaskJuggler/ProjectFileParser.html +429 -373
- data/doc/TaskJuggler/ProjectFileScanner.html +1790 -0
- data/doc/TaskJuggler/ProjectRecord.html +80 -60
- data/doc/TaskJuggler/ProjectServer.html +312 -237
- data/doc/TaskJuggler/ProjectServerIface.html +101 -43
- data/doc/TaskJuggler/PropertyAttribute.html +32 -12
- data/doc/TaskJuggler/PropertyList.html +166 -145
- data/doc/TaskJuggler/PropertySet.html +254 -224
- data/doc/TaskJuggler/PropertyTreeNode.html +670 -536
- data/doc/TaskJuggler/Query.html +169 -148
- data/doc/TaskJuggler/RTFHandlers.html +622 -0
- data/doc/TaskJuggler/RTFNavigator.html +28 -8
- data/doc/TaskJuggler/RTFQuery.html +40 -20
- data/doc/TaskJuggler/RTFReport.html +62 -25
- data/doc/TaskJuggler/RTFReportLink.html +765 -0
- data/doc/TaskJuggler/RealFormat.html +26 -6
- data/doc/TaskJuggler/RealFormatAttribute.html +26 -6
- data/doc/TaskJuggler/ReferenceAttribute.html +59 -39
- data/doc/TaskJuggler/Report.html +402 -251
- data/doc/TaskJuggler/ReportBase.html +162 -137
- data/doc/TaskJuggler/ReportContext.html +112 -29
- data/doc/TaskJuggler/ReportServer.html +89 -64
- data/doc/TaskJuggler/ReportServerIface.html +75 -55
- data/doc/TaskJuggler/ReportServerRecord.html +54 -31
- data/doc/TaskJuggler/ReportServlet.html +980 -0
- data/doc/TaskJuggler/ReportTable.html +41 -21
- data/doc/TaskJuggler/ReportTableCell.html +214 -170
- data/doc/TaskJuggler/ReportTableColumn.html +30 -10
- data/doc/TaskJuggler/ReportTableLegend.html +36 -16
- data/doc/TaskJuggler/ReportTableLine.html +32 -12
- data/doc/TaskJuggler/Resource.html +99 -87
- data/doc/TaskJuggler/ResourceListAttribute.html +59 -39
- data/doc/TaskJuggler/ResourceListRE.html +47 -26
- data/doc/TaskJuggler/ResourceScenario.html +403 -437
- data/doc/TaskJuggler/RichText.html +26 -6
- data/doc/TaskJuggler/RichTextAttribute.html +50 -30
- data/doc/TaskJuggler/RichTextDocument.html +37 -17
- data/doc/TaskJuggler/RichTextElement.html +475 -413
- data/doc/TaskJuggler/RichTextException.html +22 -2
- data/doc/TaskJuggler/RichTextFunctionExample.html +28 -8
- data/doc/TaskJuggler/RichTextFunctionHandler.html +24 -4
- data/doc/TaskJuggler/RichTextImage.html +22 -2
- data/doc/TaskJuggler/RichTextIntermediate.html +38 -18
- data/doc/TaskJuggler/RichTextParser.html +56 -34
- data/doc/TaskJuggler/RichTextScanner.html +82 -61
- data/doc/TaskJuggler/RichTextSnip.html +34 -14
- data/doc/TaskJuggler/RichTextSyntaxRules.html +507 -353
- data/doc/TaskJuggler/Scenario.html +22 -2
- data/doc/TaskJuggler/ScenarioData.html +30 -46
- data/doc/TaskJuggler/ScenarioListAttribute.html +38 -18
- data/doc/TaskJuggler/Scoreboard.html +42 -22
- data/doc/TaskJuggler/SheetHandlerBase.html +40 -20
- data/doc/TaskJuggler/SheetReceiver.html +333 -295
- data/doc/TaskJuggler/SheetSender.html +253 -230
- data/doc/TaskJuggler/Shift.html +26 -6
- data/doc/TaskJuggler/ShiftAssignment.html +89 -73
- data/doc/TaskJuggler/ShiftAssignments.html +226 -234
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +39 -54
- data/doc/TaskJuggler/ShiftScenario.html +28 -8
- data/doc/TaskJuggler/SortListAttribute.html +34 -14
- data/doc/TaskJuggler/SourceFileInfo.html +24 -4
- data/doc/TaskJuggler/StatusSheetReceiver.html +24 -3
- data/doc/TaskJuggler/StatusSheetReport.html +168 -153
- data/doc/TaskJuggler/StatusSheetSender.html +24 -3
- data/doc/TaskJuggler/StringAttribute.html +38 -18
- data/doc/TaskJuggler/SymbolAttribute.html +32 -12
- data/doc/TaskJuggler/SyntaxReference.html +40 -20
- data/doc/TaskJuggler/TOCEntry.html +26 -6
- data/doc/TaskJuggler/TSResourceRecord.html +22 -2
- data/doc/TaskJuggler/TSTaskRecord.html +22 -2
- data/doc/TaskJuggler/TableColumnDefinition.html +59 -22
- data/doc/TaskJuggler/TableOfContents.html +26 -6
- data/doc/TaskJuggler/TableReport.html +937 -904
- data/doc/TaskJuggler/Task.html +55 -36
- data/doc/TaskJuggler/TaskDependency.html +24 -4
- data/doc/TaskJuggler/TaskListAttribute.html +50 -30
- data/doc/TaskJuggler/TaskListRE.html +27 -7
- data/doc/TaskJuggler/TaskScenario.html +1273 -1153
- data/doc/TaskJuggler/TextFormatter.html +28 -8
- data/doc/TaskJuggler/TextParser.html +585 -338
- data/doc/TaskJuggler/TextParser/Pattern.html +54 -34
- data/doc/TaskJuggler/TextParser/Rule.html +95 -73
- data/doc/TaskJuggler/TextParser/StackElement.html +39 -17
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +24 -4
- data/doc/TaskJuggler/TextParser/TokenDoc.html +22 -2
- data/doc/TaskJuggler/TextReport.html +28 -8
- data/doc/TaskJuggler/TextScanner.html +400 -1404
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +28 -240
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +37 -184
- data/doc/TaskJuggler/TextScanner/MacroStackEntry.html +682 -0
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +342 -67
- data/doc/TaskJuggler/TimeSheet.html +48 -28
- data/doc/TaskJuggler/TimeSheetReceiver.html +24 -3
- data/doc/TaskJuggler/TimeSheetRecord.html +47 -27
- data/doc/TaskJuggler/TimeSheetReport.html +154 -133
- data/doc/TaskJuggler/TimeSheetSender.html +24 -3
- data/doc/TaskJuggler/TimeSheetSummary.html +137 -91
- data/doc/TaskJuggler/TimeSheets.html +26 -6
- data/doc/TaskJuggler/Tj3AppBase.html +85 -58
- data/doc/TaskJuggler/Tj3Client.html +292 -238
- data/doc/TaskJuggler/Tj3Daemon.html +159 -74
- data/doc/TaskJuggler/Tj3SheetAppBase.html +26 -6
- data/doc/TaskJuggler/Tj3SsReceiver.html +26 -6
- data/doc/TaskJuggler/Tj3SsSender.html +53 -26
- data/doc/TaskJuggler/Tj3TsReceiver.html +28 -7
- data/doc/TaskJuggler/Tj3TsSender.html +26 -6
- data/doc/TaskJuggler/Tj3TsSummary.html +26 -6
- data/doc/TaskJuggler/TjException.html +22 -2
- data/doc/TaskJuggler/TjTime.html +216 -160
- data/doc/TaskJuggler/TjpExample.html +34 -14
- data/doc/TaskJuggler/TjpExportRE.html +403 -407
- data/doc/TaskJuggler/TjpSyntaxRules.html +4805 -4408
- data/doc/TaskJuggler/URLParameter.html +649 -0
- data/doc/TaskJuggler/UserManual.html +42 -22
- data/doc/TaskJuggler/WebServer.html +702 -0
- data/doc/TaskJuggler/WorkingHours.html +38 -18
- data/doc/TaskJuggler/WorkingHoursAttribute.html +61 -41
- data/doc/TaskJuggler/XMLBlob.html +24 -4
- data/doc/TaskJuggler/XMLComment.html +24 -4
- data/doc/TaskJuggler/XMLDocument.html +30 -10
- data/doc/TaskJuggler/XMLElement.html +34 -14
- data/doc/TaskJuggler/XMLNamedText.html +22 -2
- data/doc/TaskJuggler/XMLText.html +24 -4
- data/doc/index.html +1841 -1666
- data/doc/lib/AccountScenario_rb.html +1 -1
- data/doc/lib/Account_rb.html +1 -1
- data/doc/lib/Allocation_rb.html +1 -1
- data/doc/lib/AppConfig_rb.html +2 -2
- data/doc/lib/AttributeBase_rb.html +1 -1
- data/doc/lib/AttributeDefinition_rb.html +1 -1
- data/doc/lib/Attributes_rb.html +2 -2
- data/doc/lib/BatchProcessor_rb.html +1 -1
- data/doc/lib/Booking_rb.html +1 -1
- data/doc/lib/ChargeSet_rb.html +1 -1
- data/doc/lib/Charge_rb.html +1 -1
- data/doc/lib/HTMLDocument_rb.html +1 -1
- data/doc/lib/Interval_rb.html +1 -1
- data/doc/lib/Journal_rb.html +2 -2
- data/doc/lib/KeywordArray_rb.html +1 -1
- data/doc/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/lib/Limits_rb.html +2 -2
- data/doc/lib/LogFile_rb.html +2 -2
- data/doc/lib/Log_rb.html +1 -1
- data/doc/lib/LogicalExpression_rb.html +1 -1
- data/doc/lib/LogicalFunction_rb.html +2 -2
- data/doc/lib/LogicalOperation_rb.html +2 -2
- data/doc/lib/MacroParser_rb.html +1 -1
- data/doc/lib/MacroTable_rb.html +1 -1
- data/doc/lib/MessageHandler_rb.html +1 -1
- data/doc/lib/Message_rb.html +1 -1
- data/doc/lib/ProjectFileParser_rb.html +4 -8
- data/doc/lib/ProjectFileScanner_rb.html +67 -0
- data/doc/lib/Project_rb.html +2 -2
- data/doc/lib/PropertyList_rb.html +2 -2
- data/doc/lib/PropertySet_rb.html +2 -2
- data/doc/lib/PropertyTreeNode_rb.html +2 -2
- data/doc/lib/Query_rb.html +2 -2
- data/doc/lib/RTFHandlers_rb.html +73 -0
- data/doc/lib/RTFNavigator_rb.html +1 -1
- data/doc/lib/RTFQuery_rb.html +1 -1
- data/doc/lib/RTFReportLink_rb.html +71 -0
- data/doc/lib/RTFReport_rb.html +2 -2
- data/doc/lib/RealFormat_rb.html +1 -1
- data/doc/lib/ResourceScenario_rb.html +2 -2
- data/doc/lib/Resource_rb.html +2 -2
- data/doc/lib/RichTextDocument_rb.html +1 -1
- data/doc/lib/RichTextElement_rb.html +2 -2
- data/doc/lib/RichTextFunctionExample_rb.html +1 -1
- data/doc/lib/RichTextFunctionHandler_rb.html +1 -1
- data/doc/lib/RichTextParser_rb.html +2 -2
- data/doc/lib/RichTextScanner_rb.html +2 -2
- data/doc/lib/RichTextSnip_rb.html +1 -1
- data/doc/lib/RichTextSyntaxRules_rb.html +2 -2
- data/doc/lib/RichText_rb.html +1 -1
- data/doc/lib/RuntimeConfig_rb.html +1 -1
- data/doc/lib/ScenarioData_rb.html +2 -2
- data/doc/lib/Scenario_rb.html +1 -1
- data/doc/lib/Scoreboard_rb.html +1 -1
- data/doc/lib/SheetHandlerBase_rb.html +1 -1
- data/doc/lib/SheetReceiver_rb.html +2 -2
- data/doc/lib/SheetSender_rb.html +4 -2
- data/doc/lib/ShiftAssignments_rb.html +4 -2
- data/doc/lib/ShiftScenario_rb.html +1 -1
- data/doc/lib/Shift_rb.html +1 -1
- data/doc/lib/SourceFileInfo_rb.html +1 -1
- data/doc/lib/StatusSheetReceiver_rb.html +2 -2
- data/doc/lib/StatusSheetSender_rb.html +2 -2
- data/doc/lib/SyntaxReference_rb.html +1 -1
- data/doc/lib/TOCEntry_rb.html +1 -1
- data/doc/lib/TableColumnDefinition_rb.html +2 -2
- data/doc/lib/TableOfContents_rb.html +1 -1
- data/doc/lib/TaskDependency_rb.html +1 -1
- data/doc/lib/TaskJuggler_rb.html +2 -2
- data/doc/lib/TaskScenario_rb.html +2 -2
- data/doc/lib/Task_rb.html +2 -2
- data/doc/lib/TextFormatter_rb.html +1 -1
- data/doc/lib/TextParser/Pattern_rb.html +1 -1
- data/doc/lib/TextParser/Rule_rb.html +2 -2
- data/doc/lib/TextParser/StackElement_rb.html +2 -2
- data/doc/lib/TextParser/TokenDoc_rb.html +1 -1
- data/doc/lib/TextParser_rb.html +2 -2
- data/doc/lib/TextScanner_rb.html +6 -2
- data/doc/lib/TimeSheetReceiver_rb.html +2 -2
- data/doc/lib/TimeSheetSender_rb.html +2 -2
- data/doc/lib/TimeSheetSummary_rb.html +2 -2
- data/doc/lib/TimeSheets_rb.html +2 -2
- data/doc/lib/Tj3AppBase_rb.html +2 -2
- data/doc/lib/Tj3Config_rb.html +2 -2
- data/doc/lib/Tj3SheetAppBase_rb.html +2 -2
- data/doc/lib/TjException_rb.html +1 -1
- data/doc/lib/TjTime_rb.html +2 -2
- data/doc/lib/TjpExample_rb.html +1 -1
- data/doc/lib/TjpSyntaxRules_rb.html +2 -2
- data/doc/lib/URLParameter_rb.html +67 -0
- data/doc/lib/UTF8String_rb.html +1 -1
- data/doc/lib/UserManual_rb.html +1 -1
- data/doc/lib/WorkingHours_rb.html +1 -1
- data/doc/lib/XMLDocument_rb.html +2 -2
- data/doc/lib/XMLElement_rb.html +1 -1
- data/doc/lib/daemon/Daemon_rb.html +1 -1
- data/doc/lib/daemon/ProcessIntercom_rb.html +2 -2
- data/doc/lib/daemon/ProjectBroker_rb.html +4 -2
- data/doc/lib/daemon/ProjectServer_rb.html +2 -2
- data/doc/lib/daemon/ReportServer_rb.html +2 -2
- data/doc/lib/daemon/WebServer_rb.html +75 -0
- data/doc/lib/deep_copy_rb.html +2 -2
- data/doc/lib/reports/CSVFile_rb.html +2 -2
- data/doc/lib/reports/ColumnTable_rb.html +1 -1
- data/doc/lib/reports/GanttChart_rb.html +2 -2
- data/doc/lib/reports/GanttContainer_rb.html +1 -1
- data/doc/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
- data/doc/lib/reports/GanttHeader_rb.html +1 -1
- data/doc/lib/reports/GanttLine_rb.html +1 -1
- data/doc/lib/reports/GanttLoadStack_rb.html +1 -1
- data/doc/lib/reports/GanttMilestone_rb.html +1 -1
- data/doc/lib/reports/GanttRouter_rb.html +1 -1
- data/doc/lib/reports/GanttTaskBar_rb.html +1 -1
- data/doc/lib/reports/HTMLGraphics_rb.html +1 -1
- data/doc/lib/reports/Navigator_rb.html +2 -2
- data/doc/lib/reports/NikuReport_rb.html +2 -2
- data/doc/lib/reports/ReportBase_rb.html +2 -2
- data/doc/lib/reports/ReportContext_rb.html +2 -2
- data/doc/lib/reports/ReportTableCell_rb.html +2 -2
- data/doc/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/lib/reports/ReportTableLegend_rb.html +1 -1
- data/doc/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/lib/reports/ReportTable_rb.html +2 -2
- data/doc/lib/reports/Report_rb.html +2 -2
- data/doc/lib/reports/ResourceListRE_rb.html +2 -2
- data/doc/lib/reports/StatusSheetReport_rb.html +2 -2
- data/doc/lib/reports/TableReport_rb.html +2 -2
- data/doc/lib/reports/TaskListRE_rb.html +2 -2
- data/doc/lib/reports/TextReport_rb.html +1 -1
- data/doc/lib/reports/TimeSheetReport_rb.html +2 -2
- data/doc/lib/reports/TjpExportRE_rb.html +2 -2
- data/doc/lib/ruby-signal-bug_rb.html +1 -1
- data/doc/lib/taskjuggler3_rb.html +2 -2
- data/doc/lib/tj3client_rb.html +2 -2
- data/doc/lib/tj3d_rb.html +2 -2
- data/doc/lib/tj3man_rb.html +1 -1
- data/doc/lib/tj3ss_receiver_rb.html +1 -1
- data/doc/lib/tj3ss_sender_rb.html +2 -2
- data/doc/lib/tj3ts_receiver_rb.html +2 -2
- data/doc/lib/tj3ts_sender_rb.html +1 -1
- data/doc/lib/tj3ts_summary_rb.html +1 -1
- data/doc/rdoc.css +9 -4
- data/examples/tutorial.tjp +17 -15
- data/gem_spec.rb +3 -0
- data/lib/AppConfig.rb +3 -1
- data/lib/Attributes.rb +10 -8
- data/lib/Journal.rb +55 -20
- data/lib/Limits.rb +72 -46
- data/lib/LogFile.rb +3 -3
- data/lib/LogicalFunction.rb +19 -6
- data/lib/LogicalOperation.rb +5 -1
- data/lib/Project.rb +37 -9
- data/lib/ProjectFileParser.rb +25 -22
- data/lib/ProjectFileScanner.rb +365 -0
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +14 -4
- data/lib/PropertyTreeNode.rb +42 -29
- data/lib/Query.rb +3 -1
- data/lib/RTFHandlers.rb +35 -0
- data/lib/RTFReport.rb +23 -6
- data/lib/RTFReportLink.rb +72 -0
- data/lib/Resource.rb +8 -16
- data/lib/ResourceScenario.rb +1 -22
- data/lib/RichTextElement.rb +42 -0
- data/lib/RichTextParser.rb +6 -4
- data/lib/RichTextScanner.rb +5 -5
- data/lib/RichTextSyntaxRules.rb +48 -10
- data/lib/ScenarioData.rb +5 -3
- data/lib/SheetReceiver.rb +24 -6
- data/lib/SheetSender.rb +17 -13
- data/lib/ShiftAssignments.rb +56 -52
- data/lib/StatusSheetReceiver.rb +1 -0
- data/lib/StatusSheetSender.rb +1 -0
- data/lib/TableColumnDefinition.rb +4 -2
- data/lib/Task.rb +8 -9
- data/lib/TaskJuggler.rb +21 -11
- data/lib/TaskScenario.rb +61 -26
- data/lib/TextParser.rb +268 -106
- data/lib/TextParser/Rule.rb +4 -2
- data/lib/TextParser/StackElement.rb +6 -4
- data/lib/TextScanner.rb +283 -700
- data/lib/TimeSheetReceiver.rb +1 -0
- data/lib/TimeSheetSender.rb +1 -0
- data/lib/TimeSheetSummary.rb +51 -26
- data/lib/TimeSheets.rb +1 -1
- data/lib/Tj3AppBase.rb +8 -1
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +5 -0
- data/lib/TjpSyntaxRules.rb +360 -144
- data/lib/URLParameter.rb +30 -0
- data/lib/XMLDocument.rb +2 -2
- data/lib/daemon/ProcessIntercom.rb +50 -9
- data/lib/daemon/ProjectBroker.rb +63 -10
- data/lib/daemon/ProjectServer.rb +47 -16
- data/lib/daemon/ReportServer.rb +9 -4
- data/lib/daemon/WebServer.rb +204 -0
- data/lib/deep_copy.rb +4 -1
- data/lib/reports/CSVFile.rb +150 -66
- data/lib/reports/GanttChart.rb +2 -1
- data/lib/reports/Navigator.rb +18 -5
- data/lib/reports/NikuReport.rb +32 -2
- data/lib/reports/Report.rb +65 -37
- data/lib/reports/ReportBase.rb +14 -9
- data/lib/reports/ReportContext.rb +19 -4
- data/lib/reports/ReportTable.rb +2 -2
- data/lib/reports/ReportTableCell.rb +54 -30
- data/lib/reports/ResourceListRE.rb +4 -3
- data/lib/reports/StatusSheetReport.rb +8 -13
- data/lib/reports/TableReport.rb +47 -32
- data/lib/reports/TaskListRE.rb +3 -3
- data/lib/reports/TimeSheetReport.rb +14 -5
- data/lib/reports/TjpExportRE.rb +14 -19
- data/lib/taskjuggler3.rb +15 -0
- data/lib/tj3client.rb +9 -7
- data/lib/tj3d.rb +38 -10
- data/lib/tj3ss_sender.rb +7 -0
- data/lib/tj3ts_receiver.rb +1 -0
- data/manual/Day_To_Day_Juggling +1 -1
- data/manual/Rich_Text_Attributes +8 -0
- data/manual/TaskJuggler_2x_Migration +7 -0
- data/manual/The_TaskJuggler_Syntax +20 -6
- data/prj_cfg.rb +3 -2
- data/tasks/changelog.rake +36 -0
- data/tasks/csts.rake +2 -3
- data/tasks/gem.rake +10 -0
- data/tasks/missing.rake +0 -17
- data/test/TestSuite/ReportGenerator/Correct/Journal.html +63 -0
- data/test/TestSuite/ReportGenerator/Correct/Journal.tjp +14 -0
- data/test/TestSuite/{HTML-Reports/LogicalFunctions.tjp → ReportGenerator/Correct/LogicalFunctions1.tjp} +2 -2
- data/test/TestSuite/ReportGenerator/Correct/LogicalFunctions2.csv +3 -0
- data/test/TestSuite/ReportGenerator/Correct/LogicalFunctions2.tjp +19 -0
- data/test/TestSuite/ReportGenerator/Correct/css/tjmanual.css +66 -0
- data/test/TestSuite/ReportGenerator/Correct/css/tjreport.css +407 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/details.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/resource.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/task.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/trend-down.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/trend-flat.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/icons/trend-up.png +0 -0
- data/test/TestSuite/ReportGenerator/Correct/opennodes.csv +2 -0
- data/test/TestSuite/ReportGenerator/Correct/opennodes.tjp +26 -0
- data/test/TestSuite/ReportGenerator/Correct/refs/Journal-1.csv +6 -0
- data/test/TestSuite/ReportGenerator/Correct/refs/LogicalFunctions1-1.csv +7 -0
- data/test/TestSuite/ReportGenerator/Correct/refs/LogicalFunctions2-1.csv +2 -0
- data/test/TestSuite/ReportGenerator/Correct/refs/opennodes-1.csv +2 -0
- data/test/TestSuite/ReportGenerator/Correct/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/ReportGenerator/Errors/rtp_report_recursion.tjp +20 -0
- data/test/TestSuite/Scheduler/Correct/Container.html +349 -0
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -4
- data/test/TestSuite/Scheduler/Correct/Shift2.html +464 -150
- data/test/TestSuite/Scheduler/Correct/TimeSheet2.html +108 -0
- data/test/TestSuite/Scheduler/Correct/TimeSheet2.tjp +7 -0
- data/test/TestSuite/Scheduler/Correct/css/tjmanual.css +14 -0
- data/test/TestSuite/Scheduler/Correct/css/tjreport.css +233 -21
- data/test/TestSuite/Scheduler/Correct/scripts/wz_tooltip.js +20 -20
- data/test/TestSuite/StatusSheetTemplates/project.tji +35 -0
- data/test/TestSuite/StatusSheetTemplates/project.tjp +56 -0
- data/test/TestSuite/StatusSheets/run +3 -2
- data/test/TestSuite/Syntax/Correct/Include.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Macro-1.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Macro-2.tjp +6 -0
- data/test/TestSuite/Syntax/Correct/Macro-3.tjp +14 -0
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.html +32 -0
- data/test/TestSuite/Syntax/Correct/css/tjmanual.css +66 -0
- data/test/TestSuite/Syntax/Correct/css/tjreport.css +407 -0
- data/test/TestSuite/Syntax/Correct/icons/details.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resource.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/task.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/trend-down.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/trend-flat.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/trend-up.png +0 -0
- data/test/TestSuite/Syntax/Correct/include/dir1/file2.tji +3 -0
- data/test/TestSuite/Syntax/Correct/include/dir1/file5.tji +2 -0
- data/test/TestSuite/Syntax/Correct/include/dir3/all.tji +3 -0
- data/test/TestSuite/Syntax/Correct/include/dir3/file1.tji +2 -0
- data/test/TestSuite/Syntax/Correct/include/dir3/file2.tji +1 -0
- data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +13 -13
- data/test/TestSuite/Syntax/Errors/empty.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/include_recursion.tjp +1 -0
- data/test/TestSuite/Syntax/Errors/macro_stack_overflow.tjp +2 -1
- data/test/TestSuite/Syntax/Errors/{eof_in_istring1.tjp → no_token_match1.tjp} +2 -2
- data/test/TestSuite/Syntax/Errors/{eof_in_istring2.tjp → no_token_match2.tjp} +2 -2
- data/test/TestSuite/Syntax/Errors/{eof_in_istring3.tjp → no_token_match3.tjp} +1 -1
- data/test/TestSuite/Syntax/Errors/{eof_in_istring4.tjp → no_token_match4.tjp} +1 -1
- data/test/TestSuite/Syntax/Errors/{eof_in_istring5.tjp → no_token_match5.tjp} +1 -1
- data/test/TestSuite/Syntax/Errors/not_scheduled.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +1 -1
- data/test/TestSuite/TimeSheets/run +5 -5
- data/test/test_CSVFile.rb +75 -0
- data/test/test_Limits.rb +63 -5
- data/test/test_ProjectFileScanner.rb +163 -0
- data/test/test_ReportGenerator.rb +81 -0
- data/test/test_RichText.rb +21 -3
- data/test/test_Scheduler.rb +1 -1
- data/test/test_ShiftAssignments.rb +4 -4
- data/test/test_Syntax.rb +1 -1
- data/test/test_URLParameter.rb +30 -0
- metadata +126 -32
- data/test/TestSuite/Scheduler/Errors/not_scheduled.tjp +0 -8
- data/test/TestSuite/Syntax/Errors/bad_comment.tjp +0 -7
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/boss_2002-03-01.tji +0 -36
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev1_2002-03-01.tji +0 -48
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev2_2002-03-01.tji +0 -67
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev3_2002-03-01.tji +0 -67
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/doc_2002-03-01.tji +0 -48
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/resources.yml +0 -31
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/test_2002-03-01.tji +0 -36
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/acceptable_intervals +0 -1
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/all.tji +0 -1
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/dev2_2002-03-01.tji +0 -54
- data/test/TestSuite/TimeSheets/TimeSheets/all.tji +0 -2
- data/test/TestSuite/TimeSheets/receiver.log +0 -102
- data/test/TestSuite/TimeSheets/sender.log +0 -794
- data/test/TestSuite/TimeSheets/summary.log +0 -884
- data/test/TestSuite/TimeSheets/timesheets.log +0 -45
- data/test/TestSuite/TimeSheets/tj3d.log +0 -292
- data/test/test_TextScanner.rb +0 -95
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
<h3 class="section-header">Methods</h3>
|
|
70
70
|
<ul class="link-list">
|
|
71
71
|
|
|
72
|
-
<li><a href="#
|
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
|
73
73
|
|
|
74
|
-
<li><a href="#
|
|
74
|
+
<li><a href="#method-i-addEntry">#addEntry</a></li>
|
|
75
75
|
|
|
76
|
-
<li><a href="#
|
|
76
|
+
<li><a href="#method-i-to_html">#to_html</a></li>
|
|
77
77
|
|
|
78
78
|
</ul>
|
|
79
79
|
</div>
|
|
@@ -90,6 +90,8 @@
|
|
|
90
90
|
<h3 class="section-header">Files</h3>
|
|
91
91
|
<ul>
|
|
92
92
|
|
|
93
|
+
<li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
|
|
94
|
+
|
|
93
95
|
<li class="file"><a href="../COPYING.html">COPYING</a></li>
|
|
94
96
|
|
|
95
97
|
<li class="file"><a href="../README.html">README</a></li>
|
|
@@ -259,6 +261,8 @@
|
|
|
259
261
|
|
|
260
262
|
<li><a href="../TaskJuggler/NikuResource.html">TaskJuggler::NikuResource</a></li>
|
|
261
263
|
|
|
264
|
+
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
265
|
+
|
|
262
266
|
<li><a href="../TaskJuggler/OnShiftCache.html">TaskJuggler::OnShiftCache</a></li>
|
|
263
267
|
|
|
264
268
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
@@ -273,6 +277,8 @@
|
|
|
273
277
|
|
|
274
278
|
<li><a href="../TaskJuggler/ProjectFileParser.html">TaskJuggler::ProjectFileParser</a></li>
|
|
275
279
|
|
|
280
|
+
<li><a href="../TaskJuggler/ProjectFileScanner.html">TaskJuggler::ProjectFileScanner</a></li>
|
|
281
|
+
|
|
276
282
|
<li><a href="../TaskJuggler/ProjectRecord.html">TaskJuggler::ProjectRecord</a></li>
|
|
277
283
|
|
|
278
284
|
<li><a href="../TaskJuggler/ProjectServer.html">TaskJuggler::ProjectServer</a></li>
|
|
@@ -289,12 +295,16 @@
|
|
|
289
295
|
|
|
290
296
|
<li><a href="../TaskJuggler/Query.html">TaskJuggler::Query</a></li>
|
|
291
297
|
|
|
298
|
+
<li><a href="../TaskJuggler/RTFHandlers.html">TaskJuggler::RTFHandlers</a></li>
|
|
299
|
+
|
|
292
300
|
<li><a href="../TaskJuggler/RTFNavigator.html">TaskJuggler::RTFNavigator</a></li>
|
|
293
301
|
|
|
294
302
|
<li><a href="../TaskJuggler/RTFQuery.html">TaskJuggler::RTFQuery</a></li>
|
|
295
303
|
|
|
296
304
|
<li><a href="../TaskJuggler/RTFReport.html">TaskJuggler::RTFReport</a></li>
|
|
297
305
|
|
|
306
|
+
<li><a href="../TaskJuggler/RTFReportLink.html">TaskJuggler::RTFReportLink</a></li>
|
|
307
|
+
|
|
298
308
|
<li><a href="../TaskJuggler/RealFormat.html">TaskJuggler::RealFormat</a></li>
|
|
299
309
|
|
|
300
310
|
<li><a href="../TaskJuggler/RealFormatAttribute.html">TaskJuggler::RealFormatAttribute</a></li>
|
|
@@ -313,6 +323,8 @@
|
|
|
313
323
|
|
|
314
324
|
<li><a href="../TaskJuggler/ReportServerRecord.html">TaskJuggler::ReportServerRecord</a></li>
|
|
315
325
|
|
|
326
|
+
<li><a href="../TaskJuggler/ReportServlet.html">TaskJuggler::ReportServlet</a></li>
|
|
327
|
+
|
|
316
328
|
<li><a href="../TaskJuggler/ReportTable.html">TaskJuggler::ReportTable</a></li>
|
|
317
329
|
|
|
318
330
|
<li><a href="../TaskJuggler/ReportTableCell.html">TaskJuggler::ReportTableCell</a></li>
|
|
@@ -441,6 +453,8 @@
|
|
|
441
453
|
|
|
442
454
|
<li><a href="../TaskJuggler/TextScanner/FileStreamHandle.html">TaskJuggler::TextScanner::FileStreamHandle</a></li>
|
|
443
455
|
|
|
456
|
+
<li><a href="../TaskJuggler/TextScanner/MacroStackEntry.html">TaskJuggler::TextScanner::MacroStackEntry</a></li>
|
|
457
|
+
|
|
444
458
|
<li><a href="../TaskJuggler/TextScanner/StreamHandle.html">TaskJuggler::TextScanner::StreamHandle</a></li>
|
|
445
459
|
|
|
446
460
|
<li><a href="../TaskJuggler/TimeSheet.html">TaskJuggler::TimeSheet</a></li>
|
|
@@ -485,8 +499,12 @@
|
|
|
485
499
|
|
|
486
500
|
<li><a href="../TaskJuggler/TjpSyntaxRules.html">TaskJuggler::TjpSyntaxRules</a></li>
|
|
487
501
|
|
|
502
|
+
<li><a href="../TaskJuggler/URLParameter.html">TaskJuggler::URLParameter</a></li>
|
|
503
|
+
|
|
488
504
|
<li><a href="../TaskJuggler/UserManual.html">TaskJuggler::UserManual</a></li>
|
|
489
505
|
|
|
506
|
+
<li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
|
|
507
|
+
|
|
490
508
|
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
|
491
509
|
|
|
492
510
|
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
|
@@ -513,6 +531,8 @@
|
|
|
513
531
|
|
|
514
532
|
<li><a href="../String.html">String</a></li>
|
|
515
533
|
|
|
534
|
+
<li><a href="../StringIO.html">StringIO</a></li>
|
|
535
|
+
|
|
516
536
|
</ul>
|
|
517
537
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
518
538
|
</div>
|
|
@@ -547,7 +567,7 @@ section.
|
|
|
547
567
|
|
|
548
568
|
|
|
549
569
|
<div id="new-method" class="method-detail ">
|
|
550
|
-
<a name="
|
|
570
|
+
<a name="method-c-new"></a>
|
|
551
571
|
|
|
552
572
|
<div class="method-heading">
|
|
553
573
|
|
|
@@ -589,7 +609,7 @@ Create an empty <a href="TableOfContents.html">TableOfContents</a> object.
|
|
|
589
609
|
|
|
590
610
|
|
|
591
611
|
<div id="add-ntry-method" class="method-detail ">
|
|
592
|
-
<a name="
|
|
612
|
+
<a name="method-i-addEntry"></a>
|
|
593
613
|
|
|
594
614
|
<div class="method-heading">
|
|
595
615
|
|
|
@@ -628,7 +648,7 @@ reference.
|
|
|
628
648
|
|
|
629
649
|
|
|
630
650
|
<div id="to-html-method" class="method-detail ">
|
|
631
|
-
<a name="
|
|
651
|
+
<a name="method-i-to_html"></a>
|
|
632
652
|
|
|
633
653
|
<div class="method-heading">
|
|
634
654
|
|
|
@@ -69,59 +69,59 @@
|
|
|
69
69
|
<h3 class="section-header">Methods</h3>
|
|
70
70
|
<ul class="link-list">
|
|
71
71
|
|
|
72
|
-
<li><a href="#
|
|
72
|
+
<li><a href="#method-c-defaultColumnTitle">::defaultColumnTitle</a></li>
|
|
73
73
|
|
|
74
|
-
<li><a href="#
|
|
74
|
+
<li><a href="#method-c-new">::new</a></li>
|
|
75
75
|
|
|
76
|
-
<li><a href="#
|
|
76
|
+
<li><a href="#method-i-adjustReportPeriod">#adjustReportPeriod</a></li>
|
|
77
77
|
|
|
78
|
-
<li><a href="#
|
|
78
|
+
<li><a href="#method-i-alignment">#alignment</a></li>
|
|
79
79
|
|
|
80
|
-
<li><a href="#
|
|
80
|
+
<li><a href="#method-i-calculated%3F">#calculated?</a></li>
|
|
81
81
|
|
|
82
|
-
<li><a href="#
|
|
82
|
+
<li><a href="#method-i-checkCellText">#checkCellText</a></li>
|
|
83
83
|
|
|
84
|
-
<li><a href="#
|
|
84
|
+
<li><a href="#method-i-genCalChartHeader">#genCalChartHeader</a></li>
|
|
85
85
|
|
|
86
|
-
<li><a href="#
|
|
86
|
+
<li><a href="#method-i-genCalChartResourceCell">#genCalChartResourceCell</a></li>
|
|
87
87
|
|
|
88
|
-
<li><a href="#
|
|
88
|
+
<li><a href="#method-i-genCalChartTaskCell">#genCalChartTaskCell</a></li>
|
|
89
89
|
|
|
90
|
-
<li><a href="#
|
|
90
|
+
<li><a href="#method-i-genCalculatedCell">#genCalculatedCell</a></li>
|
|
91
91
|
|
|
92
|
-
<li><a href="#
|
|
92
|
+
<li><a href="#method-i-genStandardCell">#genStandardCell</a></li>
|
|
93
93
|
|
|
94
|
-
<li><a href="#
|
|
94
|
+
<li><a href="#method-i-generateHeaderCell">#generateHeaderCell</a></li>
|
|
95
95
|
|
|
96
|
-
<li><a href="#
|
|
96
|
+
<li><a href="#method-i-generateIntermediateFormat">#generateIntermediateFormat</a></li>
|
|
97
97
|
|
|
98
|
-
<li><a href="#
|
|
98
|
+
<li><a href="#method-i-generateResourceList">#generateResourceList</a></li>
|
|
99
99
|
|
|
100
|
-
<li><a href="#
|
|
100
|
+
<li><a href="#method-i-generateTableCell">#generateTableCell</a></li>
|
|
101
101
|
|
|
102
|
-
<li><a href="#
|
|
102
|
+
<li><a href="#method-i-generateTaskList">#generateTaskList</a></li>
|
|
103
103
|
|
|
104
|
-
<li><a href="#
|
|
104
|
+
<li><a href="#method-i-indent">#indent</a></li>
|
|
105
105
|
|
|
106
|
-
<li><a href="#
|
|
106
|
+
<li><a href="#method-i-newCell">#newCell</a></li>
|
|
107
107
|
|
|
108
|
-
<li><a href="#
|
|
108
|
+
<li><a href="#method-i-scenarioSpecific%3F">#scenarioSpecific?</a></li>
|
|
109
109
|
|
|
110
|
-
<li><a href="#
|
|
110
|
+
<li><a href="#method-i-setIndent">#setIndent</a></li>
|
|
111
111
|
|
|
112
|
-
<li><a href="#
|
|
112
|
+
<li><a href="#method-i-setReportPeriod">#setReportPeriod</a></li>
|
|
113
113
|
|
|
114
|
-
<li><a href="#
|
|
114
|
+
<li><a href="#method-i-setScenarioSettings">#setScenarioSettings</a></li>
|
|
115
115
|
|
|
116
|
-
<li><a href="#
|
|
116
|
+
<li><a href="#method-i-setStandardCellAttributes">#setStandardCellAttributes</a></li>
|
|
117
117
|
|
|
118
|
-
<li><a href="#
|
|
118
|
+
<li><a href="#method-i-supportedColumns">#supportedColumns</a></li>
|
|
119
119
|
|
|
120
|
-
<li><a href="#
|
|
120
|
+
<li><a href="#method-i-to_csv">#to_csv</a></li>
|
|
121
121
|
|
|
122
|
-
<li><a href="#
|
|
122
|
+
<li><a href="#method-i-to_html">#to_html</a></li>
|
|
123
123
|
|
|
124
|
-
<li><a href="#
|
|
124
|
+
<li><a href="#method-i-tryCellMerging">#tryCellMerging</a></li>
|
|
125
125
|
|
|
126
126
|
</ul>
|
|
127
127
|
</div>
|
|
@@ -138,6 +138,8 @@
|
|
|
138
138
|
<h3 class="section-header">Files</h3>
|
|
139
139
|
<ul>
|
|
140
140
|
|
|
141
|
+
<li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
|
|
142
|
+
|
|
141
143
|
<li class="file"><a href="../COPYING.html">COPYING</a></li>
|
|
142
144
|
|
|
143
145
|
<li class="file"><a href="../README.html">README</a></li>
|
|
@@ -307,6 +309,8 @@
|
|
|
307
309
|
|
|
308
310
|
<li><a href="../TaskJuggler/NikuResource.html">TaskJuggler::NikuResource</a></li>
|
|
309
311
|
|
|
312
|
+
<li><a href="../TaskJuggler/NodeListAttribute.html">TaskJuggler::NodeListAttribute</a></li>
|
|
313
|
+
|
|
310
314
|
<li><a href="../TaskJuggler/OnShiftCache.html">TaskJuggler::OnShiftCache</a></li>
|
|
311
315
|
|
|
312
316
|
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
|
@@ -321,6 +325,8 @@
|
|
|
321
325
|
|
|
322
326
|
<li><a href="../TaskJuggler/ProjectFileParser.html">TaskJuggler::ProjectFileParser</a></li>
|
|
323
327
|
|
|
328
|
+
<li><a href="../TaskJuggler/ProjectFileScanner.html">TaskJuggler::ProjectFileScanner</a></li>
|
|
329
|
+
|
|
324
330
|
<li><a href="../TaskJuggler/ProjectRecord.html">TaskJuggler::ProjectRecord</a></li>
|
|
325
331
|
|
|
326
332
|
<li><a href="../TaskJuggler/ProjectServer.html">TaskJuggler::ProjectServer</a></li>
|
|
@@ -337,12 +343,16 @@
|
|
|
337
343
|
|
|
338
344
|
<li><a href="../TaskJuggler/Query.html">TaskJuggler::Query</a></li>
|
|
339
345
|
|
|
346
|
+
<li><a href="../TaskJuggler/RTFHandlers.html">TaskJuggler::RTFHandlers</a></li>
|
|
347
|
+
|
|
340
348
|
<li><a href="../TaskJuggler/RTFNavigator.html">TaskJuggler::RTFNavigator</a></li>
|
|
341
349
|
|
|
342
350
|
<li><a href="../TaskJuggler/RTFQuery.html">TaskJuggler::RTFQuery</a></li>
|
|
343
351
|
|
|
344
352
|
<li><a href="../TaskJuggler/RTFReport.html">TaskJuggler::RTFReport</a></li>
|
|
345
353
|
|
|
354
|
+
<li><a href="../TaskJuggler/RTFReportLink.html">TaskJuggler::RTFReportLink</a></li>
|
|
355
|
+
|
|
346
356
|
<li><a href="../TaskJuggler/RealFormat.html">TaskJuggler::RealFormat</a></li>
|
|
347
357
|
|
|
348
358
|
<li><a href="../TaskJuggler/RealFormatAttribute.html">TaskJuggler::RealFormatAttribute</a></li>
|
|
@@ -361,6 +371,8 @@
|
|
|
361
371
|
|
|
362
372
|
<li><a href="../TaskJuggler/ReportServerRecord.html">TaskJuggler::ReportServerRecord</a></li>
|
|
363
373
|
|
|
374
|
+
<li><a href="../TaskJuggler/ReportServlet.html">TaskJuggler::ReportServlet</a></li>
|
|
375
|
+
|
|
364
376
|
<li><a href="../TaskJuggler/ReportTable.html">TaskJuggler::ReportTable</a></li>
|
|
365
377
|
|
|
366
378
|
<li><a href="../TaskJuggler/ReportTableCell.html">TaskJuggler::ReportTableCell</a></li>
|
|
@@ -489,6 +501,8 @@
|
|
|
489
501
|
|
|
490
502
|
<li><a href="../TaskJuggler/TextScanner/FileStreamHandle.html">TaskJuggler::TextScanner::FileStreamHandle</a></li>
|
|
491
503
|
|
|
504
|
+
<li><a href="../TaskJuggler/TextScanner/MacroStackEntry.html">TaskJuggler::TextScanner::MacroStackEntry</a></li>
|
|
505
|
+
|
|
492
506
|
<li><a href="../TaskJuggler/TextScanner/StreamHandle.html">TaskJuggler::TextScanner::StreamHandle</a></li>
|
|
493
507
|
|
|
494
508
|
<li><a href="../TaskJuggler/TimeSheet.html">TaskJuggler::TimeSheet</a></li>
|
|
@@ -533,8 +547,12 @@
|
|
|
533
547
|
|
|
534
548
|
<li><a href="../TaskJuggler/TjpSyntaxRules.html">TaskJuggler::TjpSyntaxRules</a></li>
|
|
535
549
|
|
|
550
|
+
<li><a href="../TaskJuggler/URLParameter.html">TaskJuggler::URLParameter</a></li>
|
|
551
|
+
|
|
536
552
|
<li><a href="../TaskJuggler/UserManual.html">TaskJuggler::UserManual</a></li>
|
|
537
553
|
|
|
554
|
+
<li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li>
|
|
555
|
+
|
|
538
556
|
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
|
539
557
|
|
|
540
558
|
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
|
@@ -561,6 +579,8 @@
|
|
|
561
579
|
|
|
562
580
|
<li><a href="../String.html">String</a></li>
|
|
563
581
|
|
|
582
|
+
<li><a href="../StringIO.html">StringIO</a></li>
|
|
583
|
+
|
|
564
584
|
</ul>
|
|
565
585
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
566
586
|
</div>
|
|
@@ -615,7 +635,7 @@ before the are turned into the requested output format.
|
|
|
615
635
|
|
|
616
636
|
|
|
617
637
|
<div id="default-olumn-itle-method" class="method-detail ">
|
|
618
|
-
<a name="
|
|
638
|
+
<a name="method-c-defaultColumnTitle"></a>
|
|
619
639
|
|
|
620
640
|
<div class="method-heading">
|
|
621
641
|
|
|
@@ -636,16 +656,16 @@ Returns the default column title for the columns <em>id</em>.
|
|
|
636
656
|
<div class="method-source-code"
|
|
637
657
|
id="default-olumn-itle-source">
|
|
638
658
|
<pre>
|
|
639
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
659
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 131</span>
|
|
660
|
+
131: <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>)
|
|
661
|
+
132: <span class="ruby-comment cmt"># Return an empty string for some special columns that don't have a fixed</span>
|
|
662
|
+
133: <span class="ruby-comment cmt"># title.</span>
|
|
663
|
+
134: <span class="ruby-identifier">specials</span> = <span class="ruby-node">%( chart hourly daily weekly monthly quarterly yearly)</span>
|
|
664
|
+
135: <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>)
|
|
665
|
+
136:
|
|
666
|
+
137: <span class="ruby-comment cmt"># Return the title for build-in hardwired columns.</span>
|
|
667
|
+
138: <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>
|
|
668
|
+
139: <span class="ruby-keyword kw">end</span></pre>
|
|
649
669
|
</div>
|
|
650
670
|
|
|
651
671
|
</div>
|
|
@@ -657,7 +677,7 @@ Returns the default column title for the columns <em>id</em>.
|
|
|
657
677
|
|
|
658
678
|
|
|
659
679
|
<div id="new-method" class="method-detail ">
|
|
660
|
-
<a name="
|
|
680
|
+
<a name="method-c-new"></a>
|
|
661
681
|
|
|
662
682
|
<div class="method-heading">
|
|
663
683
|
|
|
@@ -678,18 +698,18 @@ Generate a new <a href="TableReport.html">TableReport</a> object.
|
|
|
678
698
|
<div class="method-source-code"
|
|
679
699
|
id="new-source">
|
|
680
700
|
<pre>
|
|
681
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
74:
|
|
690
|
-
75: <span class="ruby-ivar">@legend</span> = <span class="ruby-constant">ReportTableLegend</span>.<span class="ruby-identifier">new</span>
|
|
701
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 69</span>
|
|
702
|
+
69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">report</span>)
|
|
703
|
+
70: <span class="ruby-keyword kw">super</span>
|
|
704
|
+
71: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>
|
|
705
|
+
72:
|
|
706
|
+
73: <span class="ruby-comment cmt"># Reference to the intermediate representation.</span>
|
|
707
|
+
74: <span class="ruby-ivar">@table</span> = <span class="ruby-keyword kw">nil</span>
|
|
708
|
+
75: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
691
709
|
76:
|
|
692
|
-
77:
|
|
710
|
+
77: <span class="ruby-ivar">@legend</span> = <span class="ruby-constant">ReportTableLegend</span>.<span class="ruby-identifier">new</span>
|
|
711
|
+
78:
|
|
712
|
+
79: <span class="ruby-keyword kw">end</span></pre>
|
|
693
713
|
</div>
|
|
694
714
|
|
|
695
715
|
</div>
|
|
@@ -707,7 +727,7 @@ Generate a new <a href="TableReport.html">TableReport</a> object.
|
|
|
707
727
|
|
|
708
728
|
|
|
709
729
|
<div id="alignment-method" class="method-detail ">
|
|
710
|
-
<a name="
|
|
730
|
+
<a name="method-i-alignment"></a>
|
|
711
731
|
|
|
712
732
|
<div class="method-heading">
|
|
713
733
|
|
|
@@ -729,16 +749,16 @@ Return the alignment of the column based on the <em>colId</em> or the
|
|
|
729
749
|
<div class="method-source-code"
|
|
730
750
|
id="alignment-source">
|
|
731
751
|
<pre>
|
|
732
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
752
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 155</span>
|
|
753
|
+
155: <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>)
|
|
754
|
+
156: <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>)
|
|
755
|
+
157: <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>]
|
|
756
|
+
158: <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>)
|
|
757
|
+
159: <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>]
|
|
758
|
+
160: <span class="ruby-keyword kw">else</span>
|
|
759
|
+
161: <span class="ruby-value">:center</span>
|
|
760
|
+
162: <span class="ruby-keyword kw">end</span>
|
|
761
|
+
163: <span class="ruby-keyword kw">end</span></pre>
|
|
742
762
|
</div>
|
|
743
763
|
|
|
744
764
|
</div>
|
|
@@ -750,7 +770,7 @@ Return the alignment of the column based on the <em>colId</em> or the
|
|
|
750
770
|
|
|
751
771
|
|
|
752
772
|
<div id="calculated--method" class="method-detail ">
|
|
753
|
-
<a name="
|
|
773
|
+
<a name="method-i-calculated%3F"></a>
|
|
754
774
|
|
|
755
775
|
<div class="method-heading">
|
|
756
776
|
|
|
@@ -772,10 +792,10 @@ to be calculated.
|
|
|
772
792
|
<div class="method-source-code"
|
|
773
793
|
id="calculated--source">
|
|
774
794
|
<pre>
|
|
775
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
795
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 167</span>
|
|
796
|
+
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculated?</span>(<span class="ruby-identifier">colId</span>)
|
|
797
|
+
168: <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>)
|
|
798
|
+
169: <span class="ruby-keyword kw">end</span></pre>
|
|
779
799
|
</div>
|
|
780
800
|
|
|
781
801
|
</div>
|
|
@@ -787,7 +807,7 @@ to be calculated.
|
|
|
787
807
|
|
|
788
808
|
|
|
789
809
|
<div id="generate-ntermediate-ormat-method" class="method-detail ">
|
|
790
|
-
<a name="
|
|
810
|
+
<a name="method-i-generateIntermediateFormat"></a>
|
|
791
811
|
|
|
792
812
|
<div class="method-heading">
|
|
793
813
|
|
|
@@ -806,10 +826,10 @@ to be calculated.
|
|
|
806
826
|
<div class="method-source-code"
|
|
807
827
|
id="generate-ntermediate-ormat-source">
|
|
808
828
|
<pre>
|
|
809
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
829
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 81</span>
|
|
830
|
+
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
831
|
+
82: <span class="ruby-keyword kw">super</span>
|
|
832
|
+
83: <span class="ruby-keyword kw">end</span></pre>
|
|
813
833
|
</div>
|
|
814
834
|
|
|
815
835
|
</div>
|
|
@@ -821,7 +841,7 @@ to be calculated.
|
|
|
821
841
|
|
|
822
842
|
|
|
823
843
|
<div id="indent-method" class="method-detail ">
|
|
824
|
-
<a name="
|
|
844
|
+
<a name="method-i-indent"></a>
|
|
825
845
|
|
|
826
846
|
<div class="method-heading">
|
|
827
847
|
|
|
@@ -843,16 +863,16 @@ or the <em>propertyType</em>.
|
|
|
843
863
|
<div class="method-source-code"
|
|
844
864
|
id="indent-source">
|
|
845
865
|
<pre>
|
|
846
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
866
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 143</span>
|
|
867
|
+
143: <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>)
|
|
868
|
+
144: <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>)
|
|
869
|
+
145: <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>]
|
|
870
|
+
146: <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>)
|
|
871
|
+
147: <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>]
|
|
872
|
+
148: <span class="ruby-keyword kw">else</span>
|
|
873
|
+
149: <span class="ruby-keyword kw">false</span>
|
|
874
|
+
150: <span class="ruby-keyword kw">end</span>
|
|
875
|
+
151: <span class="ruby-keyword kw">end</span></pre>
|
|
856
876
|
</div>
|
|
857
877
|
|
|
858
878
|
</div>
|
|
@@ -864,7 +884,7 @@ or the <em>propertyType</em>.
|
|
|
864
884
|
|
|
865
885
|
|
|
866
886
|
<div id="scenario-pecific--method" class="method-detail ">
|
|
867
|
-
<a name="
|
|
887
|
+
<a name="method-i-scenarioSpecific%3F"></a>
|
|
868
888
|
|
|
869
889
|
<div class="method-heading">
|
|
870
890
|
|
|
@@ -886,13 +906,13 @@ are scenario specific.
|
|
|
886
906
|
<div class="method-source-code"
|
|
887
907
|
id="scenario-pecific--source">
|
|
888
908
|
<pre>
|
|
889
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
909
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 173</span>
|
|
910
|
+
173: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">colId</span>)
|
|
911
|
+
174: <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>)
|
|
912
|
+
175: <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>]
|
|
913
|
+
176: <span class="ruby-keyword kw">end</span>
|
|
914
|
+
177: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
915
|
+
178: <span class="ruby-keyword kw">end</span></pre>
|
|
896
916
|
</div>
|
|
897
917
|
|
|
898
918
|
</div>
|
|
@@ -904,7 +924,7 @@ are scenario specific.
|
|
|
904
924
|
|
|
905
925
|
|
|
906
926
|
<div id="supported-olumns-method" class="method-detail ">
|
|
907
|
-
<a name="
|
|
927
|
+
<a name="method-i-supportedColumns"></a>
|
|
908
928
|
|
|
909
929
|
<div class="method-heading">
|
|
910
930
|
|
|
@@ -923,10 +943,10 @@ are scenario specific.
|
|
|
923
943
|
<div class="method-source-code"
|
|
924
944
|
id="supported-olumns-source">
|
|
925
945
|
<pre>
|
|
926
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
946
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 180</span>
|
|
947
|
+
180: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supportedColumns</span>
|
|
948
|
+
181: <span class="ruby-identifier">@@propertiesById</span>.<span class="ruby-identifier">keys</span>
|
|
949
|
+
182: <span class="ruby-keyword kw">end</span></pre>
|
|
930
950
|
</div>
|
|
931
951
|
|
|
932
952
|
</div>
|
|
@@ -938,7 +958,7 @@ are scenario specific.
|
|
|
938
958
|
|
|
939
959
|
|
|
940
960
|
<div id="to-csv-method" class="method-detail ">
|
|
941
|
-
<a name="
|
|
961
|
+
<a name="method-i-to_csv"></a>
|
|
942
962
|
|
|
943
963
|
<div class="method-heading">
|
|
944
964
|
|
|
@@ -961,10 +981,10 @@ column.
|
|
|
961
981
|
<div class="method-source-code"
|
|
962
982
|
id="to-csv-source">
|
|
963
983
|
<pre>
|
|
964
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
984
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 126</span>
|
|
985
|
+
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>
|
|
986
|
+
127: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_csv</span>
|
|
987
|
+
128: <span class="ruby-keyword kw">end</span></pre>
|
|
968
988
|
</div>
|
|
969
989
|
|
|
970
990
|
</div>
|
|
@@ -976,7 +996,7 @@ column.
|
|
|
976
996
|
|
|
977
997
|
|
|
978
998
|
<div id="to-html-method" class="method-detail ">
|
|
979
|
-
<a name="
|
|
999
|
+
<a name="method-i-to_html"></a>
|
|
980
1000
|
|
|
981
1001
|
<div class="method-heading">
|
|
982
1002
|
|
|
@@ -998,41 +1018,44 @@ element tree.
|
|
|
998
1018
|
<div class="method-source-code"
|
|
999
1019
|
id="to-html-source">
|
|
1000
1020
|
<pre>
|
|
1001
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1021
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 86</span>
|
|
1022
|
+
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_html</span>
|
|
1023
|
+
87: <span class="ruby-identifier">html</span> = []
|
|
1024
|
+
88:
|
|
1025
|
+
89: <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>
|
|
1026
|
+
90: <span class="ruby-node">"#{@report.project.reportContexts.last.
|
|
1027
|
+
91: dynamicReportId}"</span>)
|
|
1028
|
+
92: <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>)
|
|
1029
|
+
93: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tableFrame</span> = <span class="ruby-identifier">generateHtmlTableFrame</span>)
|
|
1030
|
+
94:
|
|
1031
|
+
95: <span class="ruby-comment cmt"># Now generate the actual table with the data.</span>
|
|
1032
|
+
96: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1033
|
+
97: <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>)
|
|
1034
|
+
98: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_html</span>
|
|
1035
|
+
99: <span class="ruby-identifier">td</span>
|
|
1036
|
+
100: <span class="ruby-keyword kw">end</span>
|
|
1037
|
+
101:
|
|
1038
|
+
102: <span class="ruby-comment cmt"># Embedd the caption as RichText into the table footer.</span>
|
|
1039
|
+
103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>)
|
|
1040
|
+
104: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1041
|
+
105: <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>)
|
|
1042
|
+
106: <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>))
|
|
1043
|
+
107: <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>
|
|
1044
|
+
108: <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>
|
|
1045
|
+
109: <span class="ruby-identifier">td</span>
|
|
1046
|
+
110: <span class="ruby-keyword kw">end</span>
|
|
1047
|
+
111: <span class="ruby-keyword kw">end</span>
|
|
1048
|
+
112:
|
|
1049
|
+
113: <span class="ruby-comment cmt"># The legend.</span>
|
|
1050
|
+
114: <span class="ruby-identifier">tableFrame</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">generateHtmlTableRow</span> <span class="ruby-keyword kw">do</span>
|
|
1051
|
+
115: <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>)
|
|
1052
|
+
116: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@legend</span>.<span class="ruby-identifier">to_html</span>
|
|
1053
|
+
117: <span class="ruby-identifier">td</span>
|
|
1054
|
+
118: <span class="ruby-keyword kw">end</span>
|
|
1055
|
+
119:
|
|
1056
|
+
120: <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>)
|
|
1057
|
+
121: <span class="ruby-identifier">html</span>
|
|
1058
|
+
122: <span class="ruby-keyword kw">end</span></pre>
|
|
1036
1059
|
</div>
|
|
1037
1060
|
|
|
1038
1061
|
</div>
|
|
@@ -1050,7 +1073,7 @@ element tree.
|
|
|
1050
1073
|
|
|
1051
1074
|
|
|
1052
1075
|
<div id="adjust-eport-eriod-method" class="method-detail ">
|
|
1053
|
-
<a name="
|
|
1076
|
+
<a name="method-i-adjustReportPeriod"></a>
|
|
1054
1077
|
|
|
1055
1078
|
<div class="method-heading">
|
|
1056
1079
|
|
|
@@ -1073,72 +1096,72 @@ is a list of scenario indexes.
|
|
|
1073
1096
|
<div class="method-source-code"
|
|
1074
1097
|
id="adjust-eport-eriod-source">
|
|
1075
1098
|
<pre>
|
|
1076
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
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
|
-
|
|
1099
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 196</span>
|
|
1100
|
+
196: <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>)
|
|
1101
|
+
197: <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>
|
|
1102
|
+
198: <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>]
|
|
1103
|
+
199:
|
|
1104
|
+
200: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
1105
|
+
201: <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>
|
|
1106
|
+
202: <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>
|
|
1107
|
+
203: <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>]
|
|
1108
|
+
204: <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>
|
|
1109
|
+
205: <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>]
|
|
1110
|
+
206: <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>
|
|
1111
|
+
207: <span class="ruby-keyword kw">end</span>
|
|
1112
|
+
208: <span class="ruby-keyword kw">end</span>
|
|
1113
|
+
209: <span class="ruby-comment cmt"># We want to add at least 5% on both ends.</span>
|
|
1114
|
+
210: <span class="ruby-identifier">margin</span> = <span class="ruby-value">0</span>
|
|
1115
|
+
211: <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>
|
|
1116
|
+
212: <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>
|
|
1117
|
+
213: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
1118
|
+
214: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
1119
|
+
215: <span class="ruby-comment cmt"># In case we have a 'chart' column, we enforce certain minimum width</span>
|
|
1120
|
+
216: <span class="ruby-comment cmt"># The following table contains an entry for each scale. The entry</span>
|
|
1121
|
+
217: <span class="ruby-comment cmt"># consists of the triple 'seconds per unit', 'minimum width units'</span>
|
|
1122
|
+
218: <span class="ruby-comment cmt"># and 'margin units'. The minimum with does not include the margins</span>
|
|
1123
|
+
219: <span class="ruby-comment cmt"># since they are always added.</span>
|
|
1124
|
+
220: <span class="ruby-identifier">mwMap</span> = {
|
|
1125
|
+
221: <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> ],
|
|
1126
|
+
222: <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> ],
|
|
1127
|
+
223: <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> ],
|
|
1128
|
+
224: <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> ],
|
|
1129
|
+
225: <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> ],
|
|
1130
|
+
226: <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> ]
|
|
1131
|
+
227: }
|
|
1132
|
+
228: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">scale</span>]
|
|
1133
|
+
229: <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>
|
|
1134
|
+
230: <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>]
|
|
1135
|
+
231: <span class="ruby-comment cmt"># If the with determined by start and end dates of the task is below</span>
|
|
1136
|
+
232: <span class="ruby-comment cmt"># the minimum width, we increase the width to the value provided by</span>
|
|
1137
|
+
233: <span class="ruby-comment cmt"># the table.</span>
|
|
1138
|
+
234: <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>]
|
|
1139
|
+
235: <span class="ruby-keyword kw">break</span>
|
|
1140
|
+
236: <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>
|
|
1141
|
+
237: <span class="ruby-comment cmt"># For the calendar columns we use a similar approach as we use for</span>
|
|
1142
|
+
238: <span class="ruby-comment cmt"># the 'chart' column.</span>
|
|
1143
|
+
239: <span class="ruby-identifier">mwMap</span> = {
|
|
1144
|
+
240: <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> ],
|
|
1145
|
+
241: <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> ],
|
|
1146
|
+
242: <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> ],
|
|
1147
|
+
243: <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> ],
|
|
1148
|
+
244: <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> ],
|
|
1149
|
+
245: <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> ]
|
|
1150
|
+
246: }
|
|
1151
|
+
247: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>]
|
|
1152
|
+
248: <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>
|
|
1153
|
+
249: <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>]
|
|
1154
|
+
250: <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>]
|
|
1155
|
+
251: <span class="ruby-keyword kw">break</span>
|
|
1156
|
+
252: <span class="ruby-keyword kw">end</span>
|
|
1157
|
+
253: <span class="ruby-keyword kw">end</span>
|
|
1158
|
+
254:
|
|
1159
|
+
255: <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>)
|
|
1160
|
+
256: <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>
|
|
1161
|
+
257: <span class="ruby-keyword kw">end</span>
|
|
1162
|
+
258: <span class="ruby-ivar">@start</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">margin</span>
|
|
1163
|
+
259: <span class="ruby-ivar">@end</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">margin</span>
|
|
1164
|
+
260: <span class="ruby-keyword kw">end</span></pre>
|
|
1142
1165
|
</div>
|
|
1143
1166
|
|
|
1144
1167
|
</div>
|
|
@@ -1150,7 +1173,7 @@ is a list of scenario indexes.
|
|
|
1150
1173
|
|
|
1151
1174
|
|
|
1152
1175
|
<div id="generate-eader-ell-method" class="method-detail ">
|
|
1153
|
-
<a name="
|
|
1176
|
+
<a name="method-i-generateHeaderCell"></a>
|
|
1154
1177
|
|
|
1155
1178
|
<div class="method-heading">
|
|
1156
1179
|
|
|
@@ -1174,55 +1197,55 @@ to be taken to generate the header text.
|
|
|
1174
1197
|
<div class="method-source-code"
|
|
1175
1198
|
id="generate-eader-ell-source">
|
|
1176
1199
|
<pre>
|
|
1177
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1200
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 265</span>
|
|
1201
|
+
265: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHeaderCell</span>(<span class="ruby-identifier">columnDef</span>)
|
|
1202
|
+
266: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1203
|
+
267: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
1204
|
+
268: <span class="ruby-comment cmt"># For the 'chart' column we generate a GanttChart object. The sizes are</span>
|
|
1205
|
+
269: <span class="ruby-comment cmt"># set so that the lines of the Gantt chart line up with the lines of the</span>
|
|
1206
|
+
270: <span class="ruby-comment cmt"># table.</span>
|
|
1207
|
+
271: <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>),
|
|
1208
|
+
272: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'weekStartsMonday'</span>), <span class="ruby-keyword kw">self</span>)
|
|
1209
|
+
273: <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>)
|
|
1210
|
+
274: <span class="ruby-comment cmt"># The header consists of 2 lines separated by a 1 pixel boundary.</span>
|
|
1211
|
+
275: <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>
|
|
1212
|
+
276: <span class="ruby-comment cmt"># The maximum width of the chart. In case it needs more space, a</span>
|
|
1213
|
+
277: <span class="ruby-comment cmt"># scrollbar is shown or the chart gets truncated depending on the output</span>
|
|
1214
|
+
278: <span class="ruby-comment cmt"># format.</span>
|
|
1215
|
+
279: <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>
|
|
1216
|
+
280: <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>)
|
|
1217
|
+
281: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span> = <span class="ruby-identifier">gantt</span>
|
|
1218
|
+
282: <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>
|
|
1219
|
+
283: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">scrollbar</span> = <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">hasScrollbar?</span>
|
|
1220
|
+
284: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1221
|
+
285: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>
|
|
1222
|
+
286: <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>,
|
|
1223
|
+
287: <span class="ruby-value">:weekdayAndDate</span>, <span class="ruby-value">:hour</span>)
|
|
1224
|
+
288: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
1225
|
+
289: <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>,
|
|
1226
|
+
290: <span class="ruby-value">:monthAndYear</span>, <span class="ruby-value">:day</span>)
|
|
1227
|
+
291: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'weekly'</span>
|
|
1228
|
+
292: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>,
|
|
1229
|
+
293: <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>)),
|
|
1230
|
+
294: <span class="ruby-value">:sameTimeNextWeek</span>, <span class="ruby-value">:monthAndYear</span>, <span class="ruby-value">:day</span>)
|
|
1231
|
+
295: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'monthly'</span>
|
|
1232
|
+
296: <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>,
|
|
1233
|
+
297: <span class="ruby-value">:year</span>, <span class="ruby-value">:shortMonthName</span>)
|
|
1234
|
+
298: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'quarterly'</span>
|
|
1235
|
+
299: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfQuarter</span>,
|
|
1236
|
+
300: <span class="ruby-value">:sameTimeNextQuarter</span>, <span class="ruby-value">:year</span>, <span class="ruby-value">:quarterName</span>)
|
|
1237
|
+
301: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'yearly'</span>
|
|
1238
|
+
302: <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>,
|
|
1239
|
+
303: <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">:year</span>)
|
|
1240
|
+
304: <span class="ruby-keyword kw">else</span>
|
|
1241
|
+
305: <span class="ruby-comment cmt"># This is the most common case. It does not need any special treatment.</span>
|
|
1242
|
+
306: <span class="ruby-comment cmt"># We just set the pre-defined or user-defined column title in the first</span>
|
|
1243
|
+
307: <span class="ruby-comment cmt"># row of the header. The 2nd row is not visible.</span>
|
|
1244
|
+
308: <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>)
|
|
1245
|
+
309: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">rows</span> = <span class="ruby-value">2</span>
|
|
1246
|
+
310: <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>
|
|
1247
|
+
311: <span class="ruby-keyword kw">end</span>
|
|
1248
|
+
312: <span class="ruby-keyword kw">end</span></pre>
|
|
1226
1249
|
</div>
|
|
1227
1250
|
|
|
1228
1251
|
</div>
|
|
@@ -1234,7 +1257,7 @@ to be taken to generate the header text.
|
|
|
1234
1257
|
|
|
1235
1258
|
|
|
1236
1259
|
<div id="generate-esource-ist-method" class="method-detail ">
|
|
1237
|
-
<a name="
|
|
1260
|
+
<a name="method-i-generateResourceList"></a>
|
|
1238
1261
|
|
|
1239
1262
|
<div class="method-heading">
|
|
1240
1263
|
|
|
@@ -1259,67 +1282,67 @@ resource lines will be within the scope this task line.
|
|
|
1259
1282
|
<div class="method-source-code"
|
|
1260
1283
|
id="generate-esource-ist-source">
|
|
1261
1284
|
<pre>
|
|
1262
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
411:
|
|
1297
|
-
412: <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>
|
|
1298
|
-
413: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1299
|
-
414: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1300
|
-
415: <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>)
|
|
1285
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 383</span>
|
|
1286
|
+
383: <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>)
|
|
1287
|
+
384: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1288
|
+
385: <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>,
|
|
1289
|
+
386: <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>),
|
|
1290
|
+
387: <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>),
|
|
1291
|
+
388: <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>),
|
|
1292
|
+
389: <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>),
|
|
1293
|
+
390: <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>,
|
|
1294
|
+
391: <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>),
|
|
1295
|
+
392: <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>) }
|
|
1296
|
+
393: <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>)
|
|
1297
|
+
394: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
1298
|
+
395:
|
|
1299
|
+
396: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
1300
|
+
397: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
1301
|
+
398: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
1302
|
+
399: <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>
|
|
1303
|
+
400: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
1304
|
+
401: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
1305
|
+
402: <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>
|
|
1306
|
+
403: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
1307
|
+
404: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
1308
|
+
405: <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>
|
|
1309
|
+
406: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">resource</span>
|
|
1310
|
+
407: <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>
|
|
1311
|
+
408:
|
|
1312
|
+
409: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1313
|
+
410: <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>
|
|
1314
|
+
411: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1315
|
+
412: <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>
|
|
1316
|
+
413: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
1317
|
+
414: <span class="ruby-comment cmt"># Generate line for each resource.</span>
|
|
1318
|
+
415: <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>)
|
|
1301
1319
|
416:
|
|
1302
|
-
417: <span class="ruby-
|
|
1303
|
-
418: <span class="ruby-identifier">
|
|
1304
|
-
419:
|
|
1305
|
-
420:
|
|
1306
|
-
421:
|
|
1307
|
-
422:
|
|
1308
|
-
423:
|
|
1309
|
-
424:
|
|
1310
|
-
425:
|
|
1311
|
-
426: <span class="ruby-
|
|
1312
|
-
427:
|
|
1313
|
-
428:
|
|
1314
|
-
429:
|
|
1315
|
-
430:
|
|
1316
|
-
431:
|
|
1317
|
-
432: <span class="ruby-
|
|
1318
|
-
433: <span class="ruby-identifier">
|
|
1319
|
-
434:
|
|
1320
|
-
435:
|
|
1321
|
-
436:
|
|
1322
|
-
437:
|
|
1320
|
+
417: <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>
|
|
1321
|
+
418: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1322
|
+
419: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1323
|
+
420: <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>)
|
|
1324
|
+
421:
|
|
1325
|
+
422: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
1326
|
+
423: <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>
|
|
1327
|
+
424: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
1328
|
+
425: <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>)
|
|
1329
|
+
426: <span class="ruby-keyword kw">end</span>
|
|
1330
|
+
427: <span class="ruby-keyword kw">end</span>
|
|
1331
|
+
428:
|
|
1332
|
+
429: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">taskList</span>
|
|
1333
|
+
430: <span class="ruby-comment cmt"># If we have a taskList we generate nested lines for each of the</span>
|
|
1334
|
+
431: <span class="ruby-comment cmt"># tasks that the resource is assigned to and pass the user-defined</span>
|
|
1335
|
+
432: <span class="ruby-comment cmt"># filter.</span>
|
|
1336
|
+
433: <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>))
|
|
1337
|
+
434: <span class="ruby-identifier">assignedTaskList</span> = <span class="ruby-identifier">filterTaskList</span>(<span class="ruby-identifier">taskList</span>, <span class="ruby-identifier">resource</span>,
|
|
1338
|
+
435: <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>),
|
|
1339
|
+
436: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'openNodes'</span>))
|
|
1340
|
+
437: <span class="ruby-identifier">assignedTaskList</span>.<span class="ruby-identifier">sort!</span>
|
|
1341
|
+
438: <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>)
|
|
1342
|
+
439: <span class="ruby-keyword kw">end</span>
|
|
1343
|
+
440: <span class="ruby-keyword kw">end</span>
|
|
1344
|
+
441: <span class="ruby-identifier">lineNo</span>
|
|
1345
|
+
442: <span class="ruby-keyword kw">end</span></pre>
|
|
1323
1346
|
</div>
|
|
1324
1347
|
|
|
1325
1348
|
</div>
|
|
@@ -1331,7 +1354,7 @@ resource lines will be within the scope this task line.
|
|
|
1331
1354
|
|
|
1332
1355
|
|
|
1333
1356
|
<div id="generate-ask-ist-method" class="method-detail ">
|
|
1334
|
-
<a name="
|
|
1357
|
+
<a name="method-i-generateTaskList"></a>
|
|
1335
1358
|
|
|
1336
1359
|
<div class="method-heading">
|
|
1337
1360
|
|
|
@@ -1356,66 +1379,66 @@ generated task lines will be within the scope this resource line.
|
|
|
1356
1379
|
<div class="method-source-code"
|
|
1357
1380
|
id="generate-ask-ist-source">
|
|
1358
1381
|
<pre>
|
|
1359
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
347:
|
|
1394
|
-
348: <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>
|
|
1395
|
-
349: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1396
|
-
350: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1397
|
-
351: <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>)
|
|
1382
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 319</span>
|
|
1383
|
+
319: <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>)
|
|
1384
|
+
320: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
1385
|
+
321: <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>,
|
|
1386
|
+
322: <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>),
|
|
1387
|
+
323: <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>),
|
|
1388
|
+
324: <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>),
|
|
1389
|
+
325: <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>),
|
|
1390
|
+
326: <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>,
|
|
1391
|
+
327: <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>),
|
|
1392
|
+
328: <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>) }
|
|
1393
|
+
329: <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>)
|
|
1394
|
+
330: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">sort!</span>
|
|
1395
|
+
331:
|
|
1396
|
+
332: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
1397
|
+
333: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
1398
|
+
334: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
1399
|
+
335: <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>
|
|
1400
|
+
336: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
1401
|
+
337: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
1402
|
+
338: <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>
|
|
1403
|
+
339: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
1404
|
+
340: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
1405
|
+
341: <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>
|
|
1406
|
+
342: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">task</span>
|
|
1407
|
+
343: <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>
|
|
1408
|
+
344:
|
|
1409
|
+
345: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1410
|
+
346: <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>
|
|
1411
|
+
347: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1412
|
+
348: <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>
|
|
1413
|
+
349: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
1414
|
+
350: <span class="ruby-comment cmt"># Generate line for each task.</span>
|
|
1415
|
+
351: <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>)
|
|
1398
1416
|
352:
|
|
1399
|
-
353: <span class="ruby-
|
|
1400
|
-
354: <span class="ruby-identifier">
|
|
1401
|
-
355:
|
|
1402
|
-
356:
|
|
1403
|
-
357:
|
|
1404
|
-
358:
|
|
1405
|
-
359:
|
|
1406
|
-
360:
|
|
1407
|
-
361:
|
|
1408
|
-
362: <span class="ruby-
|
|
1409
|
-
363:
|
|
1410
|
-
364:
|
|
1411
|
-
365:
|
|
1412
|
-
366:
|
|
1413
|
-
367: <span class="ruby-
|
|
1414
|
-
368: <span class="ruby-
|
|
1415
|
-
369:
|
|
1416
|
-
370:
|
|
1417
|
-
371:
|
|
1418
|
-
372:
|
|
1417
|
+
353: <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>
|
|
1418
|
+
354: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
1419
|
+
355: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
1420
|
+
356: <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>)
|
|
1421
|
+
357:
|
|
1422
|
+
358: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
1423
|
+
359: <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>
|
|
1424
|
+
360: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1425
|
+
361: <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>)
|
|
1426
|
+
362: <span class="ruby-keyword kw">end</span>
|
|
1427
|
+
363: <span class="ruby-keyword kw">end</span>
|
|
1428
|
+
364:
|
|
1429
|
+
365: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resourceList</span>
|
|
1430
|
+
366: <span class="ruby-comment cmt"># If we have a resourceList we generate nested lines for each of the</span>
|
|
1431
|
+
367: <span class="ruby-comment cmt"># resources that are assigned to this task and pass the user-defined</span>
|
|
1432
|
+
368: <span class="ruby-comment cmt"># filter.</span>
|
|
1433
|
+
369: <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>))
|
|
1434
|
+
370: <span class="ruby-identifier">assignedResourceList</span> = <span class="ruby-identifier">filterResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">task</span>,
|
|
1435
|
+
371: <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>))
|
|
1436
|
+
372: <span class="ruby-identifier">assignedResourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
1437
|
+
373: <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>)
|
|
1438
|
+
374: <span class="ruby-keyword kw">end</span>
|
|
1439
|
+
375: <span class="ruby-keyword kw">end</span>
|
|
1440
|
+
376: <span class="ruby-identifier">lineNo</span>
|
|
1441
|
+
377: <span class="ruby-keyword kw">end</span></pre>
|
|
1419
1442
|
</div>
|
|
1420
1443
|
|
|
1421
1444
|
</div>
|
|
@@ -1427,7 +1450,7 @@ generated task lines will be within the scope this resource line.
|
|
|
1427
1450
|
|
|
1428
1451
|
|
|
1429
1452
|
<div id="set-eport-eriod-method" class="method-detail ">
|
|
1430
|
-
<a name="
|
|
1453
|
+
<a name="method-i-setReportPeriod"></a>
|
|
1431
1454
|
|
|
1432
1455
|
<div class="method-heading">
|
|
1433
1456
|
|
|
@@ -1449,11 +1472,11 @@ been changed afterwards.
|
|
|
1449
1472
|
<div class="method-source-code"
|
|
1450
1473
|
id="set-eport-eriod-source">
|
|
1451
1474
|
<pre>
|
|
1452
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1475
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 188</span>
|
|
1476
|
+
188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReportPeriod</span>
|
|
1477
|
+
189: <span class="ruby-ivar">@start</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
|
|
1478
|
+
190: <span class="ruby-ivar">@end</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
|
|
1479
|
+
191: <span class="ruby-keyword kw">end</span></pre>
|
|
1457
1480
|
</div>
|
|
1458
1481
|
|
|
1459
1482
|
</div>
|
|
@@ -1471,7 +1494,7 @@ been changed afterwards.
|
|
|
1471
1494
|
|
|
1472
1495
|
|
|
1473
1496
|
<div id="check-ell-ext-method" class="method-detail ">
|
|
1474
|
-
<a name="
|
|
1497
|
+
<a name="method-i-checkCellText"></a>
|
|
1475
1498
|
|
|
1476
1499
|
<div class="method-heading">
|
|
1477
1500
|
|
|
@@ -1493,13 +1516,13 @@ error. This could happen after scheduling errors.
|
|
|
1493
1516
|
<div class="method-source-code"
|
|
1494
1517
|
id="check-ell-ext-source">
|
|
1495
1518
|
<pre>
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1519
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 1009</span>
|
|
1520
|
+
1009: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
1521
|
+
1010: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span>
|
|
1522
|
+
1011: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-value str">'<Error>'</span>
|
|
1523
|
+
1012: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontColor</span> = <span class="ruby-value str">'#FF0000'</span>
|
|
1524
|
+
1013: <span class="ruby-keyword kw">end</span>
|
|
1525
|
+
1014: <span class="ruby-keyword kw">end</span></pre>
|
|
1503
1526
|
</div>
|
|
1504
1527
|
|
|
1505
1528
|
</div>
|
|
@@ -1511,7 +1534,7 @@ error. This could happen after scheduling errors.
|
|
|
1511
1534
|
|
|
1512
1535
|
|
|
1513
1536
|
<div id="gen-al-hart-eader-method" class="method-detail ">
|
|
1514
|
-
<a name="
|
|
1537
|
+
<a name="method-i-genCalChartHeader"></a>
|
|
1515
1538
|
|
|
1516
1539
|
<div class="method-heading">
|
|
1517
1540
|
|
|
@@ -1538,67 +1561,67 @@ the particular column.
|
|
|
1538
1561
|
<div class="method-source-code"
|
|
1539
1562
|
id="gen-al-hart-eader-source">
|
|
1540
1563
|
<pre>
|
|
1541
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1564
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 452</span>
|
|
1565
|
+
452: <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>)
|
|
1566
|
+
453: <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>)
|
|
1567
|
+
454:
|
|
1568
|
+
455: <span class="ruby-comment cmt"># Calendar chars only work when all lines have same height.</span>
|
|
1569
|
+
456: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1570
|
+
457:
|
|
1571
|
+
458: <span class="ruby-comment cmt"># Embedded tables have unpredictable width. So we always need to make room</span>
|
|
1572
|
+
459: <span class="ruby-comment cmt"># for a potential scrollbar.</span>
|
|
1573
|
+
460: <span class="ruby-identifier">tableColumn</span>.<span class="ruby-identifier">scrollbar</span> = <span class="ruby-keyword kw">true</span>
|
|
1574
|
+
461:
|
|
1575
|
+
462: <span class="ruby-comment cmt"># Create the table that is embedded in this column.</span>
|
|
1576
|
+
463: <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>
|
|
1577
|
+
464: <span class="ruby-identifier">table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
1578
|
+
465: <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>
|
|
1579
|
+
466: <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>
|
|
1580
|
+
467:
|
|
1581
|
+
468: <span class="ruby-comment cmt"># Iterate over the report interval until we hit the end date. The</span>
|
|
1582
|
+
469: <span class="ruby-comment cmt"># iteration is done with 2 nested loops. The outer loops generates the</span>
|
|
1583
|
+
470: <span class="ruby-comment cmt"># intervals for the upper (larger) scale. The inner loop generates the</span>
|
|
1584
|
+
471: <span class="ruby-comment cmt"># lower (smaller) scale.</span>
|
|
1585
|
+
472: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1586
|
+
473: <span class="ruby-identifier">cellsInInterval</span> = <span class="ruby-value">0</span>
|
|
1587
|
+
474: <span class="ruby-comment cmt"># Label for upper scale. The yearly calendar only has a lower scale.</span>
|
|
1588
|
+
475: <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>
|
|
1589
|
+
476: <span class="ruby-identifier">firstColumn</span> = <span class="ruby-keyword kw">nil</span>
|
|
1590
|
+
477: <span class="ruby-comment cmt"># The innter loops terminates when the label for the upper scale has</span>
|
|
1591
|
+
478: <span class="ruby-comment cmt"># changed to the next scale cell.</span>
|
|
1592
|
+
479: <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>
|
|
1593
|
+
480: <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>)
|
|
1594
|
+
481: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function to get the end of the column.</span>
|
|
1595
|
+
482: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1596
|
+
483: <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>)
|
|
1597
|
+
484: <span class="ruby-comment cmt"># Create the new column object.</span>
|
|
1598
|
+
485: <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>)
|
|
1599
|
+
486: <span class="ruby-comment cmt"># Store the date of the column in the original form.</span>
|
|
1600
|
+
487: <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>))
|
|
1601
|
+
488: <span class="ruby-comment cmt"># The upper scale cells will be merged into one large cell that spans</span>
|
|
1602
|
+
489: <span class="ruby-comment cmt"># all lower scale cells that belong to this upper cell.</span>
|
|
1603
|
+
490: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">firstColumn</span>.<span class="ruby-identifier">nil?</span>
|
|
1604
|
+
491: <span class="ruby-identifier">firstColumn</span> = <span class="ruby-identifier">column</span>
|
|
1605
|
+
492: <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>
|
|
1606
|
+
493: <span class="ruby-keyword kw">else</span>
|
|
1607
|
+
494: <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>
|
|
1608
|
+
495: <span class="ruby-keyword kw">end</span>
|
|
1609
|
+
496: <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>
|
|
1610
|
+
497: <span class="ruby-comment cmt"># TODO: The width should be taken from some data structure.</span>
|
|
1611
|
+
498: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell2</span>.<span class="ruby-identifier">width</span> = <span class="ruby-value">20</span>
|
|
1612
|
+
499: <span class="ruby-comment cmt"># Off-duty cells will have a different color than working time cells.</span>
|
|
1613
|
+
500: <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>)
|
|
1614
|
+
501: <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>
|
|
1615
|
+
502: <span class="ruby-keyword kw">end</span>
|
|
1616
|
+
503: <span class="ruby-identifier">cellsInInterval</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
1617
|
+
504:
|
|
1618
|
+
505: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1619
|
+
506: <span class="ruby-keyword kw">end</span>
|
|
1620
|
+
507: <span class="ruby-comment cmt"># The the first upper scale cell how many trailing hidden cells are</span>
|
|
1621
|
+
508: <span class="ruby-comment cmt"># following.</span>
|
|
1622
|
+
509: <span class="ruby-identifier">firstColumn</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">columns</span> = <span class="ruby-identifier">cellsInInterval</span>
|
|
1623
|
+
510: <span class="ruby-keyword kw">end</span>
|
|
1624
|
+
511: <span class="ruby-keyword kw">end</span></pre>
|
|
1602
1625
|
</div>
|
|
1603
1626
|
|
|
1604
1627
|
</div>
|
|
@@ -1610,7 +1633,7 @@ the particular column.
|
|
|
1610
1633
|
|
|
1611
1634
|
|
|
1612
1635
|
<div id="gen-al-hart-esource-ell-method" class="method-detail ">
|
|
1613
|
-
<a name="
|
|
1636
|
+
<a name="method-i-genCalChartResourceCell"></a>
|
|
1614
1637
|
|
|
1615
1638
|
<div class="method-heading">
|
|
1616
1639
|
|
|
@@ -1638,122 +1661,122 @@ next cell.
|
|
|
1638
1661
|
<div class="method-source-code"
|
|
1639
1662
|
id="gen-al-hart-esource-ell-source">
|
|
1640
1663
|
<pre>
|
|
1641
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
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
|
-
|
|
1664
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 823</span>
|
|
1665
|
+
823: <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>,
|
|
1666
|
+
824: <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1667
|
+
825: <span class="ruby-identifier">resource</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
1668
|
+
826: <span class="ruby-comment cmt"># Find out if we have an enclosing task scope.</span>
|
|
1669
|
+
827: <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>)
|
|
1670
|
+
828: <span class="ruby-identifier">task</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>
|
|
1671
|
+
829: <span class="ruby-comment cmt"># Get the interval of the task. In case a date is invalid due to a</span>
|
|
1672
|
+
830: <span class="ruby-comment cmt"># scheduling problem, we use the full project interval.</span>
|
|
1673
|
+
831: <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>]
|
|
1674
|
+
832: <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>]
|
|
1675
|
+
833: <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>,
|
|
1676
|
+
834: <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>)
|
|
1677
|
+
835: <span class="ruby-keyword kw">else</span>
|
|
1678
|
+
836: <span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>
|
|
1679
|
+
837: <span class="ruby-keyword kw">end</span>
|
|
1680
|
+
838:
|
|
1681
|
+
839: <span class="ruby-identifier">firstCell</span> = <span class="ruby-keyword kw">nil</span>
|
|
1682
|
+
840: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1683
|
+
841: <span class="ruby-comment cmt"># We modify the start and end dates to match the cell boundaries. So</span>
|
|
1684
|
+
842: <span class="ruby-comment cmt"># we need to make sure we don't modify the original Query but our own</span>
|
|
1685
|
+
843: <span class="ruby-comment cmt"># copies.</span>
|
|
1686
|
+
844: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">dup</span>
|
|
1687
|
+
845:
|
|
1688
|
+
846: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1689
|
+
847: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1690
|
+
848:
|
|
1691
|
+
849: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function</span>
|
|
1692
|
+
850: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1693
|
+
851: <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>)
|
|
1694
|
+
852: <span class="ruby-comment cmt"># Get work load for all tasks.</span>
|
|
1695
|
+
853: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-keyword kw">nil</span>
|
|
1696
|
+
854: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'effort'</span>
|
|
1697
|
+
855: <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>)
|
|
1698
|
+
856: <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>
|
|
1699
|
+
857: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1700
|
+
858: <span class="ruby-identifier">workLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1701
|
+
859: <span class="ruby-identifier">scaledWorkLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
1702
|
+
860: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">task</span>
|
|
1703
|
+
861: <span class="ruby-comment cmt"># Get work load for the particular task.</span>
|
|
1704
|
+
862: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">task</span>
|
|
1705
|
+
863: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1706
|
+
864: <span class="ruby-identifier">workLoadTask</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1707
|
+
865: <span class="ruby-identifier">scaledWorkLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_s</span>
|
|
1708
|
+
866: <span class="ruby-keyword kw">else</span>
|
|
1709
|
+
867: <span class="ruby-identifier">workLoadTask</span> = <span class="ruby-value">0.0</span>
|
|
1710
|
+
868: <span class="ruby-keyword kw">end</span>
|
|
1711
|
+
869: <span class="ruby-comment cmt"># Get unassigned work load.</span>
|
|
1712
|
+
870: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'freework'</span>
|
|
1713
|
+
871: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1714
|
+
872: <span class="ruby-identifier">freeLoad</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">to_num</span>
|
|
1715
|
+
873: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">content</span>
|
|
1716
|
+
874: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'empty'</span>
|
|
1717
|
+
875: <span class="ruby-comment cmt"># We only generate cells will different background colors.</span>
|
|
1718
|
+
876: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'load'</span>
|
|
1719
|
+
877: <span class="ruby-comment cmt"># Report the workload of the resource in this time interval.</span>
|
|
1720
|
+
878: <span class="ruby-comment cmt"># To increase readability, we don't show 0.0 values.</span>
|
|
1721
|
+
879: <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>
|
|
1722
|
+
880: <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>
|
|
1723
|
+
881: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">scaledWorkLoad</span>
|
|
1724
|
+
882: <span class="ruby-keyword kw">end</span>
|
|
1725
|
+
883: <span class="ruby-keyword kw">else</span>
|
|
1726
|
+
884: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown column content #{column.content}"</span>
|
|
1727
|
+
885: <span class="ruby-keyword kw">end</span>
|
|
1728
|
+
886:
|
|
1729
|
+
887: <span class="ruby-comment cmt"># Set the tooltip for the cell. We might delete it again.</span>
|
|
1730
|
+
888: <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>
|
|
1731
|
+
889: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">showTooltipHint</span> = <span class="ruby-keyword kw">false</span>
|
|
1732
|
+
890:
|
|
1733
|
+
891: <span class="ruby-comment cmt"># Determine cell category (mostly the background color)</span>
|
|
1734
|
+
892: <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>
|
|
1735
|
+
893: <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>)
|
|
1736
|
+
894: <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>
|
|
1737
|
+
895: <span class="ruby-value str">'busy'</span>
|
|
1738
|
+
896: <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>
|
|
1739
|
+
897: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1740
|
+
898: <span class="ruby-value str">'offduty'</span>
|
|
1741
|
+
899: <span class="ruby-keyword kw">else</span>
|
|
1742
|
+
900: <span class="ruby-value str">'loaded'</span>
|
|
1743
|
+
901: <span class="ruby-keyword kw">end</span>
|
|
1744
|
+
902: <span class="ruby-keyword kw">else</span>
|
|
1745
|
+
903: <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>
|
|
1746
|
+
904: <span class="ruby-value str">'free'</span>
|
|
1747
|
+
905: <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>
|
|
1748
|
+
906: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1749
|
+
907: <span class="ruby-value str">'offduty'</span>
|
|
1750
|
+
908: <span class="ruby-keyword kw">else</span>
|
|
1751
|
+
909: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1752
|
+
910: <span class="ruby-value str">'resourcecell'</span>
|
|
1753
|
+
911: <span class="ruby-keyword kw">end</span>
|
|
1754
|
+
912: <span class="ruby-keyword kw">end</span>
|
|
1755
|
+
913: <span class="ruby-keyword kw">else</span>
|
|
1756
|
+
914: <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>
|
|
1757
|
+
915: <span class="ruby-value str">'busy'</span>
|
|
1758
|
+
916: <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>
|
|
1759
|
+
917: <span class="ruby-value str">'loaded'</span>
|
|
1760
|
+
918: <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>
|
|
1761
|
+
919: <span class="ruby-value str">'free'</span>
|
|
1762
|
+
920: <span class="ruby-keyword kw">else</span>
|
|
1763
|
+
921: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">tooltip</span> = <span class="ruby-keyword kw">nil</span>
|
|
1764
|
+
922: <span class="ruby-value str">'offduty'</span>
|
|
1765
|
+
923: <span class="ruby-keyword kw">end</span>
|
|
1766
|
+
924: <span class="ruby-keyword kw">end</span>
|
|
1767
|
+
925: <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>
|
|
1768
|
+
926:
|
|
1769
|
+
927: <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
1770
|
+
928:
|
|
1771
|
+
929: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1772
|
+
930: <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>
|
|
1773
|
+
931: <span class="ruby-keyword kw">end</span>
|
|
1774
|
+
932:
|
|
1775
|
+
933: <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>)
|
|
1776
|
+
934: <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>)
|
|
1777
|
+
935: <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>)
|
|
1778
|
+
936: <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>)
|
|
1779
|
+
937: <span class="ruby-keyword kw">end</span></pre>
|
|
1757
1780
|
</div>
|
|
1758
1781
|
|
|
1759
1782
|
</div>
|
|
@@ -1765,7 +1788,7 @@ next cell.
|
|
|
1765
1788
|
|
|
1766
1789
|
|
|
1767
1790
|
<div id="gen-al-hart-ask-ell-method" class="method-detail ">
|
|
1768
|
-
<a name="
|
|
1791
|
+
<a name="method-i-genCalChartTaskCell"></a>
|
|
1769
1792
|
|
|
1770
1793
|
<div class="method-heading">
|
|
1771
1794
|
|
|
@@ -1793,78 +1816,78 @@ next cell.
|
|
|
1793
1816
|
<div class="method-source-code"
|
|
1794
1817
|
id="gen-al-hart-ask-ell-source">
|
|
1795
1818
|
<pre>
|
|
1796
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
772: <span class="ruby-keyword kw">end</span>
|
|
1841
|
-
773:
|
|
1842
|
-
774: <span class="ruby-comment cmt"># Determine cell category (mostly the background color)</span>
|
|
1843
|
-
775: <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>)
|
|
1844
|
-
776: <span class="ruby-comment cmt"># The cell is either a container or leaf task</span>
|
|
1845
|
-
777: <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>
|
|
1846
|
-
778: <span class="ruby-comment cmt"># If the user has requested a custom tooltip, add it to each task cell.</span>
|
|
1847
|
-
779: <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>
|
|
1848
|
-
780: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">showTooltipHint</span> = <span class="ruby-keyword kw">false</span>
|
|
1849
|
-
781: <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>)
|
|
1850
|
-
782: <span class="ruby-comment cmt"># The cell is a vacation cell.</span>
|
|
1851
|
-
783: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'offduty'</span>
|
|
1852
|
-
784: <span class="ruby-keyword kw">else</span>
|
|
1853
|
-
785: <span class="ruby-comment cmt"># The cell is just filled with the background color.</span>
|
|
1854
|
-
786: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'taskcell'</span>
|
|
1819
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 744</span>
|
|
1820
|
+
744: <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>)
|
|
1821
|
+
745: <span class="ruby-identifier">task</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
1822
|
+
746: <span class="ruby-comment cmt"># Find out if we have an enclosing resource scope.</span>
|
|
1823
|
+
747: <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>)
|
|
1824
|
+
748: <span class="ruby-identifier">resource</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">property</span>
|
|
1825
|
+
749: <span class="ruby-keyword kw">else</span>
|
|
1826
|
+
750: <span class="ruby-identifier">resource</span> = <span class="ruby-keyword kw">nil</span>
|
|
1827
|
+
751: <span class="ruby-keyword kw">end</span>
|
|
1828
|
+
752:
|
|
1829
|
+
753: <span class="ruby-comment cmt"># Get the interval of the task. In case a date is invalid due to a</span>
|
|
1830
|
+
754: <span class="ruby-comment cmt"># scheduling problem, we use the full project interval.</span>
|
|
1831
|
+
755: <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>]
|
|
1832
|
+
756: <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>]
|
|
1833
|
+
757: <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>,
|
|
1834
|
+
758: <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>)
|
|
1835
|
+
759:
|
|
1836
|
+
760: <span class="ruby-identifier">firstCell</span> = <span class="ruby-keyword kw">nil</span>
|
|
1837
|
+
761: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@end</span>
|
|
1838
|
+
762: <span class="ruby-comment cmt"># We modify the start and end dates to match the cell boundaries. So</span>
|
|
1839
|
+
763: <span class="ruby-comment cmt"># we need to make sure we don't modify the original Query but our own</span>
|
|
1840
|
+
764: <span class="ruby-comment cmt"># copies.</span>
|
|
1841
|
+
765: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">origQuery</span>.<span class="ruby-identifier">dup</span>
|
|
1842
|
+
766: <span class="ruby-comment cmt"># call TjTime::sameTimeNext... function</span>
|
|
1843
|
+
767: <span class="ruby-identifier">nextT</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
1844
|
+
768: <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>)
|
|
1845
|
+
769: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">content</span>
|
|
1846
|
+
770: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'empty'</span>
|
|
1847
|
+
771: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1848
|
+
772: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1849
|
+
773: <span class="ruby-comment cmt"># We only generate cells will different background colors.</span>
|
|
1850
|
+
774: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'load'</span>
|
|
1851
|
+
775: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-value str">'effort'</span>
|
|
1852
|
+
776: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">start</span> = <span class="ruby-identifier">t</span>
|
|
1853
|
+
777: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">end</span> = <span class="ruby-identifier">nextT</span>
|
|
1854
|
+
778: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1855
|
+
779:
|
|
1856
|
+
780: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1857
|
+
781: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1858
|
+
782:
|
|
1859
|
+
783: <span class="ruby-comment cmt"># To increase readability, we don't show 0.0 values.</span>
|
|
1860
|
+
784: <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>
|
|
1861
|
+
785: <span class="ruby-keyword kw">else</span>
|
|
1862
|
+
786: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown column content #{column.content}"</span>
|
|
1855
1863
|
787: <span class="ruby-keyword kw">end</span>
|
|
1856
|
-
788:
|
|
1857
|
-
789:
|
|
1858
|
-
790: <span class="ruby-
|
|
1859
|
-
791:
|
|
1860
|
-
792:
|
|
1861
|
-
793:
|
|
1862
|
-
794:
|
|
1863
|
-
795:
|
|
1864
|
-
796:
|
|
1865
|
-
797:
|
|
1866
|
-
798:
|
|
1867
|
-
799:
|
|
1864
|
+
788:
|
|
1865
|
+
789: <span class="ruby-comment cmt"># Determine cell category (mostly the background color)</span>
|
|
1866
|
+
790: <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>)
|
|
1867
|
+
791: <span class="ruby-comment cmt"># The cell is either a container or leaf task</span>
|
|
1868
|
+
792: <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>
|
|
1869
|
+
793: <span class="ruby-comment cmt"># If the user has requested a custom tooltip, add it to each task cell.</span>
|
|
1870
|
+
794: <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>
|
|
1871
|
+
795: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">showTooltipHint</span> = <span class="ruby-keyword kw">false</span>
|
|
1872
|
+
796: <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>)
|
|
1873
|
+
797: <span class="ruby-comment cmt"># The cell is a vacation cell.</span>
|
|
1874
|
+
798: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'offduty'</span>
|
|
1875
|
+
799: <span class="ruby-keyword kw">else</span>
|
|
1876
|
+
800: <span class="ruby-comment cmt"># The cell is just filled with the background color.</span>
|
|
1877
|
+
801: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">category</span> = <span class="ruby-value str">'taskcell'</span>
|
|
1878
|
+
802: <span class="ruby-keyword kw">end</span>
|
|
1879
|
+
803: <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>
|
|
1880
|
+
804:
|
|
1881
|
+
805: <span class="ruby-identifier">tryCellMerging</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">firstCell</span>)
|
|
1882
|
+
806:
|
|
1883
|
+
807: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">nextT</span>
|
|
1884
|
+
808: <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>
|
|
1885
|
+
809: <span class="ruby-keyword kw">end</span>
|
|
1886
|
+
810:
|
|
1887
|
+
811: <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>)
|
|
1888
|
+
812: <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>)
|
|
1889
|
+
813: <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>)
|
|
1890
|
+
814: <span class="ruby-keyword kw">end</span></pre>
|
|
1868
1891
|
</div>
|
|
1869
1892
|
|
|
1870
1893
|
</div>
|
|
@@ -1876,7 +1899,7 @@ next cell.
|
|
|
1876
1899
|
|
|
1877
1900
|
|
|
1878
1901
|
<div id="gen-alculated-ell-method" class="method-detail ">
|
|
1879
|
-
<a name="
|
|
1902
|
+
<a name="method-i-genCalculatedCell"></a>
|
|
1880
1903
|
|
|
1881
1904
|
<div class="method-heading">
|
|
1882
1905
|
|
|
@@ -1906,82 +1929,87 @@ cell.
|
|
|
1906
1929
|
<div class="method-source-code"
|
|
1907
1930
|
id="gen-alculated-ell-source">
|
|
1908
1931
|
<pre>
|
|
1909
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
702:
|
|
1967
|
-
703: <span class="ruby-comment cmt"># Replace the cell background color if the user has requested a custom</span>
|
|
1968
|
-
704: <span class="ruby-comment cmt"># color.</span>
|
|
1969
|
-
705: <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>)
|
|
1970
|
-
706: <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>
|
|
1971
|
-
707:
|
|
1972
|
-
708: <span class="ruby-comment cmt"># Replace the font color setting if the user has requested a custom</span>
|
|
1973
|
-
709: <span class="ruby-comment cmt"># color.</span>
|
|
1974
|
-
710: <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>)
|
|
1975
|
-
711: <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>
|
|
1932
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 656</span>
|
|
1933
|
+
656: <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>)
|
|
1934
|
+
657: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
1935
|
+
658: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
1936
|
+
659:
|
|
1937
|
+
660: <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>,
|
|
1938
|
+
661: <span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>))
|
|
1939
|
+
662: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
1940
|
+
663: <span class="ruby-keyword kw">end</span>
|
|
1941
|
+
664:
|
|
1942
|
+
665: <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>)
|
|
1943
|
+
666:
|
|
1944
|
+
667: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
1945
|
+
668: <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>
|
|
1946
|
+
669: <span class="ruby-keyword kw">end</span>
|
|
1947
|
+
670:
|
|
1948
|
+
671: <span class="ruby-comment cmt"># Some columns need some extra care.</span>
|
|
1949
|
+
672: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
1950
|
+
673: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'alert'</span>
|
|
1951
|
+
674: <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>)
|
|
1952
|
+
675: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> = <span class="ruby-node">"flag-#{id}"</span>
|
|
1953
|
+
676: <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>)
|
|
1954
|
+
677: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'alerttrend'</span>
|
|
1955
|
+
678: <span class="ruby-identifier">icons</span> = <span class="ruby-node">%( up flat down )</span>
|
|
1956
|
+
679: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> = <span class="ruby-node">"trend-#{icons[query.to_sort]}"</span>
|
|
1957
|
+
680: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'line'</span>
|
|
1958
|
+
681: <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>
|
|
1959
|
+
682: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'name'</span>
|
|
1960
|
+
683: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">icon</span> =
|
|
1961
|
+
684: <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>)
|
|
1962
|
+
685: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">container?</span>
|
|
1963
|
+
686: <span class="ruby-value str">'taskgroup'</span>
|
|
1964
|
+
687: <span class="ruby-keyword kw">else</span>
|
|
1965
|
+
688: <span class="ruby-value str">'task'</span>
|
|
1966
|
+
689: <span class="ruby-keyword kw">end</span>
|
|
1967
|
+
690: <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>)
|
|
1968
|
+
691: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">container?</span>
|
|
1969
|
+
692: <span class="ruby-value str">'resourcegroup'</span>
|
|
1970
|
+
693: <span class="ruby-keyword kw">else</span>
|
|
1971
|
+
694: <span class="ruby-value str">'resource'</span>
|
|
1972
|
+
695: <span class="ruby-keyword kw">end</span>
|
|
1973
|
+
696: <span class="ruby-keyword kw">else</span>
|
|
1974
|
+
697: <span class="ruby-keyword kw">nil</span>
|
|
1975
|
+
698: <span class="ruby-keyword kw">end</span>
|
|
1976
|
+
699: <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>).
|
|
1977
|
+
700: <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
1978
|
+
701: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'no'</span>
|
|
1979
|
+
702: <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>
|
|
1980
|
+
703: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'wbs'</span>
|
|
1981
|
+
704: <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>
|
|
1982
|
+
705: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'scenario'</span>
|
|
1983
|
+
706: <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>
|
|
1984
|
+
707: <span class="ruby-keyword kw">end</span>
|
|
1985
|
+
708:
|
|
1986
|
+
709: <span class="ruby-comment cmt"># Replace the cell text if the user has requested a custom cell text.</span>
|
|
1987
|
+
710: <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>)
|
|
1988
|
+
711: <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>
|
|
1976
1989
|
712:
|
|
1977
|
-
713: <span class="ruby-comment cmt">#
|
|
1978
|
-
714: <span class="ruby-
|
|
1979
|
-
715: <span class="ruby-identifier">
|
|
1980
|
-
716:
|
|
1981
|
-
717:
|
|
1982
|
-
718:
|
|
1983
|
-
719: <span class="ruby-
|
|
1984
|
-
720:
|
|
1990
|
+
713: <span class="ruby-comment cmt"># Replace the cell background color if the user has requested a custom</span>
|
|
1991
|
+
714: <span class="ruby-comment cmt"># color.</span>
|
|
1992
|
+
715: <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>)
|
|
1993
|
+
716: <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>
|
|
1994
|
+
717:
|
|
1995
|
+
718: <span class="ruby-comment cmt"># Replace the font color setting if the user has requested a custom</span>
|
|
1996
|
+
719: <span class="ruby-comment cmt"># color.</span>
|
|
1997
|
+
720: <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>)
|
|
1998
|
+
721: <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>
|
|
1999
|
+
722:
|
|
2000
|
+
723: <span class="ruby-comment cmt"># Replace the default cell alignment if the user has requested a custom</span>
|
|
2001
|
+
724: <span class="ruby-comment cmt"># alignment.</span>
|
|
2002
|
+
725: <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>)
|
|
2003
|
+
726: <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>
|
|
2004
|
+
727:
|
|
2005
|
+
728: <span class="ruby-comment cmt"># Register the custom tooltip if the user has requested one.</span>
|
|
2006
|
+
729: <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>)
|
|
2007
|
+
730: <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>
|
|
2008
|
+
731:
|
|
2009
|
+
732: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2010
|
+
733:
|
|
2011
|
+
734: <span class="ruby-keyword kw">true</span>
|
|
2012
|
+
735: <span class="ruby-keyword kw">end</span></pre>
|
|
1985
2013
|
</div>
|
|
1986
2014
|
|
|
1987
2015
|
</div>
|
|
@@ -1993,7 +2021,7 @@ cell.
|
|
|
1993
2021
|
|
|
1994
2022
|
|
|
1995
2023
|
<div id="gen-tandard-ell-method" class="method-detail ">
|
|
1996
|
-
<a name="
|
|
2024
|
+
<a name="method-i-genStandardCell"></a>
|
|
1997
2025
|
|
|
1998
2026
|
<div class="method-heading">
|
|
1999
2027
|
|
|
@@ -2016,54 +2044,59 @@ the cell exists, false for a hidden cell.
|
|
|
2016
2044
|
<div class="method-source-code"
|
|
2017
2045
|
id="gen-tandard-ell-source">
|
|
2018
2046
|
<pre>
|
|
2019
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
605:
|
|
2034
|
-
606: <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>,
|
|
2035
|
-
607: <span class="ruby-identifier">propertyList</span>.<span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>))
|
|
2036
|
-
608: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
2037
|
-
609: <span class="ruby-keyword kw">end</span>
|
|
2047
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 597</span>
|
|
2048
|
+
597: <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>)
|
|
2049
|
+
598: <span class="ruby-comment cmt"># Find out, what type of PropertyTreeNode we are dealing with.</span>
|
|
2050
|
+
599: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2051
|
+
600: <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>)
|
|
2052
|
+
601: <span class="ruby-identifier">propertyList</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tasks</span>
|
|
2053
|
+
602: <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>)
|
|
2054
|
+
603: <span class="ruby-identifier">propertyList</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">resources</span>
|
|
2055
|
+
604: <span class="ruby-keyword kw">else</span>
|
|
2056
|
+
605: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown property type #{property.class}"</span>
|
|
2057
|
+
606: <span class="ruby-keyword kw">end</span>
|
|
2058
|
+
607:
|
|
2059
|
+
608: <span class="ruby-comment cmt"># Create a new cell</span>
|
|
2060
|
+
609: <span class="ruby-identifier">cell</span> = <span class="ruby-identifier">newCell</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">line</span>)
|
|
2038
2061
|
610:
|
|
2039
|
-
611: <span class="ruby-identifier">
|
|
2040
|
-
612:
|
|
2041
|
-
613:
|
|
2042
|
-
614: <span class="ruby-
|
|
2043
|
-
615:
|
|
2044
|
-
616: <span class="ruby-
|
|
2045
|
-
617:
|
|
2046
|
-
618:
|
|
2047
|
-
619:
|
|
2048
|
-
620: <span class="ruby-
|
|
2049
|
-
621:
|
|
2050
|
-
622:
|
|
2051
|
-
623: <span class="ruby-
|
|
2052
|
-
624:
|
|
2053
|
-
625: <span class="ruby-
|
|
2062
|
+
611: <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>,
|
|
2063
|
+
612: <span class="ruby-identifier">propertyList</span>.<span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>))
|
|
2064
|
+
613: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
2065
|
+
614: <span class="ruby-keyword kw">end</span>
|
|
2066
|
+
615:
|
|
2067
|
+
616: <span class="ruby-identifier">setStandardCellAttributes</span>(<span class="ruby-identifier">cell</span>, <span class="ruby-identifier">columnDef</span>,
|
|
2068
|
+
617: <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>)
|
|
2069
|
+
618:
|
|
2070
|
+
619: <span class="ruby-comment cmt"># If the user has requested a custom cell text, this will be used</span>
|
|
2071
|
+
620: <span class="ruby-comment cmt"># instead of the queried one.</span>
|
|
2072
|
+
621: <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>))
|
|
2073
|
+
622: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">cdText</span>
|
|
2074
|
+
623: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">process</span>
|
|
2075
|
+
624: <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>
|
|
2076
|
+
625: <span class="ruby-keyword kw">end</span>
|
|
2054
2077
|
626:
|
|
2055
|
-
627: <span class="ruby-comment cmt"># Replace the
|
|
2078
|
+
627: <span class="ruby-comment cmt"># Replace the font color setting if the user has requested a custom</span>
|
|
2056
2079
|
628: <span class="ruby-comment cmt"># color.</span>
|
|
2057
|
-
629: <span class="ruby-identifier">
|
|
2058
|
-
630: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">
|
|
2080
|
+
629: <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>)
|
|
2081
|
+
630: <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>
|
|
2059
2082
|
631:
|
|
2060
|
-
632: <span class="ruby-comment cmt">#
|
|
2061
|
-
633: <span class="ruby-
|
|
2062
|
-
634:
|
|
2063
|
-
635: <span class="ruby-identifier">
|
|
2083
|
+
632: <span class="ruby-comment cmt"># Replace the cell background color if the user has requested a custom</span>
|
|
2084
|
+
633: <span class="ruby-comment cmt"># color.</span>
|
|
2085
|
+
634: <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>)
|
|
2086
|
+
635: <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
2087
|
636:
|
|
2065
|
-
637: <span class="ruby-
|
|
2066
|
-
638:
|
|
2088
|
+
637: <span class="ruby-comment cmt"># Replace the default cell alignment if the user has requested a custom</span>
|
|
2089
|
+
638: <span class="ruby-comment cmt"># alignment.</span>
|
|
2090
|
+
639: <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>)
|
|
2091
|
+
640: <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>
|
|
2092
|
+
641:
|
|
2093
|
+
642: <span class="ruby-comment cmt"># If the user has requested a custom tooltip, add it to the cell.</span>
|
|
2094
|
+
643: <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>
|
|
2095
|
+
644:
|
|
2096
|
+
645: <span class="ruby-identifier">checkCellText</span>(<span class="ruby-identifier">cell</span>)
|
|
2097
|
+
646:
|
|
2098
|
+
647: <span class="ruby-keyword kw">true</span>
|
|
2099
|
+
648: <span class="ruby-keyword kw">end</span></pre>
|
|
2067
2100
|
</div>
|
|
2068
2101
|
|
|
2069
2102
|
</div>
|
|
@@ -2075,7 +2108,7 @@ the cell exists, false for a hidden cell.
|
|
|
2075
2108
|
|
|
2076
2109
|
|
|
2077
2110
|
<div id="generate-able-ell-method" class="method-detail ">
|
|
2078
|
-
<a name="
|
|
2111
|
+
<a name="method-i-generateTableCell"></a>
|
|
2079
2112
|
|
|
2080
2113
|
<div class="method-heading">
|
|
2081
2114
|
|
|
@@ -2112,74 +2145,74 @@ objects that belong to the property in this line.
|
|
|
2112
2145
|
<div class="method-source-code"
|
|
2113
2146
|
id="generate-able-ell-source">
|
|
2114
2147
|
<pre>
|
|
2115
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2148
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 526</span>
|
|
2149
|
+
526: <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>)
|
|
2150
|
+
527: <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>
|
|
2151
|
+
528: <span class="ruby-comment cmt"># If the user has specified a new start or end time for this column,</span>
|
|
2152
|
+
529: <span class="ruby-comment cmt"># we have to duplicate the query before we modify it.</span>
|
|
2153
|
+
530: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
2154
|
+
531: <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>
|
|
2155
|
+
532: <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>
|
|
2156
|
+
533: <span class="ruby-keyword kw">end</span>
|
|
2157
|
+
534:
|
|
2158
|
+
535: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
2159
|
+
536: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
2160
|
+
537: <span class="ruby-comment cmt"># Generate a hidden cell. The real meat is in the actual chart object,</span>
|
|
2161
|
+
538: <span class="ruby-comment cmt"># not in this cell.</span>
|
|
2162
|
+
539: <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>)
|
|
2163
|
+
540: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2164
|
+
541: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">text</span> = <span class="ruby-keyword kw">nil</span>
|
|
2165
|
+
542: <span class="ruby-comment cmt"># The GanttChart can be reached via the special variable of the column</span>
|
|
2166
|
+
543: <span class="ruby-comment cmt"># header.</span>
|
|
2167
|
+
544: <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>
|
|
2168
|
+
545: <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>),
|
|
2169
|
+
546: <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>)
|
|
2170
|
+
547: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
2171
|
+
548: <span class="ruby-comment cmt"># The calendar cells can be all generated by the same function. But we</span>
|
|
2172
|
+
549: <span class="ruby-comment cmt"># need to use different parameters.</span>
|
|
2173
|
+
550: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>
|
|
2174
|
+
551: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>
|
|
2175
|
+
552: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextHour</span>
|
|
2176
|
+
553: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
2177
|
+
554: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">midnight</span>
|
|
2178
|
+
555: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextDay</span>
|
|
2179
|
+
556: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'weekly'</span>
|
|
2180
|
+
557: <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>))
|
|
2181
|
+
558: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextWeek</span>
|
|
2182
|
+
559: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'monthly'</span>
|
|
2183
|
+
560: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfMonth</span>
|
|
2184
|
+
561: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextMonth</span>
|
|
2185
|
+
562: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'quarterly'</span>
|
|
2186
|
+
563: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfQuarter</span>
|
|
2187
|
+
564: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextQuarter</span>
|
|
2188
|
+
565: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'yearly'</span>
|
|
2189
|
+
566: <span class="ruby-identifier">start</span> = <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfYear</span>
|
|
2190
|
+
567: <span class="ruby-identifier">sameTimeNextFunc</span> = <span class="ruby-value">:sameTimeNextYear</span>
|
|
2191
|
+
568: <span class="ruby-keyword kw">else</span>
|
|
2192
|
+
569: <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>)
|
|
2193
|
+
570: <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>)
|
|
2194
|
+
571: <span class="ruby-keyword kw">else</span>
|
|
2195
|
+
572: <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>)
|
|
2196
|
+
573: <span class="ruby-keyword kw">end</span>
|
|
2197
|
+
574: <span class="ruby-keyword kw">end</span>
|
|
2198
|
+
575:
|
|
2199
|
+
576: <span class="ruby-comment cmt"># The calendar cells don't live in this ReportTable but in an embedded</span>
|
|
2200
|
+
577: <span class="ruby-comment cmt"># ReportTable that can be reached via the column header special variable.</span>
|
|
2201
|
+
578: <span class="ruby-comment cmt"># For embedded column tables we need to create a new line.</span>
|
|
2202
|
+
579: <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>,
|
|
2203
|
+
580: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>, <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>)
|
|
2204
|
+
581:
|
|
2205
|
+
582: <span class="ruby-comment cmt"># Depending on the property type we use different generator functions.</span>
|
|
2206
|
+
583: <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>)
|
|
2207
|
+
584: <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>)
|
|
2208
|
+
585: <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>)
|
|
2209
|
+
586: <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>,
|
|
2210
|
+
587: <span class="ruby-identifier">sameTimeNextFunc</span>)
|
|
2211
|
+
588: <span class="ruby-keyword kw">else</span>
|
|
2212
|
+
589: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unknown property type #{property.class}"</span>
|
|
2213
|
+
590: <span class="ruby-keyword kw">end</span>
|
|
2214
|
+
591: <span class="ruby-keyword kw">true</span>
|
|
2215
|
+
592: <span class="ruby-keyword kw">end</span></pre>
|
|
2183
2216
|
</div>
|
|
2184
2217
|
|
|
2185
2218
|
</div>
|
|
@@ -2191,7 +2224,7 @@ objects that belong to the property in this line.
|
|
|
2191
2224
|
|
|
2192
2225
|
|
|
2193
2226
|
<div id="new-ell-method" class="method-detail ">
|
|
2194
|
-
<a name="
|
|
2227
|
+
<a name="method-i-newCell"></a>
|
|
2195
2228
|
|
|
2196
2229
|
<div class="method-heading">
|
|
2197
2230
|
|
|
@@ -2213,16 +2246,16 @@ initialize some common values.
|
|
|
2213
2246
|
<div class="method-source-code"
|
|
2214
2247
|
id="new-ell-source">
|
|
2215
2248
|
<pre>
|
|
2216
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2249
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 983</span>
|
|
2250
|
+
983: <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>)
|
|
2251
|
+
984: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2252
|
+
985: <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>)
|
|
2253
|
+
986:
|
|
2254
|
+
987: <span class="ruby-comment cmt"># Cells for containers should be using bold font face.</span>
|
|
2255
|
+
988: <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>
|
|
2256
|
+
989: <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>)
|
|
2257
|
+
990: <span class="ruby-identifier">cell</span>
|
|
2258
|
+
991: <span class="ruby-keyword kw">end</span></pre>
|
|
2226
2259
|
</div>
|
|
2227
2260
|
|
|
2228
2261
|
</div>
|
|
@@ -2234,7 +2267,7 @@ initialize some common values.
|
|
|
2234
2267
|
|
|
2235
2268
|
|
|
2236
2269
|
<div id="set-ndent-method" class="method-detail ">
|
|
2237
|
-
<a name="
|
|
2270
|
+
<a name="method-i-setIndent"></a>
|
|
2238
2271
|
|
|
2239
2272
|
<div class="method-heading">
|
|
2240
2273
|
|
|
@@ -2255,19 +2288,19 @@ Determine the indentation for this line.
|
|
|
2255
2288
|
<div class="method-source-code"
|
|
2256
2289
|
id="set-ndent-source">
|
|
2257
2290
|
<pre>
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2291
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 994</span>
|
|
2292
|
+
994: <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>)
|
|
2293
|
+
995: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">property</span>
|
|
2294
|
+
996: <span class="ruby-identifier">scopeLine</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">scopeLine</span>
|
|
2295
|
+
997: <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>)
|
|
2296
|
+
998: <span class="ruby-comment cmt"># We indent at least as much as the scopeline + 1, if we have a scope.</span>
|
|
2297
|
+
999: <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>
|
|
2298
|
+
1000: <span class="ruby-comment cmt"># In tree mode we indent according to the level.</span>
|
|
2299
|
+
1001: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">treeMode</span>
|
|
2300
|
+
1002: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">indentation</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">level</span>
|
|
2301
|
+
1003: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">bold</span> = <span class="ruby-keyword kw">true</span>
|
|
2302
|
+
1004: <span class="ruby-keyword kw">end</span>
|
|
2303
|
+
1005: <span class="ruby-keyword kw">end</span></pre>
|
|
2271
2304
|
</div>
|
|
2272
2305
|
|
|
2273
2306
|
</div>
|
|
@@ -2279,7 +2312,7 @@ Determine the indentation for this line.
|
|
|
2279
2312
|
|
|
2280
2313
|
|
|
2281
2314
|
<div id="set-cenario-ettings-method" class="method-detail ">
|
|
2282
|
-
<a name="
|
|
2315
|
+
<a name="method-i-setScenarioSettings"></a>
|
|
2283
2316
|
|
|
2284
2317
|
<div class="method-heading">
|
|
2285
2318
|
|
|
@@ -2298,25 +2331,25 @@ Determine the indentation for this line.
|
|
|
2298
2331
|
<div class="method-source-code"
|
|
2299
2332
|
id="set-cenario-ettings-source">
|
|
2300
2333
|
<pre>
|
|
2301
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2334
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 963</span>
|
|
2335
|
+
963: <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>)
|
|
2336
|
+
964: <span class="ruby-comment cmt"># Check if we are dealing with multiple scenarios.</span>
|
|
2337
|
+
965: <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>
|
|
2338
|
+
966: <span class="ruby-comment cmt"># Check if the attribute is not scenario specific</span>
|
|
2339
|
+
967: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">scenarioSpecific</span>
|
|
2340
|
+
968: <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>
|
|
2341
|
+
969: <span class="ruby-comment cmt"># Use a somewhat bigger font.</span>
|
|
2342
|
+
970: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fontSize</span> = <span class="ruby-value">15</span>
|
|
2343
|
+
971: <span class="ruby-keyword kw">else</span>
|
|
2344
|
+
972: <span class="ruby-comment cmt"># And hide the cells for all but the first scenario.</span>
|
|
2345
|
+
973: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2346
|
+
974: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
2347
|
+
975: <span class="ruby-keyword kw">end</span>
|
|
2348
|
+
976: <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>
|
|
2349
|
+
977: <span class="ruby-keyword kw">end</span>
|
|
2350
|
+
978: <span class="ruby-keyword kw">end</span>
|
|
2351
|
+
979: <span class="ruby-keyword kw">true</span>
|
|
2352
|
+
980: <span class="ruby-keyword kw">end</span></pre>
|
|
2320
2353
|
</div>
|
|
2321
2354
|
|
|
2322
2355
|
</div>
|
|
@@ -2328,7 +2361,7 @@ Determine the indentation for this line.
|
|
|
2328
2361
|
|
|
2329
2362
|
|
|
2330
2363
|
<div id="set-tandard-ell-ttributes-method" class="method-detail ">
|
|
2331
|
-
<a name="
|
|
2364
|
+
<a name="method-i-setStandardCellAttributes"></a>
|
|
2332
2365
|
|
|
2333
2366
|
<div class="method-heading">
|
|
2334
2367
|
|
|
@@ -2350,28 +2383,28 @@ alignment and background color.
|
|
|
2350
2383
|
<div class="method-source-code"
|
|
2351
2384
|
id="set-tandard-ell-ttributes-source">
|
|
2352
2385
|
<pre>
|
|
2353
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2386
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 941</span>
|
|
2387
|
+
941: <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>)
|
|
2388
|
+
942: <span class="ruby-comment cmt"># Determine whether it should be indented</span>
|
|
2389
|
+
943: <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>)
|
|
2390
|
+
944: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">indent</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">indentation</span>
|
|
2391
|
+
945: <span class="ruby-keyword kw">end</span>
|
|
2392
|
+
946:
|
|
2393
|
+
947: <span class="ruby-comment cmt"># Determine the cell alignment</span>
|
|
2394
|
+
948: <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>)
|
|
2395
|
+
949:
|
|
2396
|
+
950: <span class="ruby-comment cmt"># Set background color</span>
|
|
2397
|
+
951: <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>)
|
|
2398
|
+
952: <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>
|
|
2399
|
+
953: <span class="ruby-value str">'taskcell1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'taskcell2'</span>
|
|
2400
|
+
954: <span class="ruby-keyword kw">else</span>
|
|
2401
|
+
955: <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>
|
|
2402
|
+
956: <span class="ruby-value str">'resourcecell1'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'resourcecell2'</span>
|
|
2403
|
+
957: <span class="ruby-keyword kw">end</span>
|
|
2404
|
+
958:
|
|
2405
|
+
959: <span class="ruby-comment cmt"># Set column width</span>
|
|
2406
|
+
960: <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>
|
|
2407
|
+
961: <span class="ruby-keyword kw">end</span></pre>
|
|
2375
2408
|
</div>
|
|
2376
2409
|
|
|
2377
2410
|
</div>
|
|
@@ -2383,7 +2416,7 @@ alignment and background color.
|
|
|
2383
2416
|
|
|
2384
2417
|
|
|
2385
2418
|
<div id="try-ell-erging-method" class="method-detail ">
|
|
2386
|
-
<a name="
|
|
2419
|
+
<a name="method-i-tryCellMerging"></a>
|
|
2387
2420
|
|
|
2388
2421
|
<div class="method-heading">
|
|
2389
2422
|
|
|
@@ -2404,13 +2437,13 @@ Try to merge equal cells without text to multi-column cells.
|
|
|
2404
2437
|
<div class="method-source-code"
|
|
2405
2438
|
id="try-ell-erging-source">
|
|
2406
2439
|
<pre>
|
|
2407
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2440
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 1017</span>
|
|
2441
|
+
1017: <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>)
|
|
2442
|
+
1018: <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>
|
|
2443
|
+
1019: <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">hidden</span> = <span class="ruby-keyword kw">true</span>
|
|
2444
|
+
1020: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">columns</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
2445
|
+
1021: <span class="ruby-keyword kw">end</span>
|
|
2446
|
+
1022: <span class="ruby-keyword kw">end</span></pre>
|
|
2414
2447
|
</div>
|
|
2415
2448
|
|
|
2416
2449
|
</div>
|