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