From 7a09bc133906b278bb2fa341ab8ae8713af42474 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 17 Oct 2016 10:11:59 -0700 Subject: [PATCH] Migrated TOI functionality to common controller --- .../features/conductor-v2/conductor/bundle.js | 11 ++++++++++ .../res/templates/time-conductor.html | 5 ++++- .../res/templates/time-of-interest.html | 4 ++-- .../src/ui/ConductorTOIController.js | 21 +----------------- .../src/ui/TimeOfInterestController.js | 22 ++++++++++++++----- .../features/plot/res/templates/plot.html | 4 +++- 6 files changed, 38 insertions(+), 29 deletions(-) diff --git a/platform/features/conductor-v2/conductor/bundle.js b/platform/features/conductor-v2/conductor/bundle.js index ff94ca0f9b9..c15423f9c73 100644 --- a/platform/features/conductor-v2/conductor/bundle.js +++ b/platform/features/conductor-v2/conductor/bundle.js @@ -26,6 +26,7 @@ define([ "./src/TimeConductor", "./src/ui/ConductorAxisController", "./src/ui/ConductorTOIController", + "./src/ui/TimeOfInterestController", "./src/ui/MctConductorAxis", "./src/ui/NumberFormat", "text!./res/templates/time-conductor.html", @@ -39,6 +40,7 @@ define([ TimeConductor, ConductorAxisController, ConductorTOIController, + TimeOfInterestController, MCTConductorAxis, NumberFormat, timeConductorTemplate, @@ -95,6 +97,15 @@ define([ "timeConductorViewService", "formatService" ] + }, + { + "key": "TimeOfInterestController", + "implementation": TimeOfInterestController, + "depends": [ + "$scope", + "timeConductor", + "formatService" + ] } ], "directives": [ 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 6fb06dffcd3..f338a6adbda 100644 --- a/platform/features/conductor-v2/conductor/res/templates/time-conductor.html +++ b/platform/features/conductor-v2/conductor/res/templates/time-conductor.html @@ -89,7 +89,10 @@ ng-click="toi.click($event)">
- +
+ +
diff --git a/platform/features/conductor-v2/conductor/res/templates/time-of-interest.html b/platform/features/conductor-v2/conductor/res/templates/time-of-interest.html index 134e48d8349..dac8904da2b 100644 --- a/platform/features/conductor-v2/conductor/res/templates/time-of-interest.html +++ b/platform/features/conductor-v2/conductor/res/templates/time-of-interest.html @@ -1,6 +1,6 @@
+ ng-controller="TimeOfInterestController as toi" + ng-class="{ 'pinned': pinned, 'val-to-left': toi.left > 80 }">