# HG changeset patch # User rougeronj # Date 1434032376 -7200 # Node ID ffdfe491869cc1410f180d526729c5e9c26a04f0 # Parent 903d6f504f71b2e4b5d2aef66325d446c98d6567 uncomment jshint and fix minor bug rename myCustomer to imgType (customer to check if image is portrait or landscape) diff -r 903d6f504f71 -r ffdfe491869c client/app/app.css --- a/client/app/app.css Thu Jun 11 15:38:19 2015 +0200 +++ b/client/app/app.css Thu Jun 11 16:19:36 2015 +0200 @@ -1,4 +1,4 @@ -#logo { +.logo { padding-top: 0; } diff -r 903d6f504f71 -r ffdfe491869c client/app/app.js --- a/client/app/app.js Thu Jun 11 15:38:19 2015 +0200 +++ b/client/app/app.js Thu Jun 11 16:19:36 2015 +0200 @@ -3,10 +3,10 @@ angular.module('ammico', [ 'ngRoute','ammicoHome', 'ammicoMyvisit', 'ammicoBooks', 'ammicoVisites', 'ammicoSlides', 'ammicoSlideshow', 'ammicoSearch', 'ammicoAuth', 'ammicoCommon', 'templates' ]) .config(function($routeProvider, $httpProvider) { - $httpProvider.interceptors.push(function($q, $location) { + $httpProvider.interceptors.push(function($q) { return { responseError: function(rejection) { - if (rejection.status == 401) { + if (rejection.status === 401) { localStorage.removeItem('token'); } return $q.reject(rejection); @@ -76,15 +76,15 @@ }) .run( function($rootScope, $location, $window, $http, authApi, context) { $rootScope.globals = {}; - if (localStorage.getItem('token') || context['token']) { + if (localStorage.getItem('token') || context.token) { $rootScope.globals.userLogged = true; - localStorage.setItem('token', (localStorage.getItem('token') || context['token'])); - $http.defaults.headers.common.Authorization = 'Token ' + (localStorage.getItem('token') || context['token']); + localStorage.setItem('token', (localStorage.getItem('token') || context.token)); + $http.defaults.headers.common.Authorization = 'Token ' + (localStorage.getItem('token') || context.token); } $rootScope.$on( '$routeChangeStart', function(event, next) { if (next.authRequired && !$rootScope.globals.userLogged) { $location.path( '/auth/login' ); } }); - }) + }); })(); diff -r 903d6f504f71 -r ffdfe491869c client/app/auth/auth_controller.js --- a/client/app/auth/auth_controller.js Thu Jun 11 15:38:19 2015 +0200 +++ b/client/app/auth/auth_controller.js Thu Jun 11 16:19:36 2015 +0200 @@ -37,12 +37,12 @@ }; }) .controller('authregisterCtrl', function($scope, $modalInstance, authApi){ - $scope.message = ""; + $scope.message = ''; $scope.user = { - email: "", - password: "", - confirmPassword: "" + email: '', + password: '', + confirmPassword: '' }; $scope.submit = function(isValid) { @@ -57,29 +57,29 @@ $modalInstance.close('/auth/login'); }); } else { - $scope.message = "Il reste toujours des champs invalides"; + $scope.message = 'Il reste toujours des champs invalides'; } }; $scope.back = function () { $modalInstance.close('/auth/login'); }; }) - .directive("compareTo", function(){ + .directive('compareTo', function(){ return { - require: "ngModel", + require: 'ngModel', scope: { - otherModelValue: "=compareTo" + otherModelValue: '=compareTo' }, link: function($scope, element, attributes, ngModel) { - ngModel.$validators.compareTo = function(modelValue) { - return modelValue == $scope.otherModelValue; - }; + ngModel.$validators.compareTo = function(modelValue) { + return modelValue === $scope.otherModelValue; + }; - $scope.$watch("otherModelValue", function() { - ngModel.$validate(); - }); + $scope.$watch('otherModelValue', function() { + ngModel.$validate(); + }); } - } + }; }); })(); diff -r 903d6f504f71 -r ffdfe491869c client/app/books/galleryItem.html --- a/client/app/books/galleryItem.html Thu Jun 11 15:38:19 2015 +0200 +++ b/client/app/books/galleryItem.html Thu Jun 11 16:19:36 2015 +0200 @@ -1,5 +1,5 @@ - +