mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[Search] Search icon
Search icon now is not visible when text is entered in the search bar, even when the bar is not in focus.
This commit is contained in:
parent
11a45e4db0
commit
23bc246a48
@ -296,15 +296,19 @@ ul.tree {
|
||||
height: 0;
|
||||
margin-top: -19px;
|
||||
transition: visibility .15s, opacity .15s; }
|
||||
/* line 68, ../sass/search/_search.scss */
|
||||
/* line 67, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-bar .search-icon.content {
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
/* line 74, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-bar .search-input:focus ~ div.search-icon {
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
/* line 76, ../sass/search/_search.scss */
|
||||
/* line 82, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll {
|
||||
top: 25px;
|
||||
overflow-y: auto; }
|
||||
/* line 83, ../sass/search/_search.scss */
|
||||
/* line 89, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item {
|
||||
-moz-transition: background-color 0.25s;
|
||||
-o-transition: background-color 0.25s;
|
||||
@ -314,10 +318,10 @@ ul.tree {
|
||||
border-radius: 2px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 2px; }
|
||||
/* line 97, ../sass/search/_search.scss */
|
||||
/* line 103, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item .label {
|
||||
margin-left: 6px; }
|
||||
/* line 101, ../sass/search/_search.scss */
|
||||
/* line 107, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item .label .title-label {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@ -329,47 +333,47 @@ ul.tree {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
/* line 123, ../sass/search/_search.scss */
|
||||
/* line 129, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item.selected {
|
||||
background: #005177;
|
||||
color: #fff; }
|
||||
/* line 127, ../sass/search/_search.scss */
|
||||
/* line 133, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item.selected .view-control {
|
||||
color: #0099cc; }
|
||||
/* line 130, ../sass/search/_search.scss */
|
||||
/* line 136, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item.selected .label .type-icon {
|
||||
color: #fff; }
|
||||
/* line 137, ../sass/search/_search.scss */
|
||||
/* line 143, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item:not(.selected):hover {
|
||||
background: #404040;
|
||||
color: #cccccc; }
|
||||
/* line 140, ../sass/search/_search.scss */
|
||||
/* line 146, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item:not(.selected):hover .context-trigger {
|
||||
display: block; }
|
||||
/* line 143, ../sass/search/_search.scss */
|
||||
/* line 149, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .results .search-result-item:not(.selected):hover .icon {
|
||||
color: #33ccff; }
|
||||
/* line 151, ../sass/search/_search.scss */
|
||||
/* line 157, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-icon {
|
||||
position: relative; }
|
||||
/* line 153, ../sass/search/_search.scss */
|
||||
/* line 159, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-icon.loading {
|
||||
pointer-events: none;
|
||||
margin-left: 6px; }
|
||||
/* line 157, ../sass/search/_search.scss */
|
||||
/* line 163, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-icon.loading .title-label {
|
||||
font-style: italic;
|
||||
font-size: .9em;
|
||||
opacity: 0.5;
|
||||
margin-left: 26px;
|
||||
line-height: 24px; }
|
||||
/* line 167, ../sass/search/_search.scss */
|
||||
/* line 173, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-icon.loading .wait-spinner {
|
||||
margin-left: 6px; }
|
||||
/* line 172, ../sass/search/_search.scss */
|
||||
/* line 178, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-icon:not(.loading) {
|
||||
cursor: pointer; }
|
||||
/* line 177, ../sass/search/_search.scss */
|
||||
/* line 183, ../sass/search/_search.scss */
|
||||
.search-holder .search .search-scroll .load-more-button {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
|
@ -63,6 +63,12 @@
|
||||
|
||||
// Text focus display transition
|
||||
transition: visibility .15s, opacity .15s;
|
||||
|
||||
&.content {
|
||||
// Make icon invisible whenever there is text input
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.search-input:focus~div.search-icon {
|
||||
|
@ -30,7 +30,8 @@
|
||||
ng-model="ngModel.input"
|
||||
ng-keyup="controller.search()"
|
||||
id="searchInput" />
|
||||
<div class="ui-symbol search-icon">
|
||||
<div class="ui-symbol search-icon"
|
||||
ng-class="{content: controller.hasInput()}">
|
||||
M
|
||||
</div>
|
||||
<!--mct-control key="textfield"
|
||||
|
@ -110,6 +110,14 @@ define(function () {
|
||||
} else {
|
||||
$scope.results = fullResults.hits.slice(0, numResults);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the search bar has any text inputted into it.
|
||||
* Used as a helper for CSS styling.
|
||||
*/
|
||||
hasInput: function () {
|
||||
return !($scope.ngModel.input === "" || $scope.ngModel.input === undefined);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user