Files
openmct/platform/commonUI/general/res/sass/user-environ/_layout.scss
Pete Richards 04c2eac9ef [Layout] Add view large button for zooming
Fixes #1437
Markup and CSS for `view large` button in frame context;
Sass formatting cleanups; removed unused styles from
_layout.scss; mods to MCTTriggerModal.js to remove
button label functionality;

Added new "icon-expand" glyph and class;

Fixes #1437
Fixes #1423
New overlay > l-dialog and l-large-view classes;
Fix context-menu z-index to allow context menu
to appear in the overlay;
.object-top-bar refactored and replaced with
.object-browse-bar;
frame > hover now only displays local controls for
proper level, handles nested layout situation;
Fixed font-weight display issues;
MCTTriggerModal.js modified to do the following:
- Remove .frame classes when displaying object in overlay
- Allow click on this overlay .blocker to dismiss overlay

Fixed min-width issue incorrectly targeting .object-browse-bar in frame context;

Added expand anim to large view holder;
Changed close button icon

Significant mobile styling and cleanups;
Markup mods for overlay.html;
Handles dialog on top of large view;
Form validation now displays better in mobile;
Updated /src/api/ui/dialog.html to be in-line
with /platform/commonUI/dialog/res/templates/overlay.html;
Moved border-radius from containerBase to btnBase mixins;

Animate with scale for GPU acceleration

Change desktop animation to use scale, so that it is hardware
accelerated and buttery smooth.  Also fixes text anti-aliasing
to improve readability.

Moved mobile/overlay/_overlay.scss styles into
overlay/_overlay.scss; removed mobile/overlay/_overlay.scss;
Cleanups in _overlay.scss; restored max-width/max-height
to dialogs (removed in #1376 for #1298) and added
min-width;

[Frontend] Mobile fixes in overlay and related

Fixes #1437
Added mobile-specific styling to _messages.scss;
Fixed button layout and margins in _overlay.scss;
Fixed message.html to not default to major style
buttons;

[Frontend] Timing tweaks

Fixes #1437
Moved large view expand transition duration
into theme _constants files; shortened anim
duration

Fix Style errors

[mctTriggerModal] correct scope for toggle

Correct scope for toggleFunction such that #1503 no longer occurs.

Fixes #1503

[Style] Add copyright header
2017-05-18 18:18:19 -07:00

394 lines
11 KiB
SCSS

/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
.browse-area,
.edit-area,
.editor {
position: absolute;
}
.editor {
border-radius: $basicCr * 1.5;
}
.contents {
$myM: 0;
box-sizing: border-box;
position: absolute;
top: $myM;
right: $myM;
bottom: $myM;
left: $myM;
&.nomargin {
$myM: 0px;
right: $myM;
bottom: $myM;
left: $myM;
}
}
.user-environ {
.browse-area,
.editor {
top: 0; left: 0; right: 0; bottom: $ueFooterH;
}
.browse-area,
.edit-area {
> .contents {
left: 0;
right: 0;
}
}
.edit-area {
$tbH: $btnToolbarH + $interiorMargin;
top: $bodyMargin + $ueTopBarEditH + ($interiorMargin);
left: $bodyMargin;
right: $bodyMargin;
bottom: $bodyMargin + $ueFooterH;
.tool-bar {
bottom: auto;
height: $tbH;
line-height: $btnToolbarH;
}
.object-holder.work-area {
top: $tbH + $interiorMargin * 2;
overflow: auto;
}
}
.ue-bottom-bar {
@include absPosDefault(0);// New status bar design
top: auto;
height: $ueFooterH;
line-height: $ueFooterH - ($interiorMargin * 2);
background: $colorStatusBarBg;
color: lighten($colorBodyBg, 30%);
font-size: .7rem;
.status-holder {
box-sizing: border-box;
@include absPosDefault($interiorMargin);
@include ellipsize();
right: 120px;
text-transform: uppercase;
z-index: 1;
}
.app-logo {
background-position: right center;
box-sizing: border-box;
@include absPosDefault($interiorMargin - 1);
cursor: pointer;
left: auto; right: $interiorMargin;
width: $ueAppLogoW;
z-index: 2;
}
}
}
.edit-mode {
// Old edit mode
.split-layout {
.split-pane-component.pane.right {
width: 15%;
.pane.bottom {
min-height: 50px;
height: 30%;
}
}
}
}
.pane {
box-sizing: border-box;
position: absolute;
.pane-header {
text-transform: uppercase;
height: $ueTopBarH;
line-height: $ueTopBarH;
}
.t-object.primary-pane {
// Need to lift up this pane to ensure that 'collapsed' panes don't block user interactions
z-index: 4;
}
.mini-tab-icon.toggle-pane {
z-index: 5;
}
}
body.desktop .pane .mini-tab-icon.toggle-pane {
$hi: splitterHandleInset($splitterD, $splitterHandleD);
$paneExpandedOffset: $hi + $splitterHandleD + $uePaneMiniTabW;
top: $bodyMargin + ($ueTopBarH - $uePaneMiniTabH)/2;
&.toggle-tree.anchor-left.collapsed,
&.toggle-inspect.anchor-right:not(.collapsed) {
@extend .icon-arrow-right;
border-bottom-right-radius: $controlCr;
border-top-right-radius: $controlCr;
}
&.toggle-tree.anchor-left:not(.collapsed),
&.toggle-inspect.anchor-right.collapsed {
@extend .icon-arrow-left;
border-bottom-left-radius: $controlCr;
border-top-left-radius: $controlCr;
}
&.toggle-tree.anchor-left {
left: 0;
@include transform(translateX(-1 * $paneExpandedOffset));
&.collapsed {
@include transform(translateX(-1 * $ueCollapsedPaneEdgeM));
}
}
&.toggle-inspect.anchor-right {
right: 0;
@include transform(translateX($paneExpandedOffset));
&.flush-right {
@include transform(translateX(($uePaneMiniTabW + ceil($splitterD / 2))));
}
&.collapsed {
@include transform(translateX($ueCollapsedPaneEdgeM));
}
}
}
.split-layout {
// Specific elements margins
.holder.holder-treeview-elements {
top: $bodyMargin;
right: 0;
bottom: $interiorMargin;
left: $bodyMargin;
.create-button-holder {
&.s-status-editing {
display: none;
& + .search-holder .search-bar {
// .search-holder is adjacent sibling to .create-button-holder
// Add right margin when create button is hidden, to make room for the collapse pane 'x' button
margin-right: $interiorMarginLg * 2;
}
}
}
}
.holder.holder-object-and-inspector {
top: 0;
right: 0;
bottom: 0;
left: 0;
.holder-object {
top: $bodyMargin;
bottom: $interiorMargin;
// Clip element that have min-widths
overflow: hidden;
}
.holder-inspector {
top: $bodyMargin;
bottom: $interiorMargin;
left: $bodyMargin + $interiorMargin;
right: $bodyMargin;
}
.holder-elements {
top: 0;
bottom: $interiorMargin;
left: $bodyMargin;
right: $bodyMargin;
}
}
}
.object-holder {
@include absPosDefault(0, auto);
top: $ueTopBarH + $interiorMarginLg;
}
.l-object-wrapper-inner {
@include trans-prop-nice-resize(0.25s);
}
.object-browse-bar .s-button,
.top-bar .buttons-main .s-button,
.top-bar .s-menu-button,
.tool-bar .s-button,
.tool-bar .s-menu-button {
$h: $btnToolbarH;
height: $h;
line-height: $h;
vertical-align: top;
}
.object-browse-bar {
.l-object-action-buttons {
margin-left: $interiorMarginLg; // Kick the view switcher and other elements away
}
}
/***************************************************** OBJECT BROWSE BAR */
.object-browse-bar {
box-sizing: border-box;
height: $ueTopBarH;
line-height: $ueTopBarH;
white-space: nowrap;
.left {
.l-back {
margin-right: $interiorMarginLg;
&.s-status-editing { display: none; }
}
}
}
// When the tree is hidden, these are the classes used for the left menu and the right representation.
.pane-tree-hidden {
// Sets the left tree menu when the tree is hidden.
.tree-holder,
.splitter-treeview,
.holder-treeview-elements {
opacity: 0;
pointer-events: none;
}
}
.pane-tree-showing {
// Sets the left tree menu when the tree is shown.
.tree-holder,
.splitter-treeview {
@include trans-prop-nice(opacity, $dur: 250ms, $delay: 250ms);
opacity: 1;
}
.holder-treeview-elements {
@include trans-prop-nice(opacity, $dur: 250ms, $delay: 200ms);
}
}
.pane-inspect-showing {
.l-object-and-inspector {
.l-inspect,
.splitter-inspect {
@include trans-prop-nice(opacity, $dur: 250ms, $delay: 250ms);
opacity: 1;
}
}
}
.pane-inspect-hidden {
.l-object-and-inspector {
.l-inspect,
.splitter-inspect {
opacity: 0;
pointer-events: none;
}
}
}
body.desktop {
.holder-all {
min-width: $ueDesktopMinW;
}
.split-layout {
.split-pane-component.pane {
&.treeview.left {
min-width: $ueBrowseLeftPaneTreeMinW;
max-width: $ueBrowseLeftPaneTreeMaxW;
width: $ueBrowseLeftPaneTreeW;
}
&.t-inspect.right {
min-width: $ueBrowseRightPaneInspectMinW;
max-width: $ueBrowseRightPaneInspectMaxW;
width: $ueBrowseRightPaneInspectW;
z-index: 3; // Must lift up beyond primary pane to allow overflow to go underneath
}
}
}
.pane.treeview.left .tree-holder {
padding-right: $interiorMargin;
}
.pane-tree-hidden {
.pane.right.primary-pane { left: $ueCollapsedPaneEdgeM !important; }
}
.pane-inspect-hidden .l-object-and-inspector {
.pane.left { right: $ueCollapsedPaneEdgeM !important; }
}
.pane:not(.resizing) {
@include trans-prop-nice-resize-w(250ms);
}
.pane.primary-pane > .object-browse-bar {
min-width: 200px; // Needed for nice display when primary pane is constrained severely via splitters
}
}
.s-status-editing {
.l-object-wrapper {
$t2Dur: $browseToEditAnimMs;
$t1Dur: $t2Dur / 2;
$pulseDur: $editBorderPulseMs;
$bC0: rgba($colorEditAreaFg, 0.5);
$bC100: rgba($colorEditAreaFg, 1);
background-color: $colorEditAreaBg;
border-radius: $controlCr;
border: 1px dotted $bC0;
// Transition 1
@include keyframes(wrapperIn) {
from { border: 0px dotted transparent; padding: 0; }
to { border: 1px dotted $bC0; padding: 5px; }
}
// Do last
@include keyframes(pulseNew) {
from { border-color: $bC0; }
to { border-color: $bC100; }
}
@include animation-name(wrapperIn, pulseNew);
@include animation-duration($t1Dur, $pulseDur);
@include animation-delay(0s, $t1Dur + $t2Dur);
@include animation-direction(normal, alternate);
@include animation-fill-mode(both, none);
@include animation-iteration-count(1, infinite);
@include animation-timing-function(ease-in-out, linear);
.l-edit-controls {
height: 0;
border-bottom: 1px solid $colorInteriorBorder;
// Transition 2: reveal edit controls
@include keyframes(editIn) {
from { border-bottom: 0px solid transparent; height: 0; margin-bottom: 0; }
to { border-bottom: 1px solid $colorInteriorBorder; height: $ueEditToolBarH + $interiorMargin; margin-bottom: $interiorMargin; }
}
@include animToParams(editIn, $dur: $t2Dur, $delay: $t1Dur);
.tool-bar {
right: $interiorMargin;
}
}
}
}