fix: lint errors

This commit is contained in:
Baptiste Grob
2021-01-22 11:52:24 +01:00
parent 5d65364885
commit a0909399f8
25 changed files with 74 additions and 75 deletions

View File

@@ -22,7 +22,7 @@ export function clickOutside($document: ng.IDocumentService) {
$scope.$apply(attrs.clickOutside);
didApplyClickOutside = true;
}
};
}
$scope.$on('$destroy', () => {
attrs.clickOutside = undefined;

View File

@@ -16,23 +16,23 @@ export function delayHide($timeout: ng.ITimeoutService) {
scopeAny.hidePromise = null;
}
showElement(true);
}
};
const hideSpinner = () => {
scopeAny.hidePromise = $timeout(
showElement.bind(this as any, false),
getDelay()
);
}
};
const showElement = (show: boolean) => {
show ? elem.css({ display: '' }) : elem.css({ display: 'none' });
}
};
const getDelay = () => {
const delay = parseInt(scopeAny.delay);
return angular.isNumber(delay) ? delay : 200;
}
};
showElement(false);
// Whenever the scope variable updates we simply

View File

@@ -5,7 +5,7 @@ export function elemReady($parse: ng.IParseService) {
link: function($scope: ng.IScope, elem: JQLite, attrs: any) {
elem.ready(function() {
$scope.$apply(function() {
var func = $parse(attrs.elemReady);
const func = $parse(attrs.elemReady);
func($scope);
});
});

View File

@@ -19,7 +19,7 @@ export function infiniteScroll() {
};
elem.on('scroll', scopeAny.onScroll);
scope.$on('$destroy', () => {
elem.off('scroll', scopeAny.onScroll);;
elem.off('scroll', scopeAny.onScroll);
});
}
};