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/toggle-flag.js b/app/common/directives/toggle-flag.js
index 4a4e454..0869af3 100644
--- a/app/common/directives/toggle-flag.js
+++ b/app/common/directives/toggle-flag.js
@@ -1,31 +1,30 @@
window.angular && (function(angular) {
'use strict';
- angular
- .module('app.common.directives')
- .directive('toggleFlag', function($document) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
+ angular.module('app.common.directives')
+ .directive('toggleFlag', function($document) {
+ return {
+ restrict: 'A',
+ link: function(scope, element, attrs) {
- function elementClick(e) {
- e.stopPropagation();
+ function elementClick(e) {
+ e.stopPropagation();
+ }
+
+ function documentClick(e) {
+ scope[attrs.toggleFlag] = false;
+ scope.$apply();
+ }
+
+ element.on('click', elementClick);
+ $document.on('click', documentClick);
+
+ // remove event handlers when directive is destroyed
+ scope.$on('$destroy', function() {
+ element.off('click', elementClick);
+ $document.off('click', documentClick);
+ });
}
-
- function documentClick(e) {
- scope[attrs.toggleFlag] = false;
- scope.$apply();
- }
-
- element.on('click', elementClick);
- $document.on('click', documentClick);
-
- // remove event handlers when directive is destroyed
- scope.$on('$destroy', function() {
- element.off('click', elementClick);
- $document.off('click', documentClick);
- });
- }
- };
- });
+ };
+ });
})(window.angular);