From 55603b927f425114c87811e292d5050feb970316 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Thu, 1 Sep 2016 19:37:36 -0700 Subject: [PATCH] [Frontend] Generalized markup and CSS for control-bar Fixes #1166 New markup and CSS MIgrated existing tabular views to use new styles --- .../commonUI/general/res/sass/_views.scss | 40 +++++++++++++++++++ .../general/res/sass/lists/_tabular.scss | 36 ----------------- .../table/res/templates/historical-table.html | 2 +- .../table/res/templates/mct-table.html | 12 +++--- .../table/res/templates/rt-table.html | 2 +- 5 files changed, 49 insertions(+), 43 deletions(-) diff --git a/platform/commonUI/general/res/sass/_views.scss b/platform/commonUI/general/res/sass/_views.scss index 96c78f1dd2..2400d540be 100644 --- a/platform/commonUI/general/res/sass/_views.scss +++ b/platform/commonUI/general/res/sass/_views.scss @@ -1,4 +1,12 @@ /* Styles for sub-dividing views generically */ +$cbH: 25px; + +.l-control-bar { + // Element that can be placed above l-view-section + height: $cbH; + +} + .l-view-section { @include absPosDefault(0); @@ -15,4 +23,36 @@ .inline-block { display: inline-block; } +} + +.has-control-bar { + .l-view-section { + top: $cbH + $interiorMargin; + } +} + + +.child-frame { + .has-control-bar { + $btnExportH: $btnFrameH; + .l-control-bar { + @include trans-prop-nice(opacity, $dur: 50ms); + opacity: 0; + } + .l-view-section { + @include trans-prop-nice(top, $dur: 150ms, $delay: 50ms); + top: 0; + } + &:hover { + .l-control-bar { + @include trans-prop-nice(opacity, 150ms, 100ms); + opacity: 1; + } + .l-view-section { + @include trans-prop-nice(top, $dur: 150ms); + top: $btnExportH + $interiorMargin; + } + } + } + } \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/lists/_tabular.scss b/platform/commonUI/general/res/sass/lists/_tabular.scss index 5671fe178d..d68486547e 100644 --- a/platform/commonUI/general/res/sass/lists/_tabular.scss +++ b/platform/commonUI/general/res/sass/lists/_tabular.scss @@ -160,39 +160,3 @@ table { } } } - -/********************************************************** SPECIFIC TABULAR VIEWS */ -.tabular-holder { - &.t-exportable { - $btnExportH: 25px; - .l-view-section { - top: $btnExportH + $interiorMargin; - } - } -} - -.child-frame { - .tabular-holder { - &.t-exportable { - $btnExportH: $btnFrameH; - .s-button.t-export { - @include trans-prop-nice(opacity, $dur: 50ms); - opacity: 0; - } - .l-view-section { - @include trans-prop-nice(top, $dur: 150ms, $delay: 50ms); - top: 0; - } - &:hover { - .s-button.t-export { - @include trans-prop-nice(opacity, 150ms, 100ms); - opacity: 1; - } - .l-view-section { - @include trans-prop-nice(top, $dur: 150ms); - top: $btnExportH + $interiorMargin; - } - } - } - } -} \ No newline at end of file diff --git a/platform/features/table/res/templates/historical-table.html b/platform/features/table/res/templates/historical-table.html index e2cd91b0db..d306601daf 100644 --- a/platform/features/table/res/templates/historical-table.html +++ b/platform/features/table/res/templates/historical-table.html @@ -4,6 +4,6 @@ rows="rows" enableFilter="true" enableSort="true" - class="tabular-holder t-exportable"> + class="tabular-holder has-control-bar"> \ No newline at end of file diff --git a/platform/features/table/res/templates/mct-table.html b/platform/features/table/res/templates/mct-table.html index 6d96b17afd..ac06f53e28 100644 --- a/platform/features/table/res/templates/mct-table.html +++ b/platform/features/table/res/templates/mct-table.html @@ -1,8 +1,10 @@ - - Export - +
+ + Export + +
diff --git a/platform/features/table/res/templates/rt-table.html b/platform/features/table/res/templates/rt-table.html index c6fb0d2422..573eeb89f6 100644 --- a/platform/features/table/res/templates/rt-table.html +++ b/platform/features/table/res/templates/rt-table.html @@ -4,7 +4,7 @@ rows="rows" enableFilter="true" enableSort="true" - class="tabular-holder t-exportable" + class="tabular-holder has-control-bar" auto-scroll="true"> \ No newline at end of file