From d8a1a09d31d7abc30396c1bb7a2379dea8875e90 Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Fri, 27 Oct 2017 20:08:56 +0200
Subject: [PATCH] fix js hint

---
 www/plugins/es/js/controllers/common-controllers.js  | 2 +-
 www/plugins/es/js/controllers/profile-controllers.js | 1 -
 www/plugins/es/js/services/document-services.js      | 9 +++++----
 www/plugins/es/js/services/modal-services.js         | 1 -
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/www/plugins/es/js/controllers/common-controllers.js b/www/plugins/es/js/controllers/common-controllers.js
index c69f2a24..035787f4 100644
--- a/www/plugins/es/js/controllers/common-controllers.js
+++ b/www/plugins/es/js/controllers/common-controllers.js
@@ -607,7 +607,7 @@ function ESSearchPositionModalController($scope, $q, $translate, esGeo, paramete
         ])
           .then(function (res) {
             var dividerText = res[0];
-            var res = res[1];
+            res = res[1];
             if (!res || !res.length) return res;
 
             return [{name: dividerText}].concat(res);
diff --git a/www/plugins/es/js/controllers/profile-controllers.js b/www/plugins/es/js/controllers/profile-controllers.js
index 6193ac41..014b1c21 100644
--- a/www/plugins/es/js/controllers/profile-controllers.js
+++ b/www/plugins/es/js/controllers/profile-controllers.js
@@ -3,7 +3,6 @@ angular.module('cesium.es.profile.controllers', ['cesium.es.services'])
   .config(function($stateProvider) {
 
     $stateProvider.state('app.user_edit_profile', {
-      cache: false,
       url: "/wallet/profile/edit",
       views: {
         'menuContent': {
diff --git a/www/plugins/es/js/services/document-services.js b/www/plugins/es/js/services/document-services.js
index 7270bf18..6985c66d 100644
--- a/www/plugins/es/js/services/document-services.js
+++ b/www/plugins/es/js/services/document-services.js
@@ -65,13 +65,14 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform',
     function search(options) {
       options = options || {};
 
+      var sortParts, side;
       if (options.type == 'movement') {
         if (!options.sort) {
           options.sort = 'stats.medianTime:desc';
         }
         else {
-          var sortParts = options.sort.split(':');
-          var side = sortParts.length > 1 ? sortParts[1] : 'desc';
+          sortParts = options.sort.split(':');
+          side = sortParts.length > 1 ? sortParts[1] : 'desc';
 
           options.sort = [
             {'stats.medianTime': {
@@ -91,8 +92,8 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform',
           options.sort = 'medianTime:desc';
         }
         else {
-          var sortParts = options.sort.split(':');
-          var side = sortParts.length > 1 ? sortParts[1] : 'desc';
+          sortParts = options.sort.split(':');
+          side = sortParts.length > 1 ? sortParts[1] : 'desc';
 
           options.sort = [
             {'medianTime': {
diff --git a/www/plugins/es/js/services/modal-services.js b/www/plugins/es/js/services/modal-services.js
index 440fd56e..120951e9 100644
--- a/www/plugins/es/js/services/modal-services.js
+++ b/www/plugins/es/js/services/modal-services.js
@@ -63,7 +63,6 @@ angular.module('cesium.es.modal.services', ['cesium.modal.services', 'cesium.es.
             }
           });
       });
-   ;
   }
 
   return {
-- 
GitLab