mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
Review and merge latest topic-core-css (#2183)
* New branch from topic-core-refactor to use as central point for common CSS work - Manually migrated changes from vue-toolbar, expect conflicts there and in vue-layout; * Manually update constants-snow from vue-toolbar branch * Update markup to use latest button classnames - c-menu-button > c-button--menu; - c-icon-button > c-click-icon; * Various from vue-conductor-style - Mods to input styling; - Input[] styles moved to _controls; - New/revised constants vals; * Resolve bizarre merge conflict when applying stash * Code cleanup * Alias and type-icon fixes - More robust approach to alias indicators; - Added alias indication to tree-item.vue; - TODO: wire up alias indication tree-item.vue; * Accessibility mods, convert elements to <button> - Better reset styles for htmlInputReset mixin to allow use of <button> without browser default styling; - Create button; - BrowseBar action buttons; - c-click-icons; - Removed Preview button from BrowseBar.vue; * Add copyright to .scss files; code cleanup * Improved click area and draggable styling for tree-item * Removed injection of domainObject * Removed injection of domainObject * Remove _constants-mobile.scss - Moved used var to _constants; - Normalize mobile detection approach in Layout.vue; * Mobile styling for Time Conductor - WIP! * Mobile styling for Time Conductor - New modalFullScreen mixin; - Datepicker now a fullscreen modal element in body.phone;
This commit is contained in:
committed by
Pete Richards
parent
3c324cbea0
commit
afca6cd2e9
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="c-grid-item__controls">
|
<div class="c-grid-item__controls">
|
||||||
<div class="icon-people" title='Shared'></div>
|
<div class="icon-people" title='Shared'></div>
|
||||||
<div class="c-click-icon icon-info c-info-button" title='More Info'></div>
|
<button class="c-click-icon icon-info c-info-button" title='More Info'></button>
|
||||||
<div class="icon-pointer-right c-pointer-icon"></div>
|
<div class="icon-pointer-right c-pointer-icon"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,22 +63,15 @@
|
|||||||
&__type-icon {
|
&__type-icon {
|
||||||
filter: $colorKeyFilter;
|
filter: $colorKeyFilter;
|
||||||
flex: 0 0 32px;
|
flex: 0 0 32px;
|
||||||
|
font-size: 2em; // Drives the size of the alias indicator when present
|
||||||
margin-right: $interiorMarginLg;
|
margin-right: $interiorMarginLg;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-alias {
|
&.is-alias {
|
||||||
// Object is an alias to an original.
|
// Object is an alias to an original.
|
||||||
[class*='__type-icon'] {
|
[class*='__type-icon'] {
|
||||||
&:before {
|
@include isAlias();
|
||||||
color: $colorIconAliasForKeyFilter;
|
color: $colorIconAliasForKeyFilter;
|
||||||
content: $glyph-icon-link;
|
|
||||||
display: block;
|
|
||||||
font-family: symbolsfont;
|
|
||||||
font-size: 2.5em;
|
|
||||||
position: absolute;
|
|
||||||
text-shadow: rgba(black, 0.5) 0 1px 4px;
|
|
||||||
top: auto; left: 0; bottom: 10px; right: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +136,7 @@
|
|||||||
|
|
||||||
&__type-icon {
|
&__type-icon {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
font-size: 6em; // Drives the size of the alias indicator when present
|
||||||
margin: $interiorMargin 22.5%;
|
margin: $interiorMargin 22.5%;
|
||||||
order: 2;
|
order: 2;
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
@ -189,7 +183,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items: items
|
items: items
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="c-ne__local-controls--hidden">
|
<div class="c-ne__local-controls--hidden">
|
||||||
<a class="c-click-icon icon-trash"
|
<button class="c-click-icon icon-trash"
|
||||||
title="Delete this entry"
|
title="Delete this entry"
|
||||||
v-on:click="deleteEntry"></a>
|
v-on:click="deleteEntry"></button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
@ -20,12 +20,16 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
<template>
|
<template>
|
||||||
<div class="c-ctrl-wrapper c-ctrl-wrapper--menus-up" ref="calendarHolder">
|
<div class="c-ctrl-wrapper c-ctrl-wrapper--menus-up c-datetime-picker__wrapper" ref="calendarHolder">
|
||||||
<a class="c-click-icon icon-calendar"
|
<a class="c-click-icon icon-calendar"
|
||||||
@click="togglePicker()"></a>
|
@click="togglePicker()"></a>
|
||||||
<div class="c-menu c-datetime-picker"
|
<div class="c-menu c-menu--mobile-modal c-datetime-picker"
|
||||||
v-if="showPicker">
|
v-if="showPicker">
|
||||||
<div class="c-datetime-picker__month-year-pager c-pager l-month-year-pager">
|
<div class="c-datetime-picker__close-button">
|
||||||
|
<button class="c-click-icon icon-x-in-circle"
|
||||||
|
@click="togglePicker()"></button>
|
||||||
|
</div>
|
||||||
|
<div class="c-datetime-picker__pager c-pager l-month-year-pager">
|
||||||
<div class="c-pager__prev c-click-icon icon-arrow-left"
|
<div class="c-pager__prev c-click-icon icon-arrow-left"
|
||||||
@click="changeMonth(-1)"></div>
|
@click="changeMonth(-1)"></div>
|
||||||
<div class="c-pager__month-year">{{model.month}} {{model.year}}</div>
|
<div class="c-pager__month-year">{{model.month}} {{model.year}}</div>
|
||||||
@ -60,12 +64,24 @@
|
|||||||
.c-datetime-picker {
|
.c-datetime-picker {
|
||||||
@include userSelectNone();
|
@include userSelectNone();
|
||||||
padding: $interiorMarginLg !important;
|
padding: $interiorMarginLg !important;
|
||||||
display: flex;
|
display: flex !important; // Override .c-menu display: block;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
> * + * {
|
> * + * {
|
||||||
border-top: 1px solid $colorInteriorBorder;
|
|
||||||
margin-top: $interiorMargin;
|
margin-top: $interiorMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__close-button {
|
||||||
|
display: none; // Only show when body.phone, see below.
|
||||||
|
}
|
||||||
|
|
||||||
|
&__pager {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__calendar {
|
||||||
|
border-top: 1px solid $colorInteriorBorder;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-pager {
|
.c-pager {
|
||||||
@ -90,6 +106,7 @@
|
|||||||
grid-template-columns: repeat(7, min-content);
|
grid-template-columns: repeat(7, min-content);
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
grid-gap: 1px;
|
grid-gap: 1px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
$mutedOpacity: 0.7;
|
$mutedOpacity: 0.7;
|
||||||
|
|
||||||
@ -106,6 +123,7 @@
|
|||||||
li {
|
li {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: center !important;
|
||||||
padding: $interiorMargin;
|
padding: $interiorMargin;
|
||||||
|
|
||||||
&.is-in-month {
|
&.is-in-month {
|
||||||
@ -120,6 +138,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************** MOBILE */
|
||||||
|
body.phone {
|
||||||
|
.c-datetime-picker {
|
||||||
|
&.c-menu {
|
||||||
|
@include modalFullScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
&__close-button {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-calendar {
|
||||||
|
grid-template-columns: repeat(7, auto);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
@import "constants";
|
@import "constants";
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/************************** PATHS */
|
/************************** PATHS */
|
||||||
// Paths need to be relative to /platform/commonUI/theme/<theme-name>/css/ directory
|
// Paths need to be relative to /platform/commonUI/theme/<theme-name>/css/ directory
|
||||||
$dirFonts: 'fonts/';
|
$dirFonts: 'fonts/';
|
||||||
@ -27,6 +49,9 @@ $tabularHeaderH: 22px;
|
|||||||
$tabularTdPadLR: $itemPadLR;
|
$tabularTdPadLR: $itemPadLR;
|
||||||
$tabularTdPadTB: 2px;
|
$tabularTdPadTB: 2px;
|
||||||
|
|
||||||
|
/************************** MOBILE */
|
||||||
|
$mobileMenuIconD: 34px; // Used
|
||||||
|
$mobileTreeItemH: 35px; // Used
|
||||||
|
|
||||||
/************************** VISUAL */
|
/************************** VISUAL */
|
||||||
$controlDisabledOpacity: 0.3;
|
$controlDisabledOpacity: 0.3;
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// VERSION MANUALLY MIGRATED FROM VUE-TOOLBAR
|
|
||||||
|
|
||||||
/******************************************************** PLACEHOLDERS */
|
/******************************************************** PLACEHOLDERS */
|
||||||
@mixin cControl() {
|
@mixin cControl() {
|
||||||
$fs: 1em;
|
$fs: 1em;
|
||||||
@ -133,9 +131,12 @@
|
|||||||
|
|
||||||
/********* Buttons */
|
/********* Buttons */
|
||||||
// Optionally can include icon in :before via markup
|
// Optionally can include icon in :before via markup
|
||||||
.c-button,
|
|
||||||
.c-button--menu,
|
|
||||||
button {
|
button {
|
||||||
|
@include htmlInputReset();
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-button,
|
||||||
|
.c-button--menu {
|
||||||
@include cButton();
|
@include cButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/************************** FONTS */
|
/************************** FONTS */
|
||||||
@font-face {
|
@font-face {
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
@mixin glyphBefore($unicode, $family: 'symbolsfont') {
|
@mixin glyphBefore($unicode, $family: 'symbolsfont') {
|
||||||
&:before {
|
&:before {
|
||||||
content: $unicode;
|
content: $unicode;
|
||||||
|
@ -31,6 +31,20 @@
|
|||||||
width: $d;
|
width: $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin isAlias() {
|
||||||
|
&:after {
|
||||||
|
color:$colorIconAlias;
|
||||||
|
content: $glyph-icon-link;
|
||||||
|
display: block;
|
||||||
|
font-family: symbolsfont;
|
||||||
|
position: absolute;
|
||||||
|
text-shadow: rgba(black, 0.5) 0 1px 4px;
|
||||||
|
top: auto; left: 0; bottom: 10%; right: auto;
|
||||||
|
transform-origin: left bottom;
|
||||||
|
transform: scale(0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@mixin bgDiagonalStripes($c: yellow, $a: 0.1, $d: 40px) {
|
@mixin bgDiagonalStripes($c: yellow, $a: 0.1, $d: 40px) {
|
||||||
background-image: linear-gradient(-45deg,
|
background-image: linear-gradient(-45deg,
|
||||||
rgba($c, $a) 25%, transparent 25%,
|
rgba($c, $a) 25%, transparent 25%,
|
||||||
@ -128,6 +142,13 @@
|
|||||||
grid-column: 1 / 3;
|
grid-column: 1 / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin modalFullScreen() {
|
||||||
|
// Optional modifier that makes a c-menu more mobile-friendly
|
||||||
|
position: fixed;
|
||||||
|
border-radius: 0;
|
||||||
|
top: 0; right: 0; bottom: 0; left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/************************** TEXT */
|
/************************** TEXT */
|
||||||
@mixin ellipsize() {
|
@mixin ellipsize() {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -141,20 +162,25 @@
|
|||||||
unicode-bidi:bidi-override;
|
unicode-bidi:bidi-override;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin test($c: #ffcc00, $a: 0.2) {
|
|
||||||
background-color: rgba($c, $a) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************** CONTROLS, BUTTONS */
|
/************************** CONTROLS, BUTTONS */
|
||||||
@mixin input-base() {
|
@mixin htmlInputReset() {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
background: none;
|
||||||
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: $controlCr;
|
border-radius: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
text-align: inherit;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@mixin input-base() {
|
||||||
|
@include htmlInputReset();
|
||||||
|
border-radius: $controlCr;
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
background-color: $colorFormFieldErrorBg;
|
background-color: $colorFormFieldErrorBg;
|
||||||
@ -277,3 +303,7 @@
|
|||||||
cursor: -webkit-grabbing;
|
cursor: -webkit-grabbing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin test($c: deeppink, $a: 0.3) {
|
||||||
|
background-color: rgba($c, $a) !important;
|
||||||
|
}
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/******************************************************** TABLE */
|
/******************************************************** TABLE */
|
||||||
.c-table {
|
.c-table {
|
||||||
// Can be used by any type of table, scrolling, LAD, etc.
|
// Can be used by any type of table, scrolling, LAD, etc.
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
@import "vendor/normalize.min.css";
|
@import "vendor/normalize.min.css";
|
||||||
@import "sass-base.scss";
|
@import "sass-base.scss";
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
//@import "../styles/search/search";
|
//@import "../styles/search/search";
|
||||||
//@import "../styles/mobile/search/search";
|
//@import "../styles/mobile/search/search";
|
||||||
@import "../styles/overlay/overlay";
|
@import "../styles/overlay/overlay";
|
||||||
@import "../styles/tree/tree";
|
//@import "../styles/tree/tree";
|
||||||
@import "../styles/object-label";
|
@import "../styles/object-label";
|
||||||
//@import "../styles/mobile/tree";
|
//@import "../styles/mobile/tree";
|
||||||
@import "../styles/user-environ/frame";
|
@import "../styles/user-environ/frame";
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/*********************************************** NOTEBOOK */
|
/*********************************************** NOTEBOOK */
|
||||||
@import "sass-base.scss";
|
@import "sass-base.scss";
|
||||||
|
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
// Imports only constants, mixins, etc.
|
// Imports only constants, mixins, etc.
|
||||||
// Meant for use as a single line import in Vue SFC's.
|
// Meant for use as a single line import in Vue SFC's.
|
||||||
// Do not include anything that renders to CSS!
|
// Do not include anything that renders to CSS!
|
||||||
@import "constants";
|
@import "constants";
|
||||||
@import "constants-mobile";
|
|
||||||
@import "constants-snow"; // TEMP
|
@import "constants-snow"; // TEMP
|
||||||
@import "mixins";
|
@import "mixins";
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="c-create-button--w">
|
<div class="c-create-button--w">
|
||||||
<div class="c-create-button c-button--menu c-button--major icon-plus"
|
<button class="c-create-button c-button--menu c-button--major icon-plus"
|
||||||
@click="toggleCreateMenu">
|
@click="toggleCreateMenu">
|
||||||
<span class="c-button__label">Create</span>
|
<span class="c-button__label">Create</span>
|
||||||
</div>
|
</button>
|
||||||
<div class="c-create-menu c-super-menu"
|
<div class="c-create-menu c-super-menu"
|
||||||
v-if="showCreateMenu">
|
v-if="showCreateMenu">
|
||||||
<div class="c-super-menu__menu">
|
<div class="c-super-menu__menu">
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
class="l-pane__handle"
|
class="l-pane__handle"
|
||||||
@mousedown="start">
|
@mousedown="start">
|
||||||
</div>
|
</div>
|
||||||
<a v-if="label"
|
<button v-if="label"
|
||||||
class="l-pane__collapse-button"
|
class="l-pane__collapse-button"
|
||||||
@click="toggleCollapse">
|
@click="toggleCollapse">
|
||||||
<span class="l-pane__label">{{ label }}</span>
|
<span class="l-pane__label">{{ label }}</span>
|
||||||
</a>
|
</button>
|
||||||
<div class="l-pane__contents">
|
<div class="l-pane__contents">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
@ -251,8 +251,8 @@
|
|||||||
&[class*="--collapsed"] {
|
&[class*="--collapsed"] {
|
||||||
> .l-pane__collapse-button {
|
> .l-pane__collapse-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0; left: 0;
|
top: 0; right: 0; bottom: 0; left: 0;
|
||||||
height: auto;
|
height: auto; width: 100%;
|
||||||
|
|
||||||
[class*="label"] {
|
[class*="label"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -263,7 +263,7 @@
|
|||||||
&:after {
|
&:after {
|
||||||
background: none;
|
background: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
top: $interiorMarginSm;
|
top: $interiorMargin;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
right: auto;
|
right: auto;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="l-browse-bar">
|
<div class="l-browse-bar">
|
||||||
<div class="l-browse-bar__start">
|
<div class="l-browse-bar__start">
|
||||||
<a class="l-browse-bar__nav-to-parent-button c-click-icon icon-pointer-left"></a>
|
<button class="l-browse-bar__nav-to-parent-button c-click-icon icon-pointer-left"></button>
|
||||||
<div class="l-browse-bar__object-name--w"
|
<div class="l-browse-bar__object-name--w"
|
||||||
:class="type.cssClass">
|
:class="type.cssClass">
|
||||||
<span
|
<span
|
||||||
@ -17,14 +17,14 @@
|
|||||||
<div class="l-browse-bar__end">
|
<div class="l-browse-bar__end">
|
||||||
<div class="l-browse-bar__view-switcher c-ctrl-wrapper c-ctrl-wrapper--menus-left"
|
<div class="l-browse-bar__view-switcher c-ctrl-wrapper c-ctrl-wrapper--menus-left"
|
||||||
v-if="views.length > 1">
|
v-if="views.length > 1">
|
||||||
<div class="c-button--menu"
|
<button class="c-button--menu"
|
||||||
:class="currentView.cssClass"
|
:class="currentView.cssClass"
|
||||||
title="Switch view type"
|
title="Switch view type"
|
||||||
@click="toggleViewMenu">
|
@click="toggleViewMenu">
|
||||||
<span class="c-button__label">
|
<span class="c-button__label">
|
||||||
{{ currentView.name }}
|
{{ currentView.name }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</button>
|
||||||
<div class="c-menu" v-show="showViewMenu">
|
<div class="c-menu" v-show="showViewMenu">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(view, index) in views"
|
<li v-for="(view, index) in views"
|
||||||
@ -39,11 +39,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Action buttons -->
|
<!-- Action buttons -->
|
||||||
<div class="l-browse-bar__actions">
|
<div class="l-browse-bar__actions">
|
||||||
<div class="l-browse-bar__action c-button icon-eye-open" title="Preview"></div>
|
<button class="l-browse-bar__actions__edit c-button icon-notebook" title="New Notebook entry"></button>
|
||||||
<div class="l-browse-bar__action c-button icon-notebook" title="New Notebook entry"></div>
|
<button class="l-browse-bar__actions__notebook-entry c-button c-button--major icon-pencil" title="Edit" v-if="!isEditing" @click="edit()"></button>
|
||||||
<div class="l-browse-bar__action c-button c-button--major icon-pencil" title="Edit" v-if="!isEditing" @click="edit()"></div>
|
<button class="l-browse-bar__actions c-button c-button--major icon-save" title="Save and Finish Editing" v-if="isEditing" @click="saveAndFinishEditing()"></button>
|
||||||
<div class="l-browse-bar__action c-button c-button--major icon-save" title="Save and Finish Editing" v-if="isEditing" @click="saveAndFinishEditing()"></div>
|
<button class="l-browse-bar__actions c-button icon-x" title="Cancel Editing" v-if="isEditing" @click="cancelEditing()"></button>
|
||||||
<div class="l-browse-bar__action c-button icon-x" title="Cancel Editing" v-if="isEditing" @click="cancelEditing()"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
<div class="l-shell__head">
|
<div class="l-shell__head">
|
||||||
<CreateButton class="l-shell__create-button"></CreateButton>
|
<CreateButton class="l-shell__create-button"></CreateButton>
|
||||||
<div class="l-shell__controls">
|
<div class="l-shell__controls">
|
||||||
<a class="c-click-icon icon-new-window" title="Open in a new browser tab"
|
<button class="c-click-icon icon-new-window" title="Open in a new browser tab"
|
||||||
@click="openInNewTab"
|
@click="openInNewTab"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
</a>
|
</button>
|
||||||
<a v-bind:class="['c-click-icon', fullScreen ? 'icon-fullscreen-expand' : 'icon-fullscreen-collapse']"
|
<button v-bind:class="['c-click-icon', fullScreen ? 'icon-fullscreen-expand' : 'icon-fullscreen-collapse']"
|
||||||
v-bind:title="`${fullScreen ? 'Exit' : 'Enable'} full screen mode`"
|
v-bind:title="`${fullScreen ? 'Exit' : 'Enable'} full screen mode`"
|
||||||
@click="fullScreenToggle">
|
@click="fullScreenToggle">
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="l-shell__app-logo">[ App Logo ]</div>
|
<div class="l-shell__app-logo">[ App Logo ]</div>
|
||||||
</div>
|
</div>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include phonePortrait() {
|
body.phone.portrait & {
|
||||||
&__pane-tree {
|
&__pane-tree {
|
||||||
width: calc(100% - #{$mobileMenuIconD});
|
width: calc(100% - #{$mobileMenuIconD});
|
||||||
|
|
||||||
|
@ -21,16 +21,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
|
$aPad: $interiorMarginSm;
|
||||||
border-radius: $controlCr;
|
border-radius: $controlCr;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 5px;
|
padding: $interiorMargin - $aPad;
|
||||||
transition: background 150ms ease;
|
transition: background 150ms ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $colorItemTreeHoverBg;
|
background: $colorItemTreeHoverBg;
|
||||||
.c-tree__item__name:before {
|
.c-tree__item__type-icon {
|
||||||
// Type icon
|
// Type icon
|
||||||
color: $colorItemTreeIconHover;
|
color: $colorItemTreeIconHover;
|
||||||
}
|
}
|
||||||
@ -41,12 +42,39 @@
|
|||||||
margin-right: $interiorMarginSm;
|
margin-right: $interiorMarginSm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__label {
|
||||||
|
// <a> tag that holds type icon and name.
|
||||||
|
// Draggable element.
|
||||||
|
border-radius: $controlCr;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: $aPad;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
|
@include ellipsize();
|
||||||
|
display: inline;
|
||||||
color: $colorItemTreeFg;
|
color: $colorItemTreeFg;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
&:before {
|
}
|
||||||
color: $colorItemTreeIcon;
|
|
||||||
width: $treeTypeIconW;
|
&__type-icon {
|
||||||
|
// Type icon. Must be HTML entity to allow inclusion of alias indicator.
|
||||||
|
display: block;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 1.3em;
|
||||||
|
margin-right: $interiorMarginSm;
|
||||||
|
color: $colorItemTreeIcon;
|
||||||
|
width: $treeTypeIconW;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-alias {
|
||||||
|
// Object is an alias to an original.
|
||||||
|
[class*='__type-icon'] {
|
||||||
|
@include isAlias();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,26 +88,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-object-name {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
// Type icon
|
|
||||||
display: block;
|
|
||||||
flex: 0 0 auto;
|
|
||||||
font-size: 1.3em;
|
|
||||||
margin-right: $interiorMarginSm;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__name {
|
|
||||||
@include ellipsize();
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<li class="c-tree__item-h">
|
<li class="c-tree__item-h">
|
||||||
<div class="c-tree__item">
|
<div class="c-tree__item"
|
||||||
|
:class="{ 'is-alias' : isAlias }">
|
||||||
<view-control class="c-tree__item__view-control"
|
<view-control class="c-tree__item__view-control"
|
||||||
:enabled="hasChildren"
|
:enabled="hasChildren"
|
||||||
:expanded="expanded"
|
:expanded="expanded"
|
||||||
@click="toggleChildren">
|
@click="toggleChildren">
|
||||||
</view-control>
|
</view-control>
|
||||||
<a class="c-tree__item__name c-object-name"
|
<a class="c-tree__item__label"
|
||||||
:class="cssClass"
|
|
||||||
:href="href">
|
:href="href">
|
||||||
<span class="c-object-name__name">{{ node.object.name }}</span>
|
<div class="c-tree__item__type-icon"
|
||||||
|
:class="cssClass"></div>
|
||||||
|
<div class="c-tree__item__name">{{ node.object.name }}</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<ul v-if="expanded" class="c-tree">
|
<ul v-if="expanded" class="c-tree">
|
||||||
@ -36,7 +38,8 @@
|
|||||||
loaded: false,
|
loaded: false,
|
||||||
children: [],
|
children: [],
|
||||||
expanded: false,
|
expanded: false,
|
||||||
cssClass: 'icon-folder'
|
cssClass: 'icon-object-unknown',
|
||||||
|
isAlias: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -52,11 +55,14 @@
|
|||||||
// TODO: should highlight if navigated to.
|
// TODO: should highlight if navigated to.
|
||||||
// TODO: should have context menu.
|
// TODO: should have context menu.
|
||||||
// TODO: should support drag/drop composition
|
// TODO: should support drag/drop composition
|
||||||
|
// TODO: set isAlias per tree-item
|
||||||
|
|
||||||
let type = this.openmct.types.get(this.node.object.type);
|
let type = this.openmct.types.get(this.node.object.type);
|
||||||
if (type) {
|
|
||||||
|
if (type.definition.cssClass) {
|
||||||
this.cssClass = type.definition.cssClass;
|
this.cssClass = type.definition.cssClass;
|
||||||
} else {
|
} else {
|
||||||
console.log("Failed to get typeDef for object", this.node.object.name, this.node.object.type);
|
console.log("Failed to get typeDef.cssClass for object", this.node.object.name, this.node.object.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
let composition = this.openmct.composition.get(this.node.object);
|
let composition = this.openmct.composition.get(this.node.object);
|
||||||
|
Reference in New Issue
Block a user