mirror of
https://github.com/nasa/openmct.git
synced 2025-01-01 19:06:40 +00:00
[Search] Renaming search and searchbar
Changed what was previously just 'search' and renamed to 'search view'. Then, took what was previously 'searchbar' and renamed to 'search'.
This commit is contained in:
parent
1dbe039be8
commit
b16af5fe3e
platform
commonUI
features/search
@ -28,8 +28,8 @@
|
||||
>
|
||||
<mct-representation key="'create-button'" mct-object="navigatedObject">
|
||||
</mct-representation>
|
||||
<div>
|
||||
<mct-include key="'searchbar'"
|
||||
<div class='search-holder'>
|
||||
<mct-include key="'search'"
|
||||
mct-object="domainObject">
|
||||
</mct-include>
|
||||
</div>
|
||||
|
@ -272,25 +272,25 @@ ul.tree {
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/* line 27, ../sass/search/_search.scss */
|
||||
.search-holder .searchbar {
|
||||
.search .searchbar {
|
||||
width: 100%;
|
||||
margin-top: 20px; }
|
||||
/* line 32, ../sass/search/_search.scss */
|
||||
.search-holder .results {
|
||||
.search .results {
|
||||
margin-top: 10px; }
|
||||
/* line 35, ../sass/search/_search.scss */
|
||||
.search-holder .results .search-result-item {
|
||||
.search .results .search-result-item {
|
||||
margin-bottom: 5px;
|
||||
background: #005177;
|
||||
border-radius: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 1px; }
|
||||
/* line 42, ../sass/search/_search.scss */
|
||||
.search-holder .results .search-result-item .label {
|
||||
.search .results .search-result-item .label {
|
||||
left: 15px;
|
||||
margin-left: 6px; }
|
||||
/* line 51, ../sass/search/_search.scss */
|
||||
.search-holder .results .search-result-item .label .title-label {
|
||||
.search .results .search-result-item .label .title-label {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
@ -302,7 +302,7 @@ ul.tree {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
/* line 70, ../sass/search/_search.scss */
|
||||
.search-holder .load-more-button {
|
||||
.search .load-more-button {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
left: 25%;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
.search-holder {
|
||||
.search {
|
||||
$iconWidth: 20px;
|
||||
$leftMargin: 6px;
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
"extensions": {
|
||||
"controllers": [
|
||||
{
|
||||
"key": "SearchbarController",
|
||||
"implementation": "controllers/SearchbarController.js",
|
||||
"key": "SearchController",
|
||||
"implementation": "controllers/SearchController.js",
|
||||
"depends": [ "$scope", "$timeout", "searchService" ]
|
||||
},
|
||||
{
|
||||
"key": "SearchbarItemController",
|
||||
"implementation": "controllers/SearchbarItemController.js",
|
||||
"key": "SearchItemController",
|
||||
"implementation": "controllers/SearchItemController.js",
|
||||
"depends": [ "$scope" ]
|
||||
},
|
||||
{
|
||||
@ -21,15 +21,15 @@
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "searchbar",
|
||||
"templateUrl": "templates/searchbar.html",
|
||||
"key": "search",
|
||||
"templateUrl": "templates/search.html",
|
||||
"uses": [ "composition" ]
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "searchbar-item",
|
||||
"templateUrl": "templates/searchbar-item.html",
|
||||
"key": "search-item",
|
||||
"templateUrl": "templates/search-item.html",
|
||||
"uses": [ "composition" ]
|
||||
}
|
||||
],
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<span ng-controller="ToggleController as toggle">
|
||||
<div class="search-result-item"
|
||||
ng-controller="SearchbarItemController as controller">
|
||||
ng-controller="SearchItemController as controller">
|
||||
<mct-representation
|
||||
key="'label'"
|
||||
mct-object="domainObject"
|
@ -19,30 +19,39 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<span class="search-holder"
|
||||
ng-controller="SearchbarController as controller">
|
||||
<!-- Search bar input -->
|
||||
|
||||
<div class="items-holder grid abs"
|
||||
ng-controller="SearchViewController as controller">
|
||||
|
||||
<!-- Search bar -->
|
||||
<div>
|
||||
<input class="searchbar"
|
||||
id="searchbarinput"
|
||||
type="text"
|
||||
<div style="height: 30px">Search:</div>
|
||||
<input type="text"
|
||||
id="searchinput"
|
||||
value=""
|
||||
ng-keyup="controller.search('searchbarinput')" />
|
||||
ng-keyup="controller.search('searchinput')"
|
||||
style="width: 66%"/>
|
||||
</div>
|
||||
|
||||
<!-- some spacing -->
|
||||
<div style="height: 30px"></div>
|
||||
|
||||
<!-- Results list -->
|
||||
<div class="results">
|
||||
<mct-representation key="'searchbar-item'"
|
||||
ng-repeat="result in results"
|
||||
mct-object="result.object">
|
||||
<div ng-if="controller.areResults()"
|
||||
style="height: 60px">
|
||||
<p>
|
||||
Results:
|
||||
</p>
|
||||
<div ng-if="controller.areMore()">
|
||||
<button ng-click="controller.loadMore()">
|
||||
Load more
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<mct-representation key="'grid-item'"
|
||||
ng-repeat="result in results"
|
||||
mct-object="result.object">
|
||||
</mct-representation>
|
||||
</div>
|
||||
|
||||
<!-- Load more? -->
|
||||
<div ng-if="controller.areMore()">
|
||||
<button class="load-more-button btn very-subtle"
|
||||
ng-click="controller.loadMore()">
|
||||
Load more
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
@ -19,39 +19,30 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
|
||||
<div class="items-holder grid abs"
|
||||
ng-controller="SearchController as controller">
|
||||
|
||||
<!-- Search bar -->
|
||||
<span class="search"
|
||||
ng-controller="SearchController as controller">
|
||||
<!-- Search bar input -->
|
||||
<div>
|
||||
<div style="height: 30px">Search:</div>
|
||||
<input type="text"
|
||||
id="searchinput"
|
||||
<input class="searchbar"
|
||||
id="searchbarinput"
|
||||
type="text"
|
||||
value=""
|
||||
ng-keyup="controller.search('searchinput')"
|
||||
style="width: 66%"/>
|
||||
ng-keyup="controller.search('searchbarinput')" />
|
||||
</div>
|
||||
|
||||
<!-- some spacing -->
|
||||
<div style="height: 30px"></div>
|
||||
|
||||
<!-- Results list -->
|
||||
<div ng-if="controller.areResults()"
|
||||
style="height: 60px">
|
||||
<p>
|
||||
Results:
|
||||
</p>
|
||||
<div ng-if="controller.areMore()">
|
||||
<button ng-click="controller.loadMore()">
|
||||
Load more
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<mct-representation key="'grid-item'"
|
||||
ng-repeat="result in results"
|
||||
mct-object="result.object">
|
||||
<div class="results">
|
||||
<mct-representation key="'search-item'"
|
||||
ng-repeat="result in results"
|
||||
mct-object="result.object">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Load more? -->
|
||||
<div ng-if="controller.areMore()">
|
||||
<button class="load-more-button btn very-subtle"
|
||||
ng-click="controller.loadMore()">
|
||||
Load more
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
@ -22,7 +22,7 @@
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Module defining SearchController. Created by shale on 07/08/2015.
|
||||
* Module defining SearchController. Created by shale on 07/15/2015.
|
||||
*/
|
||||
define(function () {
|
||||
"use strict";
|
||||
|
@ -22,7 +22,7 @@
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Module defining SearchbarController. Created by shale on 07/15/2015.
|
||||
* Module defining SearchViewController. Created by shale on 07/08/2015.
|
||||
*/
|
||||
define(function () {
|
||||
"use strict";
|
||||
@ -30,7 +30,7 @@ define(function () {
|
||||
var INITIAL_LOAD_NUMBER = 20,
|
||||
LOAD_INCREMENT = 5;
|
||||
|
||||
function SearchbarController($scope, $timeout, searchService) {
|
||||
function SearchViewController($scope, $timeout, searchService) {
|
||||
// Starting amount of results to load. Will get increased.
|
||||
var numResults = INITIAL_LOAD_NUMBER;
|
||||
|
||||
@ -105,5 +105,5 @@ define(function () {
|
||||
}
|
||||
};
|
||||
}
|
||||
return SearchbarController;
|
||||
return SearchViewController;
|
||||
});
|
Loading…
Reference in New Issue
Block a user