mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 06:04:20 +00:00
[Search] Code style
This commit is contained in:
parent
457193657f
commit
b9f8f6e33d
@ -57,7 +57,7 @@ define(function () {
|
|||||||
itemsLength = items.length;
|
itemsLength = items.length;
|
||||||
|
|
||||||
// Then filter through the items list
|
// Then filter through the items list
|
||||||
for (i = 0; i < itemsLength; i++) {
|
for (i = 0; i < itemsLength; i += 1) {
|
||||||
// Prevent errors from getModel not being defined
|
// Prevent errors from getModel not being defined
|
||||||
if (items[i].getModel) {
|
if (items[i].getModel) {
|
||||||
itemModel = items[i].getModel();
|
itemModel = items[i].getModel();
|
||||||
@ -110,17 +110,17 @@ define(function () {
|
|||||||
//console.log('raw results', rawResults);
|
//console.log('raw results', rawResults);
|
||||||
|
|
||||||
// Get the result objects' IDs
|
// Get the result objects' IDs
|
||||||
for (i = 0; i < resultsLength; i++) {
|
for (i = 0; i < resultsLength; i += 1) {
|
||||||
ids.push(results[i][ID]);
|
ids.push(results[i][ID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the domain objects from their IDs
|
// Get the domain objects from their IDs
|
||||||
return objectService.getObjects(ids).then(function (objects) {
|
return objectService.getObjects(ids).then(function (objects) {
|
||||||
var output = [],
|
var output = [],
|
||||||
id,
|
id,
|
||||||
j;
|
j;
|
||||||
|
|
||||||
for (j = 0; j < resultsLength; j++) {
|
for (j = 0; j < resultsLength; j += 1) {
|
||||||
id = ids[j];
|
id = ids[j];
|
||||||
|
|
||||||
// Include any item except folders
|
// Include any item except folders
|
||||||
@ -141,7 +141,7 @@ define(function () {
|
|||||||
return {
|
return {
|
||||||
// Search the database using the user input of id "searchinput"
|
// Search the database using the user input of id "searchinput"
|
||||||
search: function (inputID) {
|
search: function (inputID) {
|
||||||
searchElastic(inputID).then( function (c) {
|
searchElastic(inputID).then(function (c) {
|
||||||
$scope.results = c;
|
$scope.results = c;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user