mirror of
https://github.com/nasa/openmct.git
synced 2025-04-16 07:26:53 +00:00
[Search] Selection remains across queries
The selected object in the search results now remains selected even after a new search is made. It also will remain selected if it is clicked on the file tree, but the file tree version is not yet selected if it is clicked on the search results list.
This commit is contained in:
parent
c65a278fcf
commit
deba184103
@ -290,7 +290,7 @@ ul.tree {
|
||||
/* line 49, ../sass/search/_search.scss */
|
||||
.search-holder .search .results .search-result-item .label {
|
||||
margin-left: 6px; }
|
||||
/* line 58, ../sass/search/_search.scss */
|
||||
/* line 53, ../sass/search/_search.scss */
|
||||
.search-holder .search .results .search-result-item .label .title-label {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@ -302,17 +302,17 @@ ul.tree {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
/* line 79, ../sass/search/_search.scss */
|
||||
/* line 74, ../sass/search/_search.scss */
|
||||
.search-holder .search .results .search-result-item.selected {
|
||||
background: #005177;
|
||||
color: #fff; }
|
||||
/* line 83, ../sass/search/_search.scss */
|
||||
/* line 78, ../sass/search/_search.scss */
|
||||
.search-holder .search .results .search-result-item.selected .view-control {
|
||||
color: #0099cc; }
|
||||
/* line 86, ../sass/search/_search.scss */
|
||||
/* line 81, ../sass/search/_search.scss */
|
||||
.search-holder .search .results .search-result-item.selected .label .type-icon {
|
||||
color: #fff; }
|
||||
/* line 93, ../sass/search/_search.scss */
|
||||
/* line 88, ../sass/search/_search.scss */
|
||||
.search-holder .search .load-more-button {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
@ -49,12 +49,7 @@
|
||||
.label {
|
||||
// Give some padding away from the left side
|
||||
margin-left: $leftMargin;
|
||||
|
||||
.type-icon {
|
||||
.icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.title-label {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
|
@ -99,7 +99,9 @@ define(function () {
|
||||
*/
|
||||
isSelected: function () {
|
||||
// If this object is the same as the model's selected object
|
||||
return $scope.ngModel.selectedObject === $scope.domainObject;
|
||||
// Same being them having the same ID (this allows different
|
||||
// instances of the same thing to be recognized as the same)
|
||||
return $scope.ngModel.selectedObject.getId() === $scope.domainObject.getId();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user