Fixed or disabled warnings

This commit is contained in:
baldo 2017-05-06 17:31:34 +02:00
parent 94a51921fd
commit 3d6fb5feec
11 changed files with 45 additions and 38 deletions
app/scripts/directives

View file

@ -120,8 +120,8 @@ angular.module('ffffng')
};
$scope.monitoringInitialConfirmationRequired = function () {
return $scope.node.monitoring
&& ($scope.action === 'create' || $scope.node.email !== initialEmail || !initialMonitoring);
return $scope.node.monitoring &&
($scope.action === 'create' || $scope.node.email !== initialEmail || !initialMonitoring);
};
$scope.monitoringConfirmationPending = function () {
@ -137,8 +137,8 @@ angular.module('ffffng')
var doSubmit = function (node) {
if ($scope.nodeForm.$invalid) {
var firstInvalid = _.filter($element.find('form').find('input'), function (input) {
return (input.type === 'text' || input.type === 'email')
&& $scope.nodeForm[input.name].$invalid;
return (input.type === 'text' || input.type === 'email') &&
$scope.nodeForm[input.name].$invalid;
})[0];
if (firstInvalid) {
$window.scrollTo(0, $window.pageYOffset + firstInvalid.getBoundingClientRect().top - 100);