[Timeline] De-namespace capabilities

WTD-1239.
This commit is contained in:
Victor Woeltjen 2015-10-23 13:52:48 -07:00
parent 3e0534c4c3
commit c5b786e5e0
5 changed files with 15 additions and 15 deletions

View File

@ -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,7 +33,7 @@ define(
// Only applies to timeline objects
ActivityTimespanCapability.appliesTo = function (model) {
return model && (model.type === 'warp.activity');
return model && (model.type === 'activity');
};
return ActivityTimespanCapability;

View File

@ -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,7 +48,7 @@ define(
// Only applies to subsystem modes.
CostCapability.appliesTo = function (model) {
return (model || {}).type === 'warp.mode';
return (model || {}).type === 'mode';
};
return CostCapability;

View File

@ -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,8 +68,8 @@ 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;

View File

@ -59,7 +59,7 @@ define(
// Only applies to timeline objects
TimelineTimespanCapability.appliesTo = function (model) {
return model && (model.type === 'warp.timeline');
return model && (model.type === 'timeline');
};
return TimelineTimespanCapability;

View File

@ -189,8 +189,8 @@ 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;