diff --git a/example/localTimeSystem/src/LocalTimeSystem.js b/example/localTimeSystem/src/LocalTimeSystem.js index f8c2f28f86f..dd62fe15180 100644 --- a/example/localTimeSystem/src/LocalTimeSystem.js +++ b/example/localTimeSystem/src/LocalTimeSystem.js @@ -56,6 +56,10 @@ define([ return this._formats; }; + LocalTimeSystem.prototype.deltaFormat = function () { + return 'duration'; + }; + LocalTimeSystem.prototype.tickSources = function () { return this._tickSources; }; diff --git a/platform/features/conductor-v2/conductor/bundle.js b/platform/features/conductor-v2/conductor/bundle.js index 0cd433793d5..a6ab69b5818 100644 --- a/platform/features/conductor-v2/conductor/bundle.js +++ b/platform/features/conductor-v2/conductor/bundle.js @@ -24,6 +24,7 @@ define([ "./src/ui/TimeConductorService", "./src/ui/TimeConductorController", "./src/ui/MCTConductorAxis", + "./src/ui/NumberFormat", "text!./res/templates/time-conductor.html", "text!./res/templates/mode-selector/mode-selector.html", "text!./res/templates/mode-selector/mode-menu.html", @@ -32,6 +33,7 @@ define([ TimeConductorService, TimeConductorController, MCTConductorAxis, + NumberFormat, timeConductorTemplate, modeSelectorTemplate, modeMenuTemplate, @@ -99,6 +101,12 @@ define([ "key": "mode-menu", "template": modeMenuTemplate } + ], + "formats": [ + { + "key": "number", + "implementation": NumberFormat + } ] } }); diff --git a/platform/features/conductor-v2/conductor/res/templates/time-conductor.html b/platform/features/conductor-v2/conductor/res/templates/time-conductor.html index e044c6e8c04..5496844fa33 100644 --- a/platform/features/conductor-v2/conductor/res/templates/time-conductor.html +++ b/platform/features/conductor-v2/conductor/res/templates/time-conductor.html @@ -31,7 +31,7 @@ - 0; + return !isNaN(startDelta) && startDelta > 0; }; TimeConductorValidation.prototype.validateEndDelta = function (endDelta) { - return endDelta >= 0; + return !isNaN(endDelta) && endDelta >= 0; }; /** @@ -68,10 +68,10 @@ define( * @param formModel * @returns {*} */ - TimeConductorValidation.prototype.validateDeltas = function (formModel) { + TimeConductorValidation.prototype.validateDeltas = function (startDelta, endDelta) { // Validate that start Delta is some non-zero value, and that end // delta is zero or positive (ie. 'now' or some time in the future). - return this.validateStartDelta(formModel.startDelta) && this.validateEndDelta(formModel.endDelta); + return this.validateStartDelta(startDelta) && this.validateEndDelta(endDelta); }; return TimeConductorValidation; diff --git a/platform/features/conductor-v2/utcTimeSystem/src/UTCTimeSystem.js b/platform/features/conductor-v2/utcTimeSystem/src/UTCTimeSystem.js index 7f92c841919..a968f1ca113 100644 --- a/platform/features/conductor-v2/utcTimeSystem/src/UTCTimeSystem.js +++ b/platform/features/conductor-v2/utcTimeSystem/src/UTCTimeSystem.js @@ -56,6 +56,10 @@ define([ return this._formats; }; + UTCTimeSystem.prototype.deltaFormat = function () { + return 'duration'; + }; + UTCTimeSystem.prototype.tickSources = function () { return this._tickSources; }; diff --git a/platform/forms/res/templates/controls/textfield.html b/platform/forms/res/templates/controls/textfield.html index 5afb3b28335..d79e1dd31a8 100644 --- a/platform/forms/res/templates/controls/textfield.html +++ b/platform/forms/res/templates/controls/textfield.html @@ -24,6 +24,7 @@