From 86b51f6cde0d47d1d5eae9180fb8677ec907e5ac Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Mon, 17 Oct 2016 17:19:50 -0700 Subject: [PATCH] [Frontend] Small refactor for mct-include Fixes #933 Fixes #1193 Markup and CSS tweaked to support using mct-include as the main container for the TOI element; TC, plots and tables all updated. --- .../conductor/res/sass/_time-of-interest.scss | 86 +++++++++---------- .../res/templates/time-conductor.html | 7 +- .../res/templates/time-of-interest.html | 5 +- .../features/plot/res/templates/plot.html | 9 +- .../table/res/templates/mct-table.html | 5 +- 5 files changed, 57 insertions(+), 55 deletions(-) diff --git a/platform/features/conductor-v2/conductor/res/sass/_time-of-interest.scss b/platform/features/conductor-v2/conductor/res/sass/_time-of-interest.scss index 7a59cd8545c..17c2855f359 100644 --- a/platform/features/conductor-v2/conductor/res/sass/_time-of-interest.scss +++ b/platform/features/conductor-v2/conductor/res/sass/_time-of-interest.scss @@ -20,14 +20,14 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -.l-toi-holder, +mct-include.l-toi-holder, .l-toi-holder:after, .l-toi-holder:before { display: block; position: absolute; } -.l-toi-holder { +mct-include.l-toi-holder { $blockerFadeW: $toiBlockerFadeW; @include transform(translateX(-50%)); color: $toiColorBg; @@ -36,12 +36,11 @@ bottom: 0; width: $toiH; &:not(.pinned) { - opacity: 0; - pointer-events: none; + display: none; } &.pinned { - opacity: 1; + display: block; } &:before, @@ -138,61 +137,62 @@ .l-toi-val { display: none; // Hide by default; see .show-val below } -} - -// TOI is showing value as well -.show-val .l-toi-holder { - .l-toi { - .l-toi-buttons { - order: 1; - &:hover { - margin-right: $interiorMarginSm; - } - } - .l-toi-val { - @include trans-prop-nice($props: opacity, $dur: 150ms); - background-color: $toiColorBg; - border-radius: $controlCr; - box-sizing: content-box; - color: $toiColorFg; - display: inline-block; - font-size: 0.7rem; - font-weight: 400; - height: $toiH; - line-height: $toiH; - order: 2; - padding: 1px 3px; - white-space: nowrap; - } - } - &.val-to-left { + // TOI is showing value as well + &.show-val { .l-toi { - left: auto; - right: $toiPad * -2; - .l-toi-buttons { - order: 2; + order: 1; &:hover { - .t-button-resync { order: 2; } - .t-button-unpin { order: 1; } - margin-left: $interiorMarginSm; + margin-right: $interiorMarginSm; } } - .l-toi-val { - order: 1; + @include trans-prop-nice($props: opacity, $dur: 150ms); + background-color: $toiColorBg; + border-radius: $controlCr; + box-sizing: content-box; + color: $toiColorFg; + display: inline-block; + font-size: 0.7rem; + font-weight: 400; + height: $toiH; + line-height: $toiH; + order: 2; + padding: 1px 3px; + white-space: nowrap; + } + } + + &.val-to-left { + .l-toi { + left: auto; + right: $toiPad * -2; + + .l-toi-buttons { + order: 2; + &:hover { + .t-button-resync { order: 2; } + .t-button-unpin { order: 1; } + margin-left: $interiorMarginSm; + } + } + + .l-toi-val { + order: 1; + } } } } } + // TOI in tables .tabular, table { tbody, .tbody { tr, .tr { - &.l-toi-tablerow.pinned { + &.l-toi-tablerow { border-top: 1px dashed $toiColorBg; z-index: 1; td, .td { 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 8b02990e4af..d3c3427a06a 100644 --- a/platform/features/conductor-v2/conductor/res/templates/time-conductor.html +++ b/platform/features/conductor-v2/conductor/res/templates/time-conductor.html @@ -89,9 +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 dac8904da2b..6335b7a1039 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,5 @@ -
+