From c5b786e5e0c003a7b5d398ff43cf81859c721ba9 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 23 Oct 2015 13:52:48 -0700 Subject: [PATCH] [Timeline] De-namespace capabilities WTD-1239. --- .../src/capabilities/ActivityTimespanCapability.js | 6 +++--- .../features/timeline/src/capabilities/CostCapability.js | 6 +++--- .../features/timeline/src/capabilities/GraphCapability.js | 8 ++++---- .../src/capabilities/TimelineTimespanCapability.js | 4 ++-- .../timeline/src/capabilities/UtilizationCapability.js | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/platform/features/timeline/src/capabilities/ActivityTimespanCapability.js b/platform/features/timeline/src/capabilities/ActivityTimespanCapability.js index f4927a10dd..a318212cd0 100644 --- a/platform/features/timeline/src/capabilities/ActivityTimespanCapability.js +++ b/platform/features/timeline/src/capabilities/ActivityTimespanCapability.js @@ -6,7 +6,7 @@ define( 'use strict'; /** - * Implements the `warp.timespan` capability for Activity objects. + * Implements the `timespan` capability for Activity objects. * * @constructor * @param $q Angular's $q, for promise-handling @@ -33,10 +33,10 @@ define( // Only applies to timeline objects ActivityTimespanCapability.appliesTo = function (model) { - return model && (model.type === 'warp.activity'); + return model && (model.type === 'activity'); }; return ActivityTimespanCapability; } -); \ No newline at end of file +); diff --git a/platform/features/timeline/src/capabilities/CostCapability.js b/platform/features/timeline/src/capabilities/CostCapability.js index 56d2dafaa7..e1409e9ff2 100644 --- a/platform/features/timeline/src/capabilities/CostCapability.js +++ b/platform/features/timeline/src/capabilities/CostCapability.js @@ -17,7 +17,7 @@ define( * Get a list of resource types which have associated * costs for this object. Returned values are machine-readable * keys, and should be paired with external metadata for - * presentation (see category of extension `warp.resources`). + * presentation (see category of extension `resources`). * @returns {string[]} resource types */ resources: function () { @@ -48,9 +48,9 @@ define( // Only applies to subsystem modes. CostCapability.appliesTo = function (model) { - return (model || {}).type === 'warp.mode'; + return (model || {}).type === 'mode'; }; return CostCapability; } -); \ No newline at end of file +); diff --git a/platform/features/timeline/src/capabilities/GraphCapability.js b/platform/features/timeline/src/capabilities/GraphCapability.js index fb59272678..ce3fb03cfa 100644 --- a/platform/features/timeline/src/capabilities/GraphCapability.js +++ b/platform/features/timeline/src/capabilities/GraphCapability.js @@ -33,7 +33,7 @@ define( }); // Add battery state of charge - if (domainObject.getModel().type === 'warp.timeline' && + if (domainObject.getModel().type === 'timeline' && result.power && domainObject.getModel().capacity > 0) { @@ -68,11 +68,11 @@ define( // Only applies to timeline objects GraphCapability.appliesTo = function (model) { return model && - ((model.type === 'warp.timeline') || - (model.type === 'warp.activity')); + ((model.type === 'timeline') || + (model.type === 'activity')); }; return GraphCapability; } -); \ No newline at end of file +); diff --git a/platform/features/timeline/src/capabilities/TimelineTimespanCapability.js b/platform/features/timeline/src/capabilities/TimelineTimespanCapability.js index 30ca28b873..9e0b99df45 100644 --- a/platform/features/timeline/src/capabilities/TimelineTimespanCapability.js +++ b/platform/features/timeline/src/capabilities/TimelineTimespanCapability.js @@ -59,10 +59,10 @@ define( // Only applies to timeline objects TimelineTimespanCapability.appliesTo = function (model) { - return model && (model.type === 'warp.timeline'); + return model && (model.type === 'timeline'); }; return TimelineTimespanCapability; } -); \ No newline at end of file +); diff --git a/platform/features/timeline/src/capabilities/UtilizationCapability.js b/platform/features/timeline/src/capabilities/UtilizationCapability.js index 4add7de939..e9679c9830 100644 --- a/platform/features/timeline/src/capabilities/UtilizationCapability.js +++ b/platform/features/timeline/src/capabilities/UtilizationCapability.js @@ -189,10 +189,10 @@ define( // Only applies to timelines and activities UtilizationCapability.appliesTo = function (model) { return model && - ((model.type === 'warp.timeline') || - (model.type === 'warp.activity')); + ((model.type === 'timeline') || + (model.type === 'activity')); }; return UtilizationCapability; } -); \ No newline at end of file +);