Fix jshint.

This commit is contained in:
Alexis Lahouze 2015-06-15 13:07:47 +02:00
parent 68ef144474
commit 2131d1f39a
3 changed files with 9 additions and 10 deletions

View File

@ -22,7 +22,7 @@ function account() {
this.future=ko.observable(); this.future=ko.observable();
this.current=ko.observable(); this.current=ko.observable();
this.pointed=ko.observable(); this.pointed=ko.observable();
}; }
// The AccountController. // The AccountController.
accountantApp.controller( accountantApp.controller(
@ -43,7 +43,7 @@ accountantApp.controller(
$scope.valueClass = function(account, value) { $scope.valueClass = function(account, value) {
if(!account) { if(!account) {
return return;
} }
if(value < account.authorized_overdraft) { if(value < account.authorized_overdraft) {
@ -156,7 +156,7 @@ accountantApp.controller(
// Update accounts // Update accounts
$scope.accounts = angular.fromJson(data); $scope.accounts = angular.fromJson(data);
var accountToSelect = null var accountToSelect = null;
// Reset selected account to the new instance corresponding to the old one. // Reset selected account to the new instance corresponding to the old one.
if($scope.account) { if($scope.account) {

View File

@ -25,9 +25,8 @@ var accountantApp = angular.module("accountantApp", [
$httpProvider.interceptors.push(function($q) { $httpProvider.interceptors.push(function($q) {
return { return {
"response": function(response) { "response": function(response) {
console.debug(response) if(response.data.ok === false) {
if(response.data.ok == false) { return $q.reject(response);
return $q.reject(response)
} }
// TODO Intercept validation error. // TODO Intercept validation error.
return response; return response;
@ -40,7 +39,7 @@ var accountantApp = angular.module("accountantApp", [
title: response.data.title, title: response.data.title,
text: response.data.text, text: response.data.text,
width: 300 width: 300
}) });
return $q.reject(response); return $q.reject(response);
} }

View File

@ -224,8 +224,8 @@ accountantApp.controller(
// Returns true if the entry is a scheduled one. // Returns true if the entry is a scheduled one.
$scope.isSaved = function(entry) { $scope.isSaved = function(entry) {
return entry.id != null; return entry.id !== null;
} };
$scope.iconSaveClass = function(entry) { $scope.iconSaveClass = function(entry) {
if(!$scope.isSaved(entry)) { if(!$scope.isSaved(entry)) {
@ -245,7 +245,7 @@ accountantApp.controller(
// Cancel current editing entry or clears field if a new one. // Cancel current editing entry or clears field if a new one.
$scope.cancelEditEntry = function(entry) { $scope.cancelEditEntry = function(entry) {
if ($scope.savedItem == null) { if ($scope.savedItem === null) {
// We are cancelling the new entry, just reset it. // We are cancelling the new entry, just reset it.
entry.id = null; // id should not change, but just in case... entry.id = null; // id should not change, but just in case...
entry.pointed = false; entry.pointed = false;