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-event.js b/app/common/directives/log-event.js
index e858239..c48a3ee 100644
--- a/app/common/directives/log-event.js
+++ b/app/common/directives/log-event.js
@@ -1,41 +1,43 @@
-window.angular && (function (angular) {
- 'use strict';
+window.angular && (function(angular) {
+ 'use strict';
- angular
- .module('app.common.directives')
- .directive('logEvent', ['APIUtils', function (APIUtils) {
- return {
- 'restrict': 'E',
- 'template': require('./log-event.html'),
- 'scope': {
- 'event': '=',
- 'tmz': '=',
- 'multiSelected': '='
- },
- 'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){
- $scope.dataService = dataService;
- $scope.copySuccess = function (event) {
- event.copied = true;
- $timeout(function(){
- event.copied = false;
- }, 5000);
- };
- $scope.copyFailed = function (err) {
- console.error('Error!', err);
- };
- $scope.resolveEvent = function(event){
- APIUtils.resolveLogs([{Id: event.Id}]).then(function(){
- event.Resolved = 1;
- });
- }
+ angular
+ .module('app.common.directives')
+ .directive('logEvent', ['APIUtils', function(APIUtils) {
+ return {
+ 'restrict': 'E',
+ 'template': require('./log-event.html'),
+ 'scope': {
+ 'event': '=',
+ 'tmz': '=',
+ 'multiSelected': '='
+ },
+ 'controller': ['$rootScope', '$scope', 'dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout) {
+ $scope.dataService = dataService;
+ $scope.copySuccess = function(event) {
+ event.copied = true;
+ $timeout(function() {
+ event.copied = false;
+ }, 5000);
+ };
+ $scope.copyFailed = function(err) {
+ console.error('Error!', err);
+ };
+ $scope.resolveEvent = function(event) {
+ APIUtils.resolveLogs([{
+ Id: event.Id
+ }]).then(function() {
+ event.Resolved = 1;
+ });
+ };
- $scope.accept = function(){
- $scope.event.selected = true;
- $timeout(function(){
- $scope.$parent.accept();
- }, 10);
- }
- }]
- };
- }]);
+ $scope.accept = function() {
+ $scope.event.selected = true;
+ $timeout(function() {
+ $scope.$parent.accept();
+ }, 10);
+ };
+ }]
+ };
+ }]);
})(window.angular);