Format code using clang-format-5.0
Once merged, this repository will have CI enforce
the coding guidelines in the .clang-format file.
Change-Id: I96a05972665f9c67625c6850c3da25edc540be06
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/app/common/directives/log-search-control.js b/app/common/directives/log-search-control.js
index f262f5f..abdc9ff 100644
--- a/app/common/directives/log-search-control.js
+++ b/app/common/directives/log-search-control.js
@@ -1,46 +1,49 @@
window.angular && (function(angular) {
'use strict';
- angular
- .module('app.common.directives')
- .directive('logSearchControl', ['APIUtils', function(APIUtils) {
+ angular.module('app.common.directives').directive('logSearchControl', [
+ 'APIUtils',
+ function(APIUtils) {
return {
'restrict': 'E',
'template': require('./log-search-control.html'),
- 'controller': ['$rootScope', '$scope', 'dataService', '$location', function($rootScope, $scope, dataService, $location) {
- $scope.dataService = dataService;
- $scope.doSearchOnEnter = function(event) {
- var search = $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
- if (event.keyCode === 13 &&
- search.length >= 2) {
- $scope.clearSearchItem();
- $scope.addSearchItem(search);
- }
- else {
- if (search.length == 0) {
+ 'controller': [
+ '$rootScope', '$scope', 'dataService', '$location',
+ function($rootScope, $scope, dataService, $location) {
+ $scope.dataService = dataService;
+ $scope.doSearchOnEnter = function(event) {
+ var search =
+ $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
+ if (event.keyCode === 13 && search.length >= 2) {
$scope.clearSearchItem();
+ $scope.addSearchItem(search);
+ } else {
+ if (search.length == 0) {
+ $scope.clearSearchItem();
+ }
}
- }
- };
+ };
- $scope.clear = function() {
- $scope.customSearch = '';
- $scope.clearSearchItem();
- };
-
- $scope.doSearchOnClick = function() {
- var search = $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
- if (search.length >= 2) {
+ $scope.clear = function() {
+ $scope.customSearch = '';
$scope.clearSearchItem();
- $scope.addSearchItem(search);
- }
- else {
- if (search.length == 0) {
+ };
+
+ $scope.doSearchOnClick = function() {
+ var search =
+ $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
+ if (search.length >= 2) {
$scope.clearSearchItem();
+ $scope.addSearchItem(search);
+ } else {
+ if (search.length == 0) {
+ $scope.clearSearchItem();
+ }
}
- }
- };
- }]
+ };
+ }
+ ]
};
- }]);
+ }
+ ]);
})(window.angular);