mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 00:45:41 +00:00
[Search] Added css classes
Added classes to the HTML so that CSS and Sass could get access to style the searchbar items. The structure for styling is now mostly set up.
This commit is contained in:
parent
bcc1e2e26f
commit
ff3770c9ee
@ -675,7 +675,7 @@ mct-container {
|
||||
.split-layout.vertical > .pane:first-child .holder {
|
||||
right: 3px; }
|
||||
|
||||
/* line 286, ../sass/user-environ/_layout.scss */
|
||||
/* line 284, ../sass/user-environ/_layout.scss */
|
||||
.vscroll {
|
||||
overflow-y: auto; }
|
||||
|
||||
|
@ -249,3 +249,37 @@ ul.tree {
|
||||
/* line 154, ../sass/tree/_tree.scss */
|
||||
ul.tree ul.tree {
|
||||
margin-left: 15px; }
|
||||
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web 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 Web 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.
|
||||
*****************************************************************************/
|
||||
/* line 23, ../sass/search/_search.scss */
|
||||
span.searchbar {
|
||||
color: #ff0099; }
|
||||
/* line 26, ../sass/search/_search.scss */
|
||||
span.searchbar .results {
|
||||
color: #ff0000; }
|
||||
/* line 31, ../sass/search/_search.scss */
|
||||
span.searchbar .results .searchbar-item {
|
||||
color: #aa00ff; }
|
||||
/* line 34, ../sass/search/_search.scss */
|
||||
span.searchbar .results .searchbar-item .label {
|
||||
color: #00aa00; }
|
||||
|
@ -20,137 +20,20 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
ul.searchbar {
|
||||
@include menuUlReset();
|
||||
li {
|
||||
display: block;
|
||||
position: relative;
|
||||
span.searchbar-item {
|
||||
$runningItemW: 0;
|
||||
@include border-radius($basicCr);
|
||||
@include single-transition(background-color, 0.25s);
|
||||
display: block;
|
||||
font-size: 0.8em;
|
||||
height: $menuLineH;
|
||||
line-height: $menuLineH;
|
||||
margin-bottom: $interiorMarginSm;
|
||||
position: relative;
|
||||
/*
|
||||
.view-control {
|
||||
display: inline-block;
|
||||
margin-left: $interiorMargin;
|
||||
font-size: 0.75em;
|
||||
width: $treeVCW;
|
||||
$runningItemW: $interiorMargin + $treeVCW;
|
||||
&:hover {
|
||||
color: $colorItemTreeVCHover;
|
||||
}
|
||||
}
|
||||
*/
|
||||
span.searchbar {
|
||||
color: #ff0099;
|
||||
//@include menuUlReset();
|
||||
.results {
|
||||
//display: block;
|
||||
//position: relative;
|
||||
color: #ff0000;
|
||||
|
||||
.searchbar-item {
|
||||
color: #aa00ff;
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
@include absPosDefault();
|
||||
left: $runningItemW;
|
||||
|
||||
.type-icon {
|
||||
@include absPosDefault(0, false);
|
||||
@include txtShdwSubtle(0.6);
|
||||
color: $colorItemTreeIcon;
|
||||
left: $interiorMargin;
|
||||
right: auto; width: 1em;
|
||||
|
||||
.icon {
|
||||
&.l-icon-link,
|
||||
&.l-icon-alert {
|
||||
@include txtShdwSubtle(1);
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
}
|
||||
&.l-icon-alert {
|
||||
$d: 8px;
|
||||
@include ancillaryIcon($d, $colorAlert);
|
||||
top: 1px;
|
||||
right: -2px;
|
||||
}
|
||||
&.l-icon-link {
|
||||
$d: 8px;
|
||||
@include ancillaryIcon($d, $colorIconLink);
|
||||
left: -3px;
|
||||
bottom: 5px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.title-label {
|
||||
@include absPosDefault();
|
||||
display: block;
|
||||
left: $runningItemW + ($interiorMargin * 3);
|
||||
//right: $treeContextTriggerW + $interiorMargin;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&.loading {
|
||||
pointer-events: none;
|
||||
.label {
|
||||
opacity: 0.5;
|
||||
.title-label {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
.wait-spinner {
|
||||
margin-left: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
&.selected {
|
||||
$c: #fff;
|
||||
background: $colorKeySelectedBg;
|
||||
color: $c;
|
||||
.view-control {
|
||||
color: $colorItemTreeIcon;
|
||||
}
|
||||
.label .type-icon {
|
||||
color: #fff; //$colorItemTreeIconHover;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.selected) {
|
||||
&:hover {
|
||||
background: lighten($colorBodyBg, 5%);
|
||||
color: lighten($colorBodyFg, 20%);
|
||||
.context-trigger {
|
||||
display: block;
|
||||
}
|
||||
.icon {
|
||||
color: $colorItemTreeIconHover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.loading) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.context-trigger {
|
||||
$h: 0.9rem;
|
||||
//display: none;
|
||||
top: -1px;
|
||||
position: absolute;
|
||||
right: $interiorMarginSm;
|
||||
.invoke-menu {
|
||||
font-size: 0.75em;
|
||||
height: $h;
|
||||
line-height: $h;
|
||||
}
|
||||
}
|
||||
.label {
|
||||
color: #00aa00; // Good up to here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.tree {
|
||||
margin-left: $treeVCW + $interiorMargin;
|
||||
}
|
||||
}
|
@ -27,4 +27,5 @@
|
||||
|
||||
@import "constants";
|
||||
@import "mixins";
|
||||
@import "tree/tree";
|
||||
@import "tree/tree";
|
||||
@import "search/search";
|
@ -20,7 +20,7 @@
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
|
||||
<div>
|
||||
<div class="searchbar-item">
|
||||
<mct-representation
|
||||
key="'label'"
|
||||
mct-object="domainObject"
|
||||
|
@ -19,7 +19,8 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<span ng-controller="SearchbarController as controller">
|
||||
<span class="searchbar"
|
||||
ng-controller="SearchbarController as controller">
|
||||
<!-- Search bar input -->
|
||||
<div>
|
||||
<input type="text"
|
||||
@ -30,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Results list -->
|
||||
<div>
|
||||
<div class="results">
|
||||
<mct-representation key="'searchbar-item'"
|
||||
ng-repeat="result in results"
|
||||
mct-object="result.object">
|
||||
|
Loading…
x
Reference in New Issue
Block a user