taskjuggler 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/benchmarks/UTF-8-Strings.rb +58 -0
- data/data/css/tjmanual.css +52 -0
- data/data/css/tjreport.css +195 -0
- data/data/icons/details.png +0 -0
- data/data/icons/flag-green.png +0 -0
- data/data/icons/flag-red.png +0 -0
- data/data/icons/flag-yellow.png +0 -0
- data/data/icons/resource.png +0 -0
- data/data/icons/resourcegroup.png +0 -0
- data/data/icons/task.png +0 -0
- data/data/icons/taskgroup.png +0 -0
- data/data/icons/trend-down.png +0 -0
- data/data/icons/trend-flat.png +0 -0
- data/data/icons/trend-up.png +0 -0
- data/data/scripts/wz_tooltip.js +1301 -0
- data/doc/classes/AppConfig.html +298 -230
- data/doc/classes/Arguments.html +8 -8
- data/doc/classes/Object.html +7 -7
- data/doc/classes/String.html +89 -89
- data/doc/classes/TaskJuggler.html +396 -264
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +26 -26
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +30 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +26 -26
- data/doc/classes/TaskJuggler/AttributeBase.html +227 -115
- data/doc/classes/TaskJuggler/AttributeDefinition.html +6 -6
- data/doc/classes/TaskJuggler/BatchProcessor.html +117 -83
- data/doc/classes/TaskJuggler/Booking.html +18 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +26 -26
- data/doc/classes/TaskJuggler/BooleanAttribute.html +26 -26
- data/doc/classes/TaskJuggler/CSVFile.html +24 -24
- data/doc/classes/TaskJuggler/CellSettingPattern.html +201 -0
- data/doc/classes/TaskJuggler/CellSettingPatternList.html +253 -0
- data/doc/classes/TaskJuggler/Charge.html +18 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +20 -20
- data/doc/classes/TaskJuggler/ChargeSet.html +37 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +26 -26
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +20 -20
- data/doc/classes/TaskJuggler/ColumnTable.html +40 -40
- data/doc/classes/TaskJuggler/DateAttribute.html +54 -15
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +10 -10
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +43 -43
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +21 -21
- data/doc/classes/TaskJuggler/GanttChart.html +48 -48
- data/doc/classes/TaskJuggler/GanttContainer.html +42 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +12 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +12 -12
- data/doc/classes/TaskJuggler/GanttLine.html +24 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +18 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +42 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +24 -24
- data/doc/classes/TaskJuggler/GanttTaskBar.html +42 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +13 -13
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +57 -57
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/JobInfo.html +68 -12
- data/doc/classes/TaskJuggler/Journal.html +266 -20
- data/doc/classes/TaskJuggler/JournalEntry.html +79 -23
- data/doc/classes/TaskJuggler/JournalEntryList.html +454 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +10 -10
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +171 -170
- data/doc/classes/TaskJuggler/Limits.html +36 -36
- data/doc/classes/TaskJuggler/Limits/Limit.html +30 -30
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +20 -20
- data/doc/classes/TaskJuggler/Log.html +145 -107
- data/doc/classes/TaskJuggler/LogicalAttribute.html +65 -36
- data/doc/classes/TaskJuggler/LogicalExpression.html +61 -24
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +20 -20
- data/doc/classes/TaskJuggler/LogicalFlag.html +31 -51
- data/doc/classes/TaskJuggler/LogicalFunction.html +64 -53
- data/doc/classes/TaskJuggler/LogicalOperation.html +103 -55
- data/doc/classes/TaskJuggler/Macro.html +6 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +37 -37
- data/doc/classes/TaskJuggler/Message.html +12 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +32 -20
- data/doc/classes/TaskJuggler/Navigator.html +110 -46
- data/doc/classes/TaskJuggler/NavigatorElement.html +449 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +24 -24
- data/doc/classes/TaskJuggler/Project.html +1158 -893
- data/doc/classes/TaskJuggler/ProjectFileParser.html +94 -91
- data/doc/classes/TaskJuggler/PropertyAttribute.html +20 -20
- data/doc/classes/TaskJuggler/PropertyList.html +225 -155
- data/doc/classes/TaskJuggler/PropertySet.html +375 -332
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +750 -510
- data/doc/classes/TaskJuggler/Query.html +404 -139
- data/doc/classes/TaskJuggler/{RTPNavigator.html → RTFNavigator.html} +57 -56
- data/doc/classes/TaskJuggler/RTFQuery.html +343 -0
- data/doc/classes/TaskJuggler/{RTPReport.html → RTFReport.html} +70 -67
- data/doc/classes/TaskJuggler/RealFormat.html +18 -18
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +10 -10
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +107 -40
- data/doc/classes/TaskJuggler/RemoteServiceManager.html +335 -0
- data/doc/classes/TaskJuggler/Report.html +66 -64
- data/doc/classes/TaskJuggler/ReportBase.html +112 -123
- data/doc/classes/TaskJuggler/ReportContext.html +43 -38
- data/doc/classes/TaskJuggler/ReportServer.html +320 -0
- data/doc/classes/TaskJuggler/ReportTable.html +42 -42
- data/doc/classes/TaskJuggler/ReportTableCell.html +221 -129
- data/doc/classes/TaskJuggler/ReportTableColumn.html +27 -27
- data/doc/classes/TaskJuggler/ReportTableLegend.html +24 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +126 -80
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +82 -47
- data/doc/classes/TaskJuggler/ResourceListRE.html +43 -39
- data/doc/classes/TaskJuggler/ResourceScenario.html +413 -321
- data/doc/classes/TaskJuggler/RichText.html +64 -248
- data/doc/classes/TaskJuggler/RichTextAttribute.html +94 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +87 -85
- data/doc/classes/TaskJuggler/RichTextElement.html +456 -363
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/{RichTextProtocolExample.html → RichTextFunctionExample.html} +64 -63
- data/doc/classes/TaskJuggler/{RichTextProtocolHandler.html → RichTextFunctionHandler.html} +42 -36
- data/doc/classes/TaskJuggler/RichTextIntermediate.html +563 -0
- data/doc/classes/TaskJuggler/RichTextParser.html +54 -51
- data/doc/classes/TaskJuggler/RichTextScanner.html +94 -92
- data/doc/classes/TaskJuggler/RichTextSnip.html +96 -60
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +369 -227
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +37 -37
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +31 -31
- data/doc/classes/TaskJuggler/Scoreboard.html +66 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +54 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +78 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +22 -22
- data/doc/classes/TaskJuggler/SourceFileInfo.html +12 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +42 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +12 -12
- data/doc/classes/TaskJuggler/TSResourceRecord.html +197 -0
- data/doc/classes/TaskJuggler/TSTaskRecord.html +215 -0
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +64 -43
- data/doc/classes/TaskJuggler/TableOfContents.html +18 -18
- data/doc/classes/TaskJuggler/TableReport.html +447 -468
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +12 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/TaskListRE.html +43 -39
- data/doc/classes/TaskJuggler/TaskScenario.html +529 -282
- data/doc/classes/TaskJuggler/TextParser.html +215 -194
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +97 -97
- data/doc/classes/TaskJuggler/TextParser/Rule.html +84 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -15
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +6 -6
- data/doc/classes/TaskJuggler/TextReport.html +77 -74
- data/doc/classes/TaskJuggler/TextScanner.html +294 -281
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +59 -60
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +12 -12
- data/doc/classes/TaskJuggler/TimeSheetReport.html +406 -0
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +522 -513
- data/doc/classes/TaskJuggler/TjpExample.html +25 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +21 -24
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +6177 -4318
- data/doc/classes/TaskJuggler/UserManual.html +212 -213
- data/doc/classes/TaskJuggler/WorkingHours.html +49 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -53
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +27 -26
- data/doc/classes/TaskJuggler/XMLElement.html +86 -50
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +3 -2
- data/doc/files/lib/Account_rb.html +3 -2
- data/doc/files/lib/Allocation_rb.html +3 -2
- data/doc/files/lib/AppConfig_rb.html +5 -2
- data/doc/files/lib/AttributeBase_rb.html +3 -2
- data/doc/files/lib/AttributeDefinition_rb.html +3 -2
- data/doc/files/lib/Attributes_rb.html +3 -2
- data/doc/files/lib/BatchProcessor_rb.html +4 -3
- data/doc/files/lib/Booking_rb.html +3 -2
- data/doc/files/lib/ChargeSet_rb.html +3 -2
- data/doc/files/lib/Charge_rb.html +3 -2
- data/doc/files/lib/HTMLDocument_rb.html +3 -2
- data/doc/files/lib/Interval_rb.html +3 -2
- data/doc/files/lib/Journal_rb.html +4 -3
- data/doc/files/lib/KeywordArray_rb.html +3 -2
- data/doc/files/lib/KeywordDocumentation_rb.html +3 -2
- data/doc/files/lib/Limits_rb.html +3 -2
- data/doc/files/lib/Log_rb.html +3 -2
- data/doc/files/lib/LogicalExpression_rb.html +3 -2
- data/doc/files/lib/LogicalFunction_rb.html +3 -2
- data/doc/files/lib/LogicalOperation_rb.html +3 -2
- data/doc/files/lib/MacroParser_rb.html +3 -2
- data/doc/files/lib/MacroTable_rb.html +3 -2
- data/doc/files/lib/MessageHandler_rb.html +3 -2
- data/doc/files/lib/Message_rb.html +3 -2
- data/doc/files/lib/ProjectFileParser_rb.html +7 -4
- data/doc/files/lib/Project_rb.html +3 -2
- data/doc/files/lib/PropertyList_rb.html +3 -2
- data/doc/files/lib/PropertySet_rb.html +3 -2
- data/doc/files/lib/PropertyTreeNode_rb.html +3 -2
- data/doc/files/lib/Query_rb.html +3 -2
- data/doc/files/lib/{RTPNavigator_rb.html → RTFNavigator_rb.html} +8 -7
- data/doc/files/lib/RTFQuery_rb.html +121 -0
- data/doc/files/lib/{RTPReport_rb.html → RTFReport_rb.html} +8 -7
- data/doc/files/lib/RealFormat_rb.html +3 -2
- data/doc/files/lib/RemoteServiceManager_rb.html +117 -0
- data/doc/files/lib/ReportServer_rb.html +107 -0
- data/doc/files/lib/ResourceScenario_rb.html +3 -2
- data/doc/files/lib/Resource_rb.html +3 -2
- data/doc/files/lib/RichTextDocument_rb.html +4 -3
- data/doc/files/lib/RichTextElement_rb.html +3 -2
- data/doc/files/lib/{RichTextProtocolExample_rb.html → RichTextFunctionExample_rb.html} +8 -7
- data/doc/files/lib/{RichTextProtocolHandler_rb.html → RichTextFunctionHandler_rb.html} +7 -6
- data/doc/files/lib/RichTextParser_rb.html +3 -2
- data/doc/files/lib/RichTextScanner_rb.html +3 -2
- data/doc/files/lib/RichTextSnip_rb.html +3 -2
- data/doc/files/lib/RichTextSyntaxRules_rb.html +3 -2
- data/doc/files/lib/RichText_rb.html +3 -2
- data/doc/files/lib/ScenarioData_rb.html +3 -2
- data/doc/files/lib/Scenario_rb.html +3 -2
- data/doc/files/lib/Scoreboard_rb.html +3 -2
- data/doc/files/lib/ShiftAssignments_rb.html +3 -2
- data/doc/files/lib/ShiftScenario_rb.html +3 -2
- data/doc/files/lib/Shift_rb.html +3 -2
- data/doc/files/lib/SourceFileInfo_rb.html +3 -2
- data/doc/files/lib/SyntaxReference_rb.html +3 -2
- data/doc/files/lib/TOCEntry_rb.html +3 -2
- data/doc/files/lib/TableColumnDefinition_rb.html +3 -2
- data/doc/files/lib/TableOfContents_rb.html +3 -2
- data/doc/files/lib/TaskDependency_rb.html +3 -2
- data/doc/files/lib/TaskJuggler_rb.html +7 -2
- data/doc/files/lib/TaskScenario_rb.html +3 -2
- data/doc/files/lib/Task_rb.html +3 -2
- data/doc/files/lib/TextParser/Pattern_rb.html +4 -3
- data/doc/files/lib/TextParser/Rule_rb.html +4 -3
- data/doc/files/lib/TextParser/StackElement_rb.html +4 -3
- data/doc/files/lib/TextParser/TokenDoc_rb.html +4 -3
- data/doc/files/lib/TextParser_rb.html +3 -2
- data/doc/files/lib/TextScanner_rb.html +3 -2
- data/doc/files/lib/Tj3Config_rb.html +3 -2
- data/doc/files/lib/TjException_rb.html +3 -2
- data/doc/files/lib/TjTime_rb.html +3 -2
- data/doc/files/lib/TjpExample_rb.html +3 -2
- data/doc/files/lib/TjpSyntaxRules_rb.html +3 -2
- data/doc/files/lib/UTF8String_rb.html +14 -6
- data/doc/files/lib/UserManual_rb.html +6 -3
- data/doc/files/lib/WorkingHours_rb.html +3 -2
- data/doc/files/lib/XMLDocument_rb.html +3 -2
- data/doc/files/lib/XMLElement_rb.html +3 -2
- data/doc/files/lib/deep_copy_rb.html +3 -2
- data/doc/files/lib/reports/CSVFile_rb.html +3 -2
- data/doc/files/lib/reports/ColumnTable_rb.html +3 -2
- data/doc/files/lib/reports/GanttChart_rb.html +3 -2
- data/doc/files/lib/reports/GanttContainer_rb.html +3 -2
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +3 -2
- data/doc/files/lib/reports/GanttHeader_rb.html +3 -2
- data/doc/files/lib/reports/GanttLine_rb.html +3 -2
- data/doc/files/lib/reports/GanttLoadStack_rb.html +3 -2
- data/doc/files/lib/reports/GanttMilestone_rb.html +3 -2
- data/doc/files/lib/reports/GanttRouter_rb.html +3 -2
- data/doc/files/lib/reports/GanttTaskBar_rb.html +3 -2
- data/doc/files/lib/reports/HTMLGraphics_rb.html +3 -2
- data/doc/files/lib/reports/Navigator_rb.html +3 -2
- data/doc/files/lib/reports/ReportBase_rb.html +3 -2
- data/doc/files/lib/reports/ReportContext_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableCell_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableColumn_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableLegend_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableLine_rb.html +3 -2
- data/doc/files/lib/reports/ReportTable_rb.html +3 -2
- data/doc/files/lib/reports/Report_rb.html +7 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +3 -2
- data/doc/files/lib/reports/TableReport_rb.html +3 -2
- data/doc/files/lib/reports/TaskListRE_rb.html +3 -2
- data/doc/files/lib/reports/TextReport_rb.html +4 -3
- data/doc/files/lib/reports/TimeSheetReport_rb.html +117 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +3 -2
- data/doc/files/lib/taskjuggler3_rb.html +94 -77
- data/doc/files/lib/tj3client_rb.html +280 -0
- data/doc/files/lib/tj3man_rb.html +10 -9
- data/doc/fr_class_index.html +27 -5
- data/doc/fr_file_index.html +15 -7
- data/doc/fr_method_index.html +1312 -1020
- data/examples/tutorial.tjp +113 -14
- data/gem_spec.rb +2 -1
- data/lib/Account.rb +1 -1
- data/lib/AccountScenario.rb +1 -1
- data/lib/Allocation.rb +1 -1
- data/lib/AppConfig.rb +23 -10
- data/lib/AttributeBase.rb +34 -6
- data/lib/AttributeDefinition.rb +1 -1
- data/lib/Attributes.rb +51 -16
- data/lib/BatchProcessor.rb +204 -77
- data/lib/Booking.rb +1 -1
- data/lib/Charge.rb +1 -1
- data/lib/ChargeSet.rb +1 -1
- data/lib/HTMLDocument.rb +2 -2
- data/lib/Interval.rb +1 -1
- data/lib/Journal.rb +231 -9
- data/lib/KeywordArray.rb +1 -1
- data/lib/KeywordDocumentation.rb +6 -4
- data/lib/Limits.rb +1 -1
- data/lib/Log.rb +8 -1
- data/lib/LogicalExpression.rb +14 -13
- data/lib/LogicalFunction.rb +88 -14
- data/lib/LogicalOperation.rb +124 -53
- data/lib/MacroParser.rb +1 -1
- data/lib/MacroTable.rb +2 -2
- data/lib/Message.rb +1 -1
- data/lib/MessageHandler.rb +7 -3
- data/lib/Project.rb +93 -14
- data/lib/ProjectFileParser.rb +30 -15
- data/lib/PropertyList.rb +103 -36
- data/lib/PropertySet.rb +22 -10
- data/lib/PropertyTreeNode.rb +120 -15
- data/lib/Query.rb +119 -48
- data/lib/{RTPNavigator.rb → RTFNavigator.rb} +11 -10
- data/lib/RTFQuery.rb +166 -0
- data/lib/{RTPReport.rb → RTFReport.rb} +11 -8
- data/lib/RealFormat.rb +1 -1
- data/lib/RemoteServiceManager.rb +80 -0
- data/lib/ReportServer.rb +66 -0
- data/lib/Resource.rb +1 -1
- data/lib/ResourceScenario.rb +48 -19
- data/lib/RichText.rb +98 -41
- data/lib/RichTextDocument.rb +10 -8
- data/lib/RichTextElement.rb +72 -28
- data/lib/{RichTextProtocolExample.rb → RichTextFunctionExample.rb} +8 -7
- data/lib/{RichTextProtocolHandler.rb → RichTextFunctionHandler.rb} +12 -14
- data/lib/RichTextParser.rb +6 -3
- data/lib/RichTextScanner.rb +91 -19
- data/lib/RichTextSnip.rb +8 -3
- data/lib/RichTextSyntaxRules.rb +103 -45
- data/lib/Scenario.rb +1 -1
- data/lib/ScenarioData.rb +2 -2
- data/lib/Scoreboard.rb +1 -1
- data/lib/Shift.rb +1 -1
- data/lib/ShiftAssignments.rb +1 -1
- data/lib/ShiftScenario.rb +1 -1
- data/lib/SourceFileInfo.rb +1 -1
- data/lib/SyntaxReference.rb +2 -2
- data/lib/TOCEntry.rb +1 -1
- data/lib/TableColumnDefinition.rb +59 -16
- data/lib/TableOfContents.rb +1 -1
- data/lib/Task.rb +1 -1
- data/lib/TaskDependency.rb +1 -1
- data/lib/TaskJuggler.rb +31 -8
- data/lib/TaskScenario.rb +165 -16
- data/lib/TextParser.rb +36 -22
- data/lib/TextParser/Pattern.rb +3 -3
- data/lib/TextParser/Rule.rb +2 -2
- data/lib/TextParser/StackElement.rb +4 -3
- data/lib/TextParser/TokenDoc.rb +2 -2
- data/lib/TextScanner.rb +52 -37
- data/lib/Tj3Config.rb +6 -5
- data/lib/TjException.rb +1 -1
- data/lib/TjTime.rb +12 -3
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +1044 -150
- data/lib/UTF8String.rb +2 -1
- data/lib/UserManual.rb +18 -70
- data/lib/WorkingHours.rb +3 -3
- data/lib/XMLDocument.rb +3 -2
- data/lib/XMLElement.rb +6 -1
- data/lib/deep_copy.rb +1 -1
- data/lib/reports/CSVFile.rb +1 -1
- data/lib/reports/ColumnTable.rb +9 -9
- data/lib/reports/GanttChart.rb +1 -1
- data/lib/reports/GanttContainer.rb +1 -1
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttHeaderScaleItem.rb +1 -1
- data/lib/reports/GanttLine.rb +40 -40
- data/lib/reports/GanttLoadStack.rb +1 -1
- data/lib/reports/GanttMilestone.rb +1 -1
- data/lib/reports/GanttRouter.rb +1 -1
- data/lib/reports/GanttTaskBar.rb +1 -1
- data/lib/reports/HTMLGraphics.rb +1 -1
- data/lib/reports/Navigator.rb +149 -22
- data/lib/reports/Report.rb +115 -172
- data/lib/reports/ReportBase.rb +22 -27
- data/lib/reports/ReportContext.rb +29 -15
- data/lib/reports/ReportTable.rb +1 -1
- data/lib/reports/ReportTableCell.rb +120 -27
- data/lib/reports/ReportTableColumn.rb +3 -3
- data/lib/reports/ReportTableLegend.rb +1 -1
- data/lib/reports/ReportTableLine.rb +10 -2
- data/lib/reports/ResourceListRE.rb +5 -1
- data/lib/reports/TableReport.rb +237 -287
- data/lib/reports/TaskListRE.rb +5 -1
- data/lib/reports/TextReport.rb +7 -4
- data/lib/reports/TimeSheetReport.rb +233 -0
- data/lib/reports/TjpExportRE.rb +2 -2
- data/lib/taskjuggler3.rb +27 -11
- data/lib/tj3client.rb +110 -0
- data/lib/tj3man.rb +4 -4
- data/manual/Getting_Started +0 -50
- data/manual/How_To_Contribute +6 -13
- data/manual/Installation +102 -28
- data/manual/Intro +11 -1
- data/manual/Reporting_Bugs +23 -7
- data/manual/Rich_Text_Attributes +59 -6
- data/manual/TaskJuggler_2x_Migration +27 -0
- data/manual/The_TaskJuggler_Syntax +104 -0
- data/manual/Tutorial +10 -9
- data/prj_cfg.rb +8 -2
- data/tasks/csts.rake +1 -1
- data/tasks/manual.rake +5 -3
- data/test/MessageChecker.rb +1 -1
- data/test/TestSuite/HTML-Reports/Alerts.html +172 -0
- data/test/TestSuite/HTML-Reports/Alerts.tjp +77 -0
- data/test/TestSuite/HTML-Reports/CellText.html +758 -0
- data/test/TestSuite/HTML-Reports/CellText.tjp +75 -0
- data/test/TestSuite/HTML-Reports/ColumnPeriods.html +156 -0
- data/test/TestSuite/HTML-Reports/ColumnPeriods.tjp +44 -0
- data/test/TestSuite/HTML-Reports/IsOngoing.html +172 -0
- data/test/TestSuite/HTML-Reports/IsOngoing.tjp +34 -0
- data/test/TestSuite/HTML-Reports/LogicalFunctions.html +80 -0
- data/test/TestSuite/HTML-Reports/LogicalFunctions.tjp +20 -0
- data/test/TestSuite/HTML-Reports/Query.html +31 -0
- data/test/TestSuite/HTML-Reports/Query.tjp +28 -0
- data/test/TestSuite/HTML-Reports/Sorting.tjp +68 -0
- data/test/TestSuite/HTML-Reports/TimeSheet.tjp +69 -0
- data/test/TestSuite/HTML-Reports/UDAQuery.tjp +27 -0
- data/test/TestSuite/HTML-Reports/css/tjmanual.css +52 -0
- data/test/TestSuite/HTML-Reports/css/tjreport.css +195 -0
- data/test/TestSuite/HTML-Reports/depArrows.html +842 -0
- data/test/TestSuite/HTML-Reports/icons/details.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-green.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-red.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-yellow.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/resource.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/resourcegroup.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/task.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/taskgroup.png +0 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +7 -8
- data/test/TestSuite/HTML-Reports/scripts/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/HTML-Reports/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/Scheduler/Correct/Mandatory.tjp +34 -0
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +2 -2
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalFunction.tjp +20 -0
- data/test/TestSuite/Syntax/Correct/Query.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/StatusSheet.tjp +45 -0
- data/test/TestSuite/Syntax/Correct/TimeSheet.tjp +49 -0
- data/test/TestSuite/Syntax/Correct/icons/details.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resource.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/task.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +113 -14
- data/test/TestSuite/Syntax/Errors/macro_stack_overflow.tjp +28 -0
- data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +12 -0
- data/test/all.rb +2 -2
- data/test/test_BatchProcessor.rb +42 -13
- data/test/test_CSV-Reports.rb +1 -1
- data/test/test_Journal.rb +176 -0
- data/test/test_Limits.rb +1 -1
- data/test/test_LogicalExpression.rb +14 -5
- data/test/test_MacroTable.rb +1 -1
- data/test/test_Project.rb +1 -1
- data/test/test_PropertySet.rb +1 -1
- data/test/test_Query.rb +1 -1
- data/test/test_RealFormat.rb +1 -1
- data/test/test_RichText.rb +30 -20
- data/test/test_Scheduler.rb +1 -1
- data/test/test_ShiftAssignments.rb +2 -2
- data/test/test_Syntax.rb +1 -1
- data/test/test_TextScanner.rb +1 -1
- data/test/test_TjTime.rb +1 -1
- data/test/test_TjpExample.rb +1 -1
- data/test/test_UTF8String.rb +1 -1
- data/test/test_WorkingHours.rb +1 -1
- data/test/test_deep_copy.rb +2 -2
- metadata +610 -532
- data/doc/files/lib/ms_test_rb.html +0 -90
- data/examples/ContactList.html +0 -1467
- data/examples/Deliveries.html +0 -485
- data/examples/Development.html +0 -2525
- data/examples/Overview.html +0 -747
- data/examples/Resource Graph.html +0 -616
- data/lib/ms_test.rb +0 -27
- data/test/TestSuite/HTML-Reports/reference-export.html +0 -187
|
@@ -104,35 +104,35 @@ before the are turned into the requested output format.
|
|
|
104
104
|
|
|
105
105
|
<div class="name-list">
|
|
106
106
|
|
|
107
|
-
<a href="#
|
|
107
|
+
<a href="#M000460">adjustReportPeriod</a>
|
|
108
108
|
|
|
109
|
-
<a href="#
|
|
109
|
+
<a href="#M000455">alignment</a>
|
|
110
110
|
|
|
111
|
-
<a href="#
|
|
111
|
+
<a href="#M000456">calculated?</a>
|
|
112
112
|
|
|
113
|
-
<a href="#
|
|
113
|
+
<a href="#M000453">defaultColumnTitle</a>
|
|
114
114
|
|
|
115
|
-
<a href="#
|
|
115
|
+
<a href="#M000461">generateHeaderCell</a>
|
|
116
116
|
|
|
117
|
-
<a href="#
|
|
117
|
+
<a href="#M000450">generateIntermediateFormat</a>
|
|
118
118
|
|
|
119
|
-
<a href="#
|
|
119
|
+
<a href="#M000463">generateResourceList</a>
|
|
120
120
|
|
|
121
|
-
<a href="#
|
|
121
|
+
<a href="#M000462">generateTaskList</a>
|
|
122
122
|
|
|
123
|
-
<a href="#
|
|
123
|
+
<a href="#M000454">indent</a>
|
|
124
124
|
|
|
125
|
-
<a href="#
|
|
125
|
+
<a href="#M000449">new</a>
|
|
126
126
|
|
|
127
|
-
<a href="#
|
|
127
|
+
<a href="#M000457">scenarioSpecific?</a>
|
|
128
128
|
|
|
129
|
-
<a href="#
|
|
129
|
+
<a href="#M000459">setReportPeriod</a>
|
|
130
130
|
|
|
131
|
-
<a href="#
|
|
131
|
+
<a href="#M000458">supportedColumns</a>
|
|
132
132
|
|
|
133
|
-
<a href="#
|
|
133
|
+
<a href="#M000452">to_csv</a>
|
|
134
134
|
|
|
135
|
-
<a href="#
|
|
135
|
+
<a href="#M000451">to_html</a>
|
|
136
136
|
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
@@ -171,12 +171,12 @@ before the are turned into the requested output format.
|
|
|
171
171
|
<h3 class="section-bar">Public Class methods</h3>
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
<div id="method-
|
|
175
|
-
<a name="
|
|
174
|
+
<div id="method-M000453" class="method-detail">
|
|
175
|
+
<a name="M000453"></a>
|
|
176
176
|
|
|
177
177
|
<div class="method-heading">
|
|
178
178
|
|
|
179
|
-
<a href="#
|
|
179
|
+
<a href="#M000453" class="method-signature">
|
|
180
180
|
|
|
181
181
|
<span class="method-name">defaultColumnTitle</span><span class="method-args">(id)</span>
|
|
182
182
|
|
|
@@ -191,19 +191,19 @@ Returns the default column title for the columns <em>id</em>.
|
|
|
191
191
|
</p>
|
|
192
192
|
|
|
193
193
|
<p><a class="source-toggle" href="#"
|
|
194
|
-
onclick="toggleCode('
|
|
195
|
-
<div class="method-source-code" id="
|
|
194
|
+
onclick="toggleCode('M000453-source');return false;">[Source]</a></p>
|
|
195
|
+
<div class="method-source-code" id="M000453-source">
|
|
196
196
|
<pre>
|
|
197
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
197
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 142</span>
|
|
198
|
+
142: <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>)
|
|
199
|
+
143: <span class="ruby-comment cmt"># Return an empty string for some special columns that don't have a fixed</span>
|
|
200
|
+
144: <span class="ruby-comment cmt"># title.</span>
|
|
201
|
+
145: <span class="ruby-identifier">specials</span> = <span class="ruby-node">%w( chart hourly daily weekly monthly quarterly yearly)</span>
|
|
202
|
+
146: <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>)
|
|
203
|
+
147:
|
|
204
|
+
148: <span class="ruby-comment cmt"># Return the title for build-in hardwired columns.</span>
|
|
205
|
+
149: <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@@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>
|
|
206
|
+
150: <span class="ruby-keyword kw">end</span>
|
|
207
207
|
</pre>
|
|
208
208
|
</div>
|
|
209
209
|
|
|
@@ -211,12 +211,12 @@ Returns the default column title for the columns <em>id</em>.
|
|
|
211
211
|
</div>
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
<div id="method-
|
|
215
|
-
<a name="
|
|
214
|
+
<div id="method-M000449" class="method-detail">
|
|
215
|
+
<a name="M000449"></a>
|
|
216
216
|
|
|
217
217
|
<div class="method-heading">
|
|
218
218
|
|
|
219
|
-
<a href="#
|
|
219
|
+
<a href="#M000449" class="method-signature">
|
|
220
220
|
|
|
221
221
|
<span class="method-name">new</span><span class="method-args">(report)</span>
|
|
222
222
|
|
|
@@ -231,21 +231,21 @@ Generate a new <a href="TableReport.html">TableReport</a> object.
|
|
|
231
231
|
</p>
|
|
232
232
|
|
|
233
233
|
<p><a class="source-toggle" href="#"
|
|
234
|
-
onclick="toggleCode('
|
|
235
|
-
<div class="method-source-code" id="
|
|
234
|
+
onclick="toggleCode('M000449-source');return false;">[Source]</a></p>
|
|
235
|
+
<div class="method-source-code" id="M000449-source">
|
|
236
236
|
<pre>
|
|
237
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
237
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 63</span>
|
|
238
|
+
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">report</span>)
|
|
239
|
+
64: <span class="ruby-keyword kw">super</span>
|
|
240
|
+
65: <span class="ruby-ivar">@report</span>.<span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>
|
|
241
|
+
66:
|
|
242
|
+
67: <span class="ruby-comment cmt"># Reference to the intermediate representation.</span>
|
|
243
|
+
68: <span class="ruby-ivar">@table</span> = <span class="ruby-keyword kw">nil</span>
|
|
244
|
+
69: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
245
|
+
70:
|
|
246
|
+
71: <span class="ruby-ivar">@legend</span> = <span class="ruby-constant">ReportTableLegend</span>.<span class="ruby-identifier">new</span>
|
|
247
|
+
72:
|
|
248
|
+
73: <span class="ruby-keyword kw">end</span>
|
|
249
249
|
</pre>
|
|
250
250
|
</div>
|
|
251
251
|
|
|
@@ -256,12 +256,12 @@ Generate a new <a href="TableReport.html">TableReport</a> object.
|
|
|
256
256
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
<div id="method-
|
|
260
|
-
<a name="
|
|
259
|
+
<div id="method-M000455" class="method-detail">
|
|
260
|
+
<a name="M000455"></a>
|
|
261
261
|
|
|
262
262
|
<div class="method-heading">
|
|
263
263
|
|
|
264
|
-
<a href="#
|
|
264
|
+
<a href="#M000455" class="method-signature">
|
|
265
265
|
|
|
266
266
|
<span class="method-name">alignment</span><span class="method-args">(colId, propertyType)</span>
|
|
267
267
|
|
|
@@ -277,19 +277,19 @@ Return the alignment of the column based on the <em>colId</em> or the
|
|
|
277
277
|
</p>
|
|
278
278
|
|
|
279
279
|
<p><a class="source-toggle" href="#"
|
|
280
|
-
onclick="toggleCode('
|
|
281
|
-
<div class="method-source-code" id="
|
|
280
|
+
onclick="toggleCode('M000455-source');return false;">[Source]</a></p>
|
|
281
|
+
<div class="method-source-code" id="M000455-source">
|
|
282
282
|
<pre>
|
|
283
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
283
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 166</span>
|
|
284
|
+
166: <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>)
|
|
285
|
+
167: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
286
|
+
168: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">2</span>]
|
|
287
|
+
169: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@@propertiesByType</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">propertyType</span>)
|
|
288
|
+
170: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesByType</span>[<span class="ruby-identifier">propertyType</span>][<span class="ruby-value">1</span>]
|
|
289
|
+
171: <span class="ruby-keyword kw">else</span>
|
|
290
|
+
172: <span class="ruby-identifier">:center</span>
|
|
291
|
+
173: <span class="ruby-keyword kw">end</span>
|
|
292
|
+
174: <span class="ruby-keyword kw">end</span>
|
|
293
293
|
</pre>
|
|
294
294
|
</div>
|
|
295
295
|
|
|
@@ -297,12 +297,12 @@ Return the alignment of the column based on the <em>colId</em> or the
|
|
|
297
297
|
</div>
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
<div id="method-
|
|
301
|
-
<a name="
|
|
300
|
+
<div id="method-M000456" class="method-detail">
|
|
301
|
+
<a name="M000456"></a>
|
|
302
302
|
|
|
303
303
|
<div class="method-heading">
|
|
304
304
|
|
|
305
|
-
<a href="#
|
|
305
|
+
<a href="#M000456" class="method-signature">
|
|
306
306
|
|
|
307
307
|
<span class="method-name">calculated?</span><span class="method-args">(colId)</span>
|
|
308
308
|
|
|
@@ -318,16 +318,13 @@ to be calculated.
|
|
|
318
318
|
</p>
|
|
319
319
|
|
|
320
320
|
<p><a class="source-toggle" href="#"
|
|
321
|
-
onclick="toggleCode('
|
|
322
|
-
<div class="method-source-code" id="
|
|
321
|
+
onclick="toggleCode('M000456-source');return false;">[Source]</a></p>
|
|
322
|
+
<div class="method-source-code" id="M000456-source">
|
|
323
323
|
<pre>
|
|
324
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
169: <span class="ruby-keyword kw">end</span>
|
|
329
|
-
170: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
330
|
-
171: <span class="ruby-keyword kw">end</span>
|
|
324
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 178</span>
|
|
325
|
+
178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculated?</span>(<span class="ruby-identifier">colId</span>)
|
|
326
|
+
179: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
327
|
+
180: <span class="ruby-keyword kw">end</span>
|
|
331
328
|
</pre>
|
|
332
329
|
</div>
|
|
333
330
|
|
|
@@ -335,14 +332,14 @@ to be calculated.
|
|
|
335
332
|
</div>
|
|
336
333
|
|
|
337
334
|
|
|
338
|
-
<div id="method-
|
|
339
|
-
<a name="
|
|
335
|
+
<div id="method-M000450" class="method-detail">
|
|
336
|
+
<a name="M000450"></a>
|
|
340
337
|
|
|
341
338
|
<div class="method-heading">
|
|
342
339
|
|
|
343
|
-
<a href="#
|
|
340
|
+
<a href="#M000450" class="method-signature">
|
|
344
341
|
|
|
345
|
-
<span class="method-name">
|
|
342
|
+
<span class="method-name">generateIntermediateFormat</span><span class="method-args">()</span>
|
|
346
343
|
|
|
347
344
|
</a>
|
|
348
345
|
|
|
@@ -350,40 +347,14 @@ to be calculated.
|
|
|
350
347
|
|
|
351
348
|
<div class="method-description">
|
|
352
349
|
|
|
353
|
-
<p>
|
|
354
|
-
This is the default attribute value to text converter. It is used whenever
|
|
355
|
-
we need no special treatment.
|
|
356
|
-
</p>
|
|
357
|
-
|
|
358
350
|
<p><a class="source-toggle" href="#"
|
|
359
|
-
onclick="toggleCode('
|
|
360
|
-
<div class="method-source-code" id="
|
|
351
|
+
onclick="toggleCode('M000450-source');return false;">[Source]</a></p>
|
|
352
|
+
<div class="method-source-code" id="M000450-source">
|
|
361
353
|
<pre>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
142: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DateAttribute</span>
|
|
367
|
-
143: <span class="ruby-keyword kw">nil</span>
|
|
368
|
-
144: <span class="ruby-keyword kw">else</span>
|
|
369
|
-
145: <span class="ruby-value str">''</span>
|
|
370
|
-
146: <span class="ruby-keyword kw">end</span>
|
|
371
|
-
147: <span class="ruby-keyword kw">else</span>
|
|
372
|
-
148: <span class="ruby-comment cmt"># Certain attribute types need special treatment.</span>
|
|
373
|
-
149: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DateAttribute</span>
|
|
374
|
-
150: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">a</span>(<span class="ruby-value str">'timeFormat'</span>))
|
|
375
|
-
151: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">RichTextAttribute</span>
|
|
376
|
-
152: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>
|
|
377
|
-
153: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ReferenceAttribute</span>
|
|
378
|
-
154: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">label</span>
|
|
379
|
-
155: <span class="ruby-keyword kw">else</span>
|
|
380
|
-
156: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>
|
|
381
|
-
157: <span class="ruby-keyword kw">end</span>
|
|
382
|
-
158: <span class="ruby-keyword kw">end</span>
|
|
383
|
-
159: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">TjException</span>
|
|
384
|
-
160: <span class="ruby-value str">''</span>
|
|
385
|
-
161: <span class="ruby-keyword kw">end</span>
|
|
386
|
-
162: <span class="ruby-keyword kw">end</span>
|
|
354
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 75</span>
|
|
355
|
+
75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateIntermediateFormat</span>
|
|
356
|
+
76: <span class="ruby-keyword kw">super</span>
|
|
357
|
+
77: <span class="ruby-keyword kw">end</span>
|
|
387
358
|
</pre>
|
|
388
359
|
</div>
|
|
389
360
|
|
|
@@ -391,12 +362,12 @@ we need no special treatment.
|
|
|
391
362
|
</div>
|
|
392
363
|
|
|
393
364
|
|
|
394
|
-
<div id="method-
|
|
395
|
-
<a name="
|
|
365
|
+
<div id="method-M000454" class="method-detail">
|
|
366
|
+
<a name="M000454"></a>
|
|
396
367
|
|
|
397
368
|
<div class="method-heading">
|
|
398
369
|
|
|
399
|
-
<a href="#
|
|
370
|
+
<a href="#M000454" class="method-signature">
|
|
400
371
|
|
|
401
372
|
<span class="method-name">indent</span><span class="method-args">(colId, propertyType)</span>
|
|
402
373
|
|
|
@@ -412,19 +383,19 @@ or the <em>propertyType</em>.
|
|
|
412
383
|
</p>
|
|
413
384
|
|
|
414
385
|
<p><a class="source-toggle" href="#"
|
|
415
|
-
onclick="toggleCode('
|
|
416
|
-
<div class="method-source-code" id="
|
|
386
|
+
onclick="toggleCode('M000454-source');return false;">[Source]</a></p>
|
|
387
|
+
<div class="method-source-code" id="M000454-source">
|
|
417
388
|
<pre>
|
|
418
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
389
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 154</span>
|
|
390
|
+
154: <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>)
|
|
391
|
+
155: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
392
|
+
156: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">1</span>]
|
|
393
|
+
157: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@@propertiesByType</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">propertyType</span>)
|
|
394
|
+
158: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesByType</span>[<span class="ruby-identifier">propertyType</span>][<span class="ruby-value">0</span>]
|
|
395
|
+
159: <span class="ruby-keyword kw">else</span>
|
|
396
|
+
160: <span class="ruby-keyword kw">false</span>
|
|
397
|
+
161: <span class="ruby-keyword kw">end</span>
|
|
398
|
+
162: <span class="ruby-keyword kw">end</span>
|
|
428
399
|
</pre>
|
|
429
400
|
</div>
|
|
430
401
|
|
|
@@ -432,12 +403,12 @@ or the <em>propertyType</em>.
|
|
|
432
403
|
</div>
|
|
433
404
|
|
|
434
405
|
|
|
435
|
-
<div id="method-
|
|
436
|
-
<a name="
|
|
406
|
+
<div id="method-M000457" class="method-detail">
|
|
407
|
+
<a name="M000457"></a>
|
|
437
408
|
|
|
438
409
|
<div class="method-heading">
|
|
439
410
|
|
|
440
|
-
<a href="#
|
|
411
|
+
<a href="#M000457" class="method-signature">
|
|
441
412
|
|
|
442
413
|
<span class="method-name">scenarioSpecific?</span><span class="method-args">(colId)</span>
|
|
443
414
|
|
|
@@ -453,16 +424,16 @@ are scenario specific.
|
|
|
453
424
|
</p>
|
|
454
425
|
|
|
455
426
|
<p><a class="source-toggle" href="#"
|
|
456
|
-
onclick="toggleCode('
|
|
457
|
-
<div class="method-source-code" id="
|
|
427
|
+
onclick="toggleCode('M000457-source');return false;">[Source]</a></p>
|
|
428
|
+
<div class="method-source-code" id="M000457-source">
|
|
458
429
|
<pre>
|
|
459
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
430
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 184</span>
|
|
431
|
+
184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenarioSpecific?</span>(<span class="ruby-identifier">colId</span>)
|
|
432
|
+
185: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">colId</span>)
|
|
433
|
+
186: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@propertiesById</span>[<span class="ruby-identifier">colId</span>][<span class="ruby-value">3</span>]
|
|
434
|
+
187: <span class="ruby-keyword kw">end</span>
|
|
435
|
+
188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
436
|
+
189: <span class="ruby-keyword kw">end</span>
|
|
466
437
|
</pre>
|
|
467
438
|
</div>
|
|
468
439
|
|
|
@@ -470,12 +441,12 @@ are scenario specific.
|
|
|
470
441
|
</div>
|
|
471
442
|
|
|
472
443
|
|
|
473
|
-
<div id="method-
|
|
474
|
-
<a name="
|
|
444
|
+
<div id="method-M000458" class="method-detail">
|
|
445
|
+
<a name="M000458"></a>
|
|
475
446
|
|
|
476
447
|
<div class="method-heading">
|
|
477
448
|
|
|
478
|
-
<a href="#
|
|
449
|
+
<a href="#M000458" class="method-signature">
|
|
479
450
|
|
|
480
451
|
<span class="method-name">supportedColumns</span><span class="method-args">()</span>
|
|
481
452
|
|
|
@@ -486,13 +457,13 @@ are scenario specific.
|
|
|
486
457
|
<div class="method-description">
|
|
487
458
|
|
|
488
459
|
<p><a class="source-toggle" href="#"
|
|
489
|
-
onclick="toggleCode('
|
|
490
|
-
<div class="method-source-code" id="
|
|
460
|
+
onclick="toggleCode('M000458-source');return false;">[Source]</a></p>
|
|
461
|
+
<div class="method-source-code" id="M000458-source">
|
|
491
462
|
<pre>
|
|
492
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
463
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 191</span>
|
|
464
|
+
191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supportedColumns</span>
|
|
465
|
+
192: <span class="ruby-ivar">@@propertiesById</span>.<span class="ruby-identifier">keys</span>
|
|
466
|
+
193: <span class="ruby-keyword kw">end</span>
|
|
496
467
|
</pre>
|
|
497
468
|
</div>
|
|
498
469
|
|
|
@@ -500,12 +471,12 @@ are scenario specific.
|
|
|
500
471
|
</div>
|
|
501
472
|
|
|
502
473
|
|
|
503
|
-
<div id="method-
|
|
504
|
-
<a name="
|
|
474
|
+
<div id="method-M000452" class="method-detail">
|
|
475
|
+
<a name="M000452"></a>
|
|
505
476
|
|
|
506
477
|
<div class="method-heading">
|
|
507
478
|
|
|
508
|
-
<a href="#
|
|
479
|
+
<a href="#M000452" class="method-signature">
|
|
509
480
|
|
|
510
481
|
<span class="method-name">to_csv</span><span class="method-args">()</span>
|
|
511
482
|
|
|
@@ -522,13 +493,13 @@ column.
|
|
|
522
493
|
</p>
|
|
523
494
|
|
|
524
495
|
<p><a class="source-toggle" href="#"
|
|
525
|
-
onclick="toggleCode('
|
|
526
|
-
<div class="method-source-code" id="
|
|
496
|
+
onclick="toggleCode('M000452-source');return false;">[Source]</a></p>
|
|
497
|
+
<div class="method-source-code" id="M000452-source">
|
|
527
498
|
<pre>
|
|
528
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
499
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 137</span>
|
|
500
|
+
137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_csv</span>
|
|
501
|
+
138: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_csv</span>
|
|
502
|
+
139: <span class="ruby-keyword kw">end</span>
|
|
532
503
|
</pre>
|
|
533
504
|
</div>
|
|
534
505
|
|
|
@@ -536,12 +507,12 @@ column.
|
|
|
536
507
|
</div>
|
|
537
508
|
|
|
538
509
|
|
|
539
|
-
<div id="method-
|
|
540
|
-
<a name="
|
|
510
|
+
<div id="method-M000451" class="method-detail">
|
|
511
|
+
<a name="M000451"></a>
|
|
541
512
|
|
|
542
513
|
<div class="method-heading">
|
|
543
514
|
|
|
544
|
-
<a href="#
|
|
515
|
+
<a href="#M000451" class="method-signature">
|
|
545
516
|
|
|
546
517
|
<span class="method-name">to_html</span><span class="method-args">()</span>
|
|
547
518
|
|
|
@@ -557,73 +528,62 @@ element tree.
|
|
|
557
528
|
</p>
|
|
558
529
|
|
|
559
530
|
<p><a class="source-toggle" href="#"
|
|
560
|
-
onclick="toggleCode('
|
|
561
|
-
<div class="method-source-code" id="
|
|
531
|
+
onclick="toggleCode('M000451-source');return false;">[Source]</a></p>
|
|
532
|
+
<div class="method-source-code" id="M000451-source">
|
|
562
533
|
<pre>
|
|
563
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
92:
|
|
590
|
-
93: <span class="ruby-comment cmt"># Now generate the actual table with the data.</span>
|
|
591
|
-
94: <span class="ruby-identifier">table</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tbody</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tbody'</span>))
|
|
592
|
-
95: <span class="ruby-identifier">tbody</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
593
|
-
96: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>))
|
|
594
|
-
97: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_html</span>
|
|
595
|
-
98:
|
|
596
|
-
99: <span class="ruby-comment cmt"># Embedd the caption as RichText into the table footer.</span>
|
|
597
|
-
100: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>)
|
|
598
|
-
101: <span class="ruby-identifier">tbody</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
599
|
-
102: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>, <span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tabback'</span>))
|
|
600
|
-
103: <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">'caption'</span>,
|
|
601
|
-
104: <span class="ruby-value str">'style'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'margin:1px'</span>))
|
|
602
|
-
105: <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>
|
|
603
|
-
106: <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>
|
|
534
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 82</span>
|
|
535
|
+
82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_html</span>
|
|
536
|
+
83: <span class="ruby-identifier">html</span> = []
|
|
537
|
+
84:
|
|
538
|
+
85: <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>)
|
|
539
|
+
86: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">table</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'table'</span>, <span class="ruby-value str">'summary'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Report Table'</span>,
|
|
540
|
+
87: <span class="ruby-value str">'cellspacing'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'2'</span>, <span class="ruby-value str">'border'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'0'</span>,
|
|
541
|
+
88: <span class="ruby-value str">'cellpadding'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'0'</span>, <span class="ruby-value str">'align'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'center'</span>,
|
|
542
|
+
89: <span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tjtable'</span>))
|
|
543
|
+
90:
|
|
544
|
+
91: <span class="ruby-comment cmt"># The headline is put in a sub-table to appear bigger.</span>
|
|
545
|
+
92: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'headline'</span>)
|
|
546
|
+
93: <span class="ruby-identifier">table</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">thead</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'thead'</span>))
|
|
547
|
+
94: <span class="ruby-identifier">thead</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
548
|
+
95: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>))
|
|
549
|
+
96: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">table1</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'table'</span>, <span class="ruby-value str">'summary'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'headline'</span>,
|
|
550
|
+
97: <span class="ruby-value str">'cellspacing'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'1'</span>, <span class="ruby-value str">'border'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'0'</span>,
|
|
551
|
+
98: <span class="ruby-value str">'cellpadding'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'5'</span>,
|
|
552
|
+
99: <span class="ruby-value str">'align'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'center'</span>, <span class="ruby-value str">'width'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'100%'</span>))
|
|
553
|
+
100: <span class="ruby-identifier">table1</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr1</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
554
|
+
101: <span class="ruby-identifier">tr1</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">td1</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'td'</span>, <span class="ruby-value str">'align'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'center'</span>,
|
|
555
|
+
102: <span class="ruby-value str">'style'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'font-size:16px; '</span> <span class="ruby-operator">+</span>
|
|
556
|
+
103: <span class="ruby-value str">'font-weight:bold; '</span> <span class="ruby-operator">+</span>
|
|
557
|
+
104: <span class="ruby-value str">'padding:5px'</span>,
|
|
558
|
+
105: <span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tabfront'</span>))
|
|
559
|
+
106: <span class="ruby-identifier">td1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'headline'</span>).<span class="ruby-identifier">to_html</span>
|
|
604
560
|
107: <span class="ruby-keyword kw">end</span>
|
|
605
561
|
108:
|
|
606
|
-
109: <span class="ruby-comment cmt">#
|
|
607
|
-
110: <span class="ruby-identifier">
|
|
608
|
-
111: <span class="ruby-identifier">
|
|
609
|
-
112:
|
|
610
|
-
113: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@
|
|
562
|
+
109: <span class="ruby-comment cmt"># Now generate the actual table with the data.</span>
|
|
563
|
+
110: <span class="ruby-identifier">table</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tbody</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tbody'</span>))
|
|
564
|
+
111: <span class="ruby-identifier">tbody</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
565
|
+
112: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>))
|
|
566
|
+
113: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">to_html</span>
|
|
611
567
|
114:
|
|
612
|
-
115: <span class="ruby-comment cmt">#
|
|
613
|
-
116: <span class="ruby-
|
|
614
|
-
117:
|
|
615
|
-
118:
|
|
616
|
-
119:
|
|
617
|
-
120:
|
|
618
|
-
121:
|
|
619
|
-
122:
|
|
620
|
-
123: <span class="ruby-
|
|
621
|
-
124:
|
|
622
|
-
125: <span class="ruby-
|
|
623
|
-
126:
|
|
624
|
-
127: <span class="ruby-identifier">
|
|
625
|
-
128:
|
|
626
|
-
129:
|
|
568
|
+
115: <span class="ruby-comment cmt"># Embedd the caption as RichText into the table footer.</span>
|
|
569
|
+
116: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span>(<span class="ruby-value str">'caption'</span>)
|
|
570
|
+
117: <span class="ruby-identifier">tbody</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>))
|
|
571
|
+
118: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>, <span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tabback'</span>))
|
|
572
|
+
119: <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">'caption'</span>,
|
|
573
|
+
120: <span class="ruby-value str">'style'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'margin:1px'</span>))
|
|
574
|
+
121: <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>
|
|
575
|
+
122: <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>
|
|
576
|
+
123: <span class="ruby-keyword kw">end</span>
|
|
577
|
+
124:
|
|
578
|
+
125: <span class="ruby-comment cmt"># A sub-table with the legend.</span>
|
|
579
|
+
126: <span class="ruby-identifier">tbody</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">tr</span> = <span class="ruby-constant">XMLElement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'tr'</span>, <span class="ruby-value str">'style'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'font-size:10px;'</span>))
|
|
580
|
+
127: <span class="ruby-identifier">tr</span> <span class="ruby-operator"><<</span> (<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>, <span class="ruby-value str">'style'</span> =<span class="ruby-operator">></span>
|
|
581
|
+
128: <span class="ruby-value str">'padding-left:1px; padding-right:1px;'</span>))
|
|
582
|
+
129: <span class="ruby-identifier">td</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@legend</span>.<span class="ruby-identifier">to_html</span>
|
|
583
|
+
130:
|
|
584
|
+
131: <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>)
|
|
585
|
+
132: <span class="ruby-identifier">html</span>
|
|
586
|
+
133: <span class="ruby-keyword kw">end</span>
|
|
627
587
|
</pre>
|
|
628
588
|
</div>
|
|
629
589
|
|
|
@@ -634,12 +594,12 @@ element tree.
|
|
|
634
594
|
<h3 class="section-bar">Protected Instance methods</h3>
|
|
635
595
|
|
|
636
596
|
|
|
637
|
-
<div id="method-
|
|
638
|
-
<a name="
|
|
597
|
+
<div id="method-M000460" class="method-detail">
|
|
598
|
+
<a name="M000460"></a>
|
|
639
599
|
|
|
640
600
|
<div class="method-heading">
|
|
641
601
|
|
|
642
|
-
<a href="#
|
|
602
|
+
<a href="#M000460" class="method-signature">
|
|
643
603
|
|
|
644
604
|
<span class="method-name">adjustReportPeriod</span><span class="method-args">(tasks, scenarios, columns)</span>
|
|
645
605
|
|
|
@@ -656,76 +616,75 @@ is a list of scenario indexes.
|
|
|
656
616
|
</p>
|
|
657
617
|
|
|
658
618
|
<p><a class="source-toggle" href="#"
|
|
659
|
-
onclick="toggleCode('
|
|
660
|
-
<div class="method-source-code" id="
|
|
619
|
+
onclick="toggleCode('M000460-source');return false;">[Source]</a></p>
|
|
620
|
+
<div class="method-source-code" id="M000460-source">
|
|
661
621
|
<pre>
|
|
662
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
298: <span class="ruby-keyword kw">end</span>
|
|
622
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 207</span>
|
|
623
|
+
207: <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>)
|
|
624
|
+
208: <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>
|
|
625
|
+
209: <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>]
|
|
626
|
+
210:
|
|
627
|
+
211: <span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@end</span> = <span class="ruby-keyword kw">nil</span>
|
|
628
|
+
212: <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>
|
|
629
|
+
213: <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>
|
|
630
|
+
214: <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>]
|
|
631
|
+
215: <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>
|
|
632
|
+
216: <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>]
|
|
633
|
+
217: <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>
|
|
634
|
+
218: <span class="ruby-keyword kw">end</span>
|
|
635
|
+
219: <span class="ruby-keyword kw">end</span>
|
|
636
|
+
220: <span class="ruby-comment cmt"># We want to add at least 5% on both ends.</span>
|
|
637
|
+
221: <span class="ruby-identifier">margin</span> = <span class="ruby-value">0</span>
|
|
638
|
+
222: <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>
|
|
639
|
+
223: <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>
|
|
640
|
+
224: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
641
|
+
225: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
642
|
+
226: <span class="ruby-comment cmt"># In case we have a 'chart' column, we enforce certain minimum width</span>
|
|
643
|
+
227: <span class="ruby-comment cmt"># The following table contains an entry for each scale. The entry</span>
|
|
644
|
+
228: <span class="ruby-comment cmt"># consists of the triple 'seconds per unit', 'minimum width units'</span>
|
|
645
|
+
229: <span class="ruby-comment cmt"># and 'margin units'. The minimum with does not include the margins</span>
|
|
646
|
+
230: <span class="ruby-comment cmt"># since they are always added.</span>
|
|
647
|
+
231: <span class="ruby-identifier">mwMap</span> = {
|
|
648
|
+
232: <span class="ruby-value str">'hour'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
649
|
+
233: <span class="ruby-value str">'day'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
650
|
+
234: <span class="ruby-value str">'week'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">7</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
651
|
+
235: <span class="ruby-value str">'month'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">31</span>, <span class="ruby-value">10</span>, <span class="ruby-value">1</span> ],
|
|
652
|
+
236: <span class="ruby-value str">'quarter'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">90</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
653
|
+
237: <span class="ruby-value str">'year'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">365</span>, <span class="ruby-value">4</span>, <span class="ruby-value">1</span> ]
|
|
654
|
+
238: }
|
|
655
|
+
239: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">scale</span>]
|
|
656
|
+
240: <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>
|
|
657
|
+
241: <span class="ruby-identifier">margin</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">2</span>]
|
|
658
|
+
242: <span class="ruby-comment cmt"># If the with determined by start and end dates of the task is below</span>
|
|
659
|
+
243: <span class="ruby-comment cmt"># the minimum width, we increase the width to the value provided by</span>
|
|
660
|
+
244: <span class="ruby-comment cmt"># the table.</span>
|
|
661
|
+
245: <span class="ruby-identifier">minWidth</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</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-operator">*</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>]
|
|
662
|
+
246: <span class="ruby-keyword kw">break</span>
|
|
663
|
+
247: <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>
|
|
664
|
+
248: <span class="ruby-comment cmt"># For the calendar columns we use a similar approach as we use for</span>
|
|
665
|
+
249: <span class="ruby-comment cmt"># the 'chart' column.</span>
|
|
666
|
+
250: <span class="ruby-identifier">mwMap</span> = {
|
|
667
|
+
251: <span class="ruby-value str">'hourly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
668
|
+
252: <span class="ruby-value str">'daily'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span>, <span class="ruby-value">18</span>, <span class="ruby-value">2</span> ],
|
|
669
|
+
253: <span class="ruby-value str">'weekly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">7</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
670
|
+
254: <span class="ruby-value str">'monthly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">31</span>, <span class="ruby-value">10</span>, <span class="ruby-value">1</span> ],
|
|
671
|
+
255: <span class="ruby-value str">'quarterly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">90</span>, <span class="ruby-value">6</span>, <span class="ruby-value">1</span> ],
|
|
672
|
+
256: <span class="ruby-value str">'yearly'</span> =<span class="ruby-operator">></span> [ <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">24</span> <span class="ruby-operator">*</span> <span class="ruby-value">365</span>, <span class="ruby-value">4</span>, <span class="ruby-value">1</span> ]
|
|
673
|
+
257: }
|
|
674
|
+
258: <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">mwMap</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>]
|
|
675
|
+
259: <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>
|
|
676
|
+
260: <span class="ruby-identifier">margin</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">2</span>]
|
|
677
|
+
261: <span class="ruby-identifier">minWidth</span> = <span class="ruby-identifier">entry</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</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-operator">*</span> <span class="ruby-identifier">entry</span>[<span class="ruby-value">1</span>]
|
|
678
|
+
262: <span class="ruby-keyword kw">break</span>
|
|
679
|
+
263: <span class="ruby-keyword kw">end</span>
|
|
680
|
+
264: <span class="ruby-keyword kw">end</span>
|
|
681
|
+
265:
|
|
682
|
+
266: <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>)
|
|
683
|
+
267: <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>
|
|
684
|
+
268: <span class="ruby-keyword kw">end</span>
|
|
685
|
+
269: <span class="ruby-ivar">@start</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">margin</span>
|
|
686
|
+
270: <span class="ruby-ivar">@end</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">margin</span>
|
|
687
|
+
271: <span class="ruby-keyword kw">end</span>
|
|
729
688
|
</pre>
|
|
730
689
|
</div>
|
|
731
690
|
|
|
@@ -733,12 +692,12 @@ is a list of scenario indexes.
|
|
|
733
692
|
</div>
|
|
734
693
|
|
|
735
694
|
|
|
736
|
-
<div id="method-
|
|
737
|
-
<a name="
|
|
695
|
+
<div id="method-M000461" class="method-detail">
|
|
696
|
+
<a name="M000461"></a>
|
|
738
697
|
|
|
739
698
|
<div class="method-heading">
|
|
740
699
|
|
|
741
|
-
<a href="#
|
|
700
|
+
<a href="#M000461" class="method-signature">
|
|
742
701
|
|
|
743
702
|
<span class="method-name">generateHeaderCell</span><span class="method-args">(columnDef)</span>
|
|
744
703
|
|
|
@@ -756,58 +715,58 @@ to be taken to generate the header text.
|
|
|
756
715
|
</p>
|
|
757
716
|
|
|
758
717
|
<p><a class="source-toggle" href="#"
|
|
759
|
-
onclick="toggleCode('
|
|
760
|
-
<div class="method-source-code" id="
|
|
718
|
+
onclick="toggleCode('M000461-source');return false;">[Source]</a></p>
|
|
719
|
+
<div class="method-source-code" id="M000461-source">
|
|
761
720
|
<pre>
|
|
762
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
721
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 276</span>
|
|
722
|
+
276: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHeaderCell</span>(<span class="ruby-identifier">columnDef</span>)
|
|
723
|
+
277: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
724
|
+
278: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'chart'</span>
|
|
725
|
+
279: <span class="ruby-comment cmt"># For the 'chart' column we generate a GanttChart object. The sizes are</span>
|
|
726
|
+
280: <span class="ruby-comment cmt"># set so that the lines of the Gantt chart line up with the lines of the</span>
|
|
727
|
+
281: <span class="ruby-comment cmt"># table.</span>
|
|
728
|
+
282: <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>),
|
|
729
|
+
283: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'weekStartsMonday'</span>), <span class="ruby-keyword kw">self</span>)
|
|
730
|
+
284: <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>)
|
|
731
|
+
285: <span class="ruby-comment cmt"># The header consists of 2 lines separated by a 1 pixel boundary.</span>
|
|
732
|
+
286: <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-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
733
|
+
287: <span class="ruby-comment cmt"># The maximum width of the chart. In case it needs more space, a</span>
|
|
734
|
+
288: <span class="ruby-comment cmt"># scrollbar is shown or the chart gets truncated depending on the output</span>
|
|
735
|
+
289: <span class="ruby-comment cmt"># format.</span>
|
|
736
|
+
290: <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-value">? </span><span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">:</span> <span class="ruby-value">450</span>
|
|
737
|
+
291: <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>)
|
|
738
|
+
292: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">special</span> = <span class="ruby-identifier">gantt</span>
|
|
739
|
+
293: <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>
|
|
740
|
+
294: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">scrollbar</span> = <span class="ruby-identifier">gantt</span>.<span class="ruby-identifier">hasScrollbar?</span>
|
|
741
|
+
295: <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">equiLines</span> = <span class="ruby-keyword kw">true</span>
|
|
742
|
+
296: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'hourly'</span>
|
|
743
|
+
297: <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-identifier">:sameTimeNextHour</span>,
|
|
744
|
+
298: <span class="ruby-identifier">:weekdayAndDate</span>, <span class="ruby-identifier">:hour</span>)
|
|
745
|
+
299: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'daily'</span>
|
|
746
|
+
300: <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-identifier">:sameTimeNextDay</span>,
|
|
747
|
+
301: <span class="ruby-identifier">:monthAndYear</span>, <span class="ruby-identifier">:day</span>)
|
|
748
|
+
302: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'weekly'</span>
|
|
749
|
+
303: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>,
|
|
750
|
+
304: <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>)),
|
|
751
|
+
305: <span class="ruby-identifier">:sameTimeNextWeek</span>, <span class="ruby-identifier">:monthAndYear</span>, <span class="ruby-identifier">:day</span>)
|
|
752
|
+
306: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'monthly'</span>
|
|
753
|
+
307: <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-identifier">:sameTimeNextMonth</span>,
|
|
754
|
+
308: <span class="ruby-identifier">:year</span>, <span class="ruby-identifier">:shortMonthName</span>)
|
|
755
|
+
309: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'quarterly'</span>
|
|
756
|
+
310: <span class="ruby-identifier">genCalChartHeader</span>(<span class="ruby-identifier">columnDef</span>, <span class="ruby-ivar">@start</span>.<span class="ruby-identifier">beginOfQuarter</span>,
|
|
757
|
+
311: <span class="ruby-identifier">:sameTimeNextQuarter</span>, <span class="ruby-identifier">:year</span>, <span class="ruby-identifier">:quarterName</span>)
|
|
758
|
+
312: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'yearly'</span>
|
|
759
|
+
313: <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-identifier">:sameTimeNextYear</span>,
|
|
760
|
+
314: <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:year</span>)
|
|
761
|
+
315: <span class="ruby-keyword kw">else</span>
|
|
762
|
+
316: <span class="ruby-comment cmt"># This is the most common case. It does not need any special treatment.</span>
|
|
763
|
+
317: <span class="ruby-comment cmt"># We just set the pre-defined or user-defined column title in the first</span>
|
|
764
|
+
318: <span class="ruby-comment cmt"># row of the header. The 2nd row is not visible.</span>
|
|
765
|
+
319: <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>)
|
|
766
|
+
320: <span class="ruby-identifier">column</span>.<span class="ruby-identifier">cell1</span>.<span class="ruby-identifier">rows</span> = <span class="ruby-value">2</span>
|
|
767
|
+
321: <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>
|
|
768
|
+
322: <span class="ruby-keyword kw">end</span>
|
|
769
|
+
323: <span class="ruby-keyword kw">end</span>
|
|
811
770
|
</pre>
|
|
812
771
|
</div>
|
|
813
772
|
|
|
@@ -815,12 +774,12 @@ to be taken to generate the header text.
|
|
|
815
774
|
</div>
|
|
816
775
|
|
|
817
776
|
|
|
818
|
-
<div id="method-
|
|
819
|
-
<a name="
|
|
777
|
+
<div id="method-M000463" class="method-detail">
|
|
778
|
+
<a name="M000463"></a>
|
|
820
779
|
|
|
821
780
|
<div class="method-heading">
|
|
822
781
|
|
|
823
|
-
<a href="#
|
|
782
|
+
<a href="#M000463" class="method-signature">
|
|
824
783
|
|
|
825
784
|
<span class="method-name">generateResourceList</span><span class="method-args">(resourceList, taskList, scopeLine)</span>
|
|
826
785
|
|
|
@@ -839,60 +798,70 @@ resource lines will be within the scope this task line.
|
|
|
839
798
|
</p>
|
|
840
799
|
|
|
841
800
|
<p><a class="source-toggle" href="#"
|
|
842
|
-
onclick="toggleCode('
|
|
843
|
-
<div class="method-source-code" id="
|
|
801
|
+
onclick="toggleCode('M000463-source');return false;">[Source]</a></p>
|
|
802
|
+
<div class="method-source-code" id="M000463-source">
|
|
844
803
|
<pre>
|
|
845
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
804
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 394</span>
|
|
805
|
+
394: <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>)
|
|
806
|
+
395: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
807
|
+
396: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </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>,
|
|
808
|
+
397: <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>),
|
|
809
|
+
398: <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>),
|
|
810
|
+
399: <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>),
|
|
811
|
+
400: <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>),
|
|
812
|
+
401: <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>,
|
|
813
|
+
402: <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>),
|
|
814
|
+
403: <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>) }
|
|
815
|
+
404: <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>)
|
|
816
|
+
405: <span class="ruby-identifier">resourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
817
|
+
406:
|
|
818
|
+
407: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
819
|
+
408: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
820
|
+
409: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
821
|
+
410: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </span><span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">lineNo</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
|
|
822
|
+
411: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
823
|
+
412: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
824
|
+
413: <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>
|
|
825
|
+
414: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
826
|
+
415: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
827
|
+
416: <span class="ruby-identifier">query</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContext</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
828
|
+
417: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">resource</span>
|
|
829
|
+
418: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </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>
|
|
830
|
+
419:
|
|
831
|
+
420: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
832
|
+
421: <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>
|
|
833
|
+
422: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
834
|
+
423: <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>
|
|
835
|
+
424: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
836
|
+
425: <span class="ruby-comment cmt"># Generate line for each resource.</span>
|
|
837
|
+
426: <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>)
|
|
838
|
+
427:
|
|
839
|
+
428: <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>
|
|
840
|
+
429: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
841
|
+
430: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
842
|
+
431: <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>)
|
|
843
|
+
432:
|
|
844
|
+
433: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
845
|
+
434: <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>
|
|
846
|
+
435: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">column</span>.<span class="ruby-identifier">id</span>
|
|
847
|
+
436: <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>)
|
|
848
|
+
437: <span class="ruby-keyword kw">end</span>
|
|
849
|
+
438: <span class="ruby-keyword kw">end</span>
|
|
850
|
+
439:
|
|
851
|
+
440: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">taskList</span>
|
|
852
|
+
441: <span class="ruby-comment cmt"># If we have a taskList we generate nested lines for each of the</span>
|
|
853
|
+
442: <span class="ruby-comment cmt"># tasks that the resource is assigned to and pass the user-defined</span>
|
|
854
|
+
443: <span class="ruby-comment cmt"># filter.</span>
|
|
855
|
+
444: <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>))
|
|
856
|
+
445: <span class="ruby-identifier">assignedTaskList</span> = <span class="ruby-identifier">filterTaskList</span>(<span class="ruby-identifier">taskList</span>, <span class="ruby-identifier">resource</span>,
|
|
857
|
+
446: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'hideTask'</span>),
|
|
858
|
+
447: <span class="ruby-identifier">a</span>(<span class="ruby-value str">'rollupTask'</span>))
|
|
859
|
+
448: <span class="ruby-identifier">assignedTaskList</span>.<span class="ruby-identifier">sort!</span>
|
|
860
|
+
449: <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>)
|
|
861
|
+
450: <span class="ruby-keyword kw">end</span>
|
|
862
|
+
451: <span class="ruby-keyword kw">end</span>
|
|
863
|
+
452: <span class="ruby-identifier">lineNo</span>
|
|
864
|
+
453: <span class="ruby-keyword kw">end</span>
|
|
896
865
|
</pre>
|
|
897
866
|
</div>
|
|
898
867
|
|
|
@@ -900,12 +869,12 @@ resource lines will be within the scope this task line.
|
|
|
900
869
|
</div>
|
|
901
870
|
|
|
902
871
|
|
|
903
|
-
<div id="method-
|
|
904
|
-
<a name="
|
|
872
|
+
<div id="method-M000462" class="method-detail">
|
|
873
|
+
<a name="M000462"></a>
|
|
905
874
|
|
|
906
875
|
<div class="method-heading">
|
|
907
876
|
|
|
908
|
-
<a href="#
|
|
877
|
+
<a href="#M000462" class="method-signature">
|
|
909
878
|
|
|
910
879
|
<span class="method-name">generateTaskList</span><span class="method-args">(taskList, resourceList, scopeLine)</span>
|
|
911
880
|
|
|
@@ -924,59 +893,69 @@ generated task lines will be within the scope this resource line.
|
|
|
924
893
|
</p>
|
|
925
894
|
|
|
926
895
|
<p><a class="source-toggle" href="#"
|
|
927
|
-
onclick="toggleCode('
|
|
928
|
-
<div class="method-source-code" id="
|
|
896
|
+
onclick="toggleCode('M000462-source');return false;">[Source]</a></p>
|
|
897
|
+
<div class="method-source-code" id="M000462-source">
|
|
929
898
|
<pre>
|
|
930
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
899
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 330</span>
|
|
900
|
+
330: <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>)
|
|
901
|
+
331: <span class="ruby-identifier">queryAttrs</span> = { <span class="ruby-value str">'project'</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>,
|
|
902
|
+
332: <span class="ruby-value str">'scopeProperty'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </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>,
|
|
903
|
+
333: <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>),
|
|
904
|
+
334: <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>),
|
|
905
|
+
335: <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>),
|
|
906
|
+
336: <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>),
|
|
907
|
+
337: <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>,
|
|
908
|
+
338: <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>),
|
|
909
|
+
339: <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>) }
|
|
910
|
+
340: <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>)
|
|
911
|
+
341: <span class="ruby-identifier">taskList</span>.<span class="ruby-identifier">sort!</span>
|
|
912
|
+
342:
|
|
913
|
+
343: <span class="ruby-comment cmt"># The primary line counter. Is not used for enclosed lines.</span>
|
|
914
|
+
344: <span class="ruby-identifier">no</span> = <span class="ruby-value">0</span>
|
|
915
|
+
345: <span class="ruby-comment cmt"># The scope line counter. It's reset for each new scope.</span>
|
|
916
|
+
346: <span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </span><span class="ruby-identifier">scopeLine</span>.<span class="ruby-identifier">lineNo</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
|
|
917
|
+
347: <span class="ruby-comment cmt"># Init the variable to get a larger scope</span>
|
|
918
|
+
348: <span class="ruby-identifier">line</span> = <span class="ruby-keyword kw">nil</span>
|
|
919
|
+
349: <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>
|
|
920
|
+
350: <span class="ruby-comment cmt"># Get the current Query from the report context and create a copy. We</span>
|
|
921
|
+
351: <span class="ruby-comment cmt"># are going to modify it.</span>
|
|
922
|
+
352: <span class="ruby-identifier">query</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContext</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">dup</span>
|
|
923
|
+
353: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">property</span> = <span class="ruby-identifier">task</span>
|
|
924
|
+
354: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scopeProperty</span> = <span class="ruby-identifier">scopeLine</span> <span class="ruby-value">? </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>
|
|
925
|
+
355:
|
|
926
|
+
356: <span class="ruby-identifier">no</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
927
|
+
357: <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>
|
|
928
|
+
358: <span class="ruby-identifier">lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
929
|
+
359: <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>
|
|
930
|
+
360: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">scenarioIdx</span> = <span class="ruby-identifier">scenarioIdx</span>
|
|
931
|
+
361: <span class="ruby-comment cmt"># Generate line for each task.</span>
|
|
932
|
+
362: <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>)
|
|
933
|
+
363:
|
|
934
|
+
364: <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>
|
|
935
|
+
365: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">lineNo</span> = <span class="ruby-identifier">lineNo</span>
|
|
936
|
+
366: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">subLineNo</span> = <span class="ruby-ivar">@table</span>.<span class="ruby-identifier">lines</span>
|
|
937
|
+
367: <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>)
|
|
938
|
+
368:
|
|
939
|
+
369: <span class="ruby-comment cmt"># Generate a cell for each column in this line.</span>
|
|
940
|
+
370: <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>
|
|
941
|
+
371: <span class="ruby-identifier">query</span>.<span class="ruby-identifier">attributeId</span> = <span class="ruby-identifier">columnDef</span>.<span class="ruby-identifier">id</span>
|
|
942
|
+
372: <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>)
|
|
943
|
+
373: <span class="ruby-keyword kw">end</span>
|
|
944
|
+
374: <span class="ruby-keyword kw">end</span>
|
|
945
|
+
375:
|
|
946
|
+
376: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resourceList</span>
|
|
947
|
+
377: <span class="ruby-comment cmt"># If we have a resourceList we generate nested lines for each of the</span>
|
|
948
|
+
378: <span class="ruby-comment cmt"># resources that are assigned to this task and pass the user-defined</span>
|
|
949
|
+
379: <span class="ruby-comment cmt"># filter.</span>
|
|
950
|
+
380: <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>))
|
|
951
|
+
381: <span class="ruby-identifier">assignedResourceList</span> = <span class="ruby-identifier">filterResourceList</span>(<span class="ruby-identifier">resourceList</span>, <span class="ruby-identifier">task</span>,
|
|
952
|
+
382: <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>))
|
|
953
|
+
383: <span class="ruby-identifier">assignedResourceList</span>.<span class="ruby-identifier">sort!</span>
|
|
954
|
+
384: <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>)
|
|
955
|
+
385: <span class="ruby-keyword kw">end</span>
|
|
956
|
+
386: <span class="ruby-keyword kw">end</span>
|
|
957
|
+
387: <span class="ruby-identifier">lineNo</span>
|
|
958
|
+
388: <span class="ruby-keyword kw">end</span>
|
|
980
959
|
</pre>
|
|
981
960
|
</div>
|
|
982
961
|
|
|
@@ -984,12 +963,12 @@ generated task lines will be within the scope this resource line.
|
|
|
984
963
|
</div>
|
|
985
964
|
|
|
986
965
|
|
|
987
|
-
<div id="method-
|
|
988
|
-
<a name="
|
|
966
|
+
<div id="method-M000459" class="method-detail">
|
|
967
|
+
<a name="M000459"></a>
|
|
989
968
|
|
|
990
969
|
<div class="method-heading">
|
|
991
970
|
|
|
992
|
-
<a href="#
|
|
971
|
+
<a href="#M000459" class="method-signature">
|
|
993
972
|
|
|
994
973
|
<span class="method-name">setReportPeriod</span><span class="method-args">()</span>
|
|
995
974
|
|
|
@@ -1005,14 +984,14 @@ been changed afterwards.
|
|
|
1005
984
|
</p>
|
|
1006
985
|
|
|
1007
986
|
<p><a class="source-toggle" href="#"
|
|
1008
|
-
onclick="toggleCode('
|
|
1009
|
-
<div class="method-source-code" id="
|
|
987
|
+
onclick="toggleCode('M000459-source');return false;">[Source]</a></p>
|
|
988
|
+
<div class="method-source-code" id="M000459-source">
|
|
1010
989
|
<pre>
|
|
1011
|
-
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
990
|
+
<span class="ruby-comment cmt"># File lib/reports/TableReport.rb, line 199</span>
|
|
991
|
+
199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setReportPeriod</span>
|
|
992
|
+
200: <span class="ruby-ivar">@start</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'start'</span>)
|
|
993
|
+
201: <span class="ruby-ivar">@end</span> = <span class="ruby-identifier">a</span>(<span class="ruby-value str">'end'</span>)
|
|
994
|
+
202: <span class="ruby-keyword kw">end</span>
|
|
1016
995
|
</pre>
|
|
1017
996
|
</div>
|
|
1018
997
|
|