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

View File

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

View File

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

View File

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

View File

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