Skip to content

Commit

Permalink
[Frontend] Styling for TOI element
Browse files Browse the repository at this point in the history
Fixes #933
Fixes #1193
Tabular styling for TOI;
  • Loading branch information
charlesh88 committed Oct 4, 2016
1 parent 1650aae commit 0ed0a48
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 48 deletions.
57 changes: 17 additions & 40 deletions platform/commonUI/general/res/sass/controls/_time-of-interest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/


/*
Plots
-toi-holder:before vertical line
-toi: glyphs
Tables
tr: border color
td:before: glyphs
TC
-toi-holder:before, after: vertical lines
-toi: glyphs
*/
.l-toi-holder,
.l-toi-holder:after,
.l-toi-holder:before,
Expand All @@ -44,22 +29,23 @@ TC
position: absolute;
}


.l-toi-holder {
$p: 3px;
@include transform(translateX(-50%));
color: $toiColorBg;
position: absolute;
top: 0;
bottom: 0;
width: $toiW; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
width: $toiW;
&:not(.pinned) {
opacity: 0;
pointer-events: none;
}

&.pinned {
opacity: 1;
}

&:before,
&:after {
// Vertical lines. TC uses both; plot only uses :before
Expand All @@ -73,6 +59,7 @@ TC
bottom: 0;
width: 2px;
}

.l-toi {
// Holds clock icon an unpin button
font-size: $toiW;
Expand All @@ -91,12 +78,13 @@ TC

.l-toi-val {
$tbP: 1px;
background-color: $toiColorBg; //rgba($toiColorBg, 0.8);
background-color: $toiColorBg;
border-radius: $controlCr;
box-sizing: content-box;
display: inline-block;
color: $toiColorFg;
font-size: 0.7rem;
font-weight: 400;
height: $toiW;
right: $toiW + $interiorMarginSm;
top: 50%;
Expand All @@ -120,40 +108,30 @@ table {
tbody, .tbody {
tr, .tr {
&.l-toi.pinned {
td {
border-top: 1px dashed $toiColorBg;
border-top: 1px dashed $toiColorBg;
td, .td {
&:first-child:before {
@extend .ui-symbol;
@extend .icon-clock;
@include transform(translate(-50%, -50%));
content: $glyph-icon-clock;
color: $toiColorBg;
cursor: pointer;
display: block;
position: absolute;
text-shadow: 0 1px 15px black;
left: 50%;
bottom: auto;
text-shadow: 0 1px 15px black;
top: 0;
z-index: 2;
color: $toiColorBg;
}
}

&.highlight-bottom-edge {
td {
border-bottom: 1px dashed $toiColorBg;
//border-top: 1px solid transparent;
&:hover {
td, .td {
&:first-child:before {
@include transform(translate(-50%, 50%));
top: auto;
bottom: 0;
content: $glyph-icon-x-in-circle !important;
}
}
}

&:hover {
td:first-child:before {
content: $glyph-icon-x-in-circle;
cursor: pointer;
}
}
}
}
}
Expand All @@ -164,6 +142,7 @@ table {
.gl-plot-wrapper-display-area-and-x-axis {
.l-toi-holder {
bottom: nth($plotDisplayArea, 3) - $interiorMargin;
z-index: 3;
&:after {
display: none;
}
Expand All @@ -172,8 +151,6 @@ table {
@include transform(translateY(100%));
bottom: 0;
}

z-index: 3;
}
}
}
2 changes: 1 addition & 1 deletion platform/commonUI/general/res/sass/lists/_tabular.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ table {
}*/
}
tr, .tr {
border-top: 1px solid $colorTabBorder;
display: table-row;
&:first-child .td {
border-top: none;
Expand Down Expand Up @@ -99,7 +100,6 @@ table {
}
}
td, .td {
border-top: 1px solid $colorTabBorder;
min-width: 20px;
color: $colorTelemFresh;
padding: $tabularTdPadTB $tabularTdPadLR;
Expand Down
4 changes: 2 additions & 2 deletions platform/commonUI/themes/espresso/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ $colorInspectorSectionHeaderBg: $colorFormSectionHeader;
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);

// Time of Interest
$toiColorBg: #6b93c6; //$colorBtnMajorBg;
$toiColorBg: #6b93c6;
$toiColorFg: #000;
$toiW: 12px;
$toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line

// Status colors, mainly used for messaging and item ancillary symbols
$colorStatusFg: #ccc;
Expand Down
2 changes: 1 addition & 1 deletion platform/commonUI/themes/snow/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
// Time of Interest
$toiColorBg: #6b93c6;
$toiColorFg: #fff;
$toiW: 12px;
$toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line

// Status colors, mainly used for messaging and item ancillary symbols
$colorStatusFg: #fff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@
left: nth($timeCondAxisLROffset, 1);
right: nth($timeCondAxisLROffset, 2);
&:hover {
// Hide the cursor, because the TOI element essentially "becomes" the cursor
// when the user is hovering over the visualization area.
cursor: none;
.l-toi-holder.hover {
opacity: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion platform/features/table/res/templates/mct-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</thead>
<tbody>
<tr ng-repeat="visibleRow in visibleRows track by visibleRow.rowIndex"
ng-class="{ 'l-toi active pinned': false }"
ng-class="{ 'l-toi pinned': false }"
ng-style="{
top: visibleRow.offsetY + 'px',
}">
Expand Down

0 comments on commit 0ed0a48

Please sign in to comment.