[Timeline] Fix imports, dependencies

Fix imports and dependencies needed by Export Timeline as CSV
This commit is contained in:
Victor Woeltjen
2016-02-08 17:42:26 -08:00
parent a444fc01ad
commit b42ccebd5a
5 changed files with 25 additions and 8 deletions

View File

@@ -22,6 +22,7 @@
/*global define*/ /*global define*/
define([ define([
"./src/actions/ExportTimelineAsCSVAction",
"./src/controllers/TimelineController", "./src/controllers/TimelineController",
"./src/controllers/TimelineGraphController", "./src/controllers/TimelineGraphController",
"./src/controllers/TimelineDateTimeController", "./src/controllers/TimelineDateTimeController",
@@ -40,6 +41,7 @@ define([
"./src/services/ObjectLoader", "./src/services/ObjectLoader",
'legacyRegistry' 'legacyRegistry'
], function ( ], function (
ExportTimelineAsCSVAction,
TimelineController, TimelineController,
TimelineGraphController, TimelineGraphController,
TimelineDateTimeController, TimelineDateTimeController,
@@ -65,6 +67,15 @@ define([
"description": "Resources, templates, CSS, and code for Timelines.", "description": "Resources, templates, CSS, and code for Timelines.",
"resources": "res", "resources": "res",
"extensions": { "extensions": {
"actions": [
{
"key": "timeline.export",
"name": "Export Timeline as CSV",
"category": "contextual",
"implementation": ExportTimelineAsCSVAction,
"depends": [ "exportService" ]
}
],
"constants": [ "constants": [
{ {
"key": "TIMELINE_MINIMUM_DURATION", "key": "TIMELINE_MINIMUM_DURATION",

View File

@@ -24,13 +24,17 @@
define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) { define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) {
'use strict'; 'use strict';
function ExportTimelineAsCSVAction(taskService, context) { function ExportTimelineAsCSVAction(exportService, context) {
this.task = new ExportTimelineAsCSVTask(context.domainObject); this.task = new ExportTimelineAsCSVTask(
this.taskService = taskService; exportService,
context.domainObject
);
//this.taskService = taskService;
} }
ExportTimelineAsCSVAction.prototype.perform = function () { ExportTimelineAsCSVAction.prototype.perform = function () {
return this.taskService.run(this.task); return this.task.run();
//return this.taskService.run(this.task);
}; };
ExportTimelineAsCSVAction.appliesTo = function (context) { ExportTimelineAsCSVAction.appliesTo = function (context) {

View File

@@ -25,7 +25,8 @@
* Module defining ExportTimelineAsCSVTask. Created by vwoeltje on 2/8/16. * Module defining ExportTimelineAsCSVTask. Created by vwoeltje on 2/8/16.
*/ */
define([ define([
"TimelineTraverser" "./TimelineTraverser",
"./TimelineCSVExporter"
], function (TimelineTraverser, TimelineCSVExporter) { ], function (TimelineTraverser, TimelineCSVExporter) {
"use strict"; "use strict";

View File

@@ -22,9 +22,9 @@
/*global define,Promise*/ /*global define,Promise*/
define([ define([
"ModeColumn", "./ModeColumn",
"CompositionColumn", "./CompositionColumn",
"MetadataColumn" "./MetadataColumn"
], function (ModeColumn, CompositionColumn, MetadataColumn) { ], function (ModeColumn, CompositionColumn, MetadataColumn) {
'use strict'; 'use strict';

View File

@@ -22,6 +22,7 @@
/*global define,Promise*/ /*global define,Promise*/
define([], function () { define([], function () {
"use strict";
function TimelineTraverser(domainObject) { function TimelineTraverser(domainObject) {
this.domainObject = domainObject; this.domainObject = domainObject;