Run js-beautify and fixjsstyle on code
Found this pointer on stackoverflow:
https://stackoverflow.com/a/31660434/5508494
End goal is to get the code formatted well enough that
clang format will run correctly against it.
Change-Id: I80053e78d253d8eee49233e42d55e5807ae8fdc8
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 c610c18..f262f5f 100644
--- a/app/common/directives/log-search-control.js
+++ b/app/common/directives/log-search-control.js
@@ -1,44 +1,46 @@
-window.angular && (function (angular) {
- 'use strict';
+window.angular && (function(angular) {
+ 'use strict';
- 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){
- $scope.clearSearchItem();
- }
- }
- };
+ 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) {
+ $scope.clearSearchItem();
+ }
+ }
+ };
- $scope.clear = function(){
- $scope.customSearch = "";
- $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.clearSearchItem();
- $scope.addSearchItem(search);
- }else{
- if(search.length == 0){
- $scope.clearSearchItem();
- }
- }
- }
- }]
- };
- }]);
+ $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);