From 5ce73623449de146f59ebc8f23ac4607c41c89be Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Wed, 8 Feb 2017 11:31:10 +0100
Subject: [PATCH] simplify tab controller

---
 www/js/controllers/wot-controllers.js | 24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js
index 54aac2ee7..e05b4f0d9 100644
--- a/www/js/controllers/wot-controllers.js
+++ b/www/js/controllers/wot-controllers.js
@@ -30,7 +30,7 @@ angular.module('cesium.wot.controllers', ['cesium.services'])
         views: {
           'menuContent': {
             templateUrl: "templates/wot/view_certifications.html",
-            controller: 'WotCertificationsTabCtrl'
+            controller: 'WotCertificationsViewCtrl'
           }
         }
       })
@@ -78,7 +78,7 @@ angular.module('cesium.wot.controllers', ['cesium.services'])
         views: {
           'menuContent': {
             templateUrl: "templates/wot/view_certifications.html",
-            controller: 'WotCertificationsTabCtrl'
+            controller: 'WotCertificationsViewCtrl'
           }
         }
       })
@@ -129,8 +129,6 @@ angular.module('cesium.wot.controllers', ['cesium.services'])
 
   .controller('WotCertificationsViewCtrl', WotCertificationsViewController)
 
-  .controller('WotCertificationsTabCtrl', WotCertificationsTabController)
-
   .controller('WotReceivedCertificationsTabCtrl', WotReceivedCertificationsTabController)
 
   .controller('WotGivenCertificationsTabCtrl', WotGivenCertificationsTabController)
@@ -823,31 +821,17 @@ function WotCertificationsViewController($scope, $rootScope, $state, $timeout, $
       }
     }
   };
-
 }
 
-function WotCertificationsTabController($scope, $stateParams) {
-
-  $scope.formData = $scope.formData || {};
-
-  if ($stateParams.pubkey) {
-    $scope.formData.pubkey = $stateParams.pubkey;
-  }
-  if ($stateParams.uid) {
-    $scope.formData.uid = $stateParams.uid;
-  }
-}
 
-function WotReceivedCertificationsTabController($scope, $rootScope, $state, $timeout, $translate, csConfig, csSettings, csWallet, UIUtils, csWot, Modals) {
-  WotCertificationsViewController.call(this, $scope, $rootScope, $state, $timeout, $translate, csConfig, csSettings, csWallet, UIUtils, csWot, Modals);
+function WotReceivedCertificationsTabController($scope) {
 
   $scope.showCertifications = true;
   $scope.showGivenCertifications = false;
   $scope.showAvatar = false;
 }
 
-function WotGivenCertificationsTabController($scope, $rootScope, $state, $timeout, $translate, csConfig, csSettings, csWallet, UIUtils, csWot, Modals) {
-  WotCertificationsViewController.call(this, $scope, $rootScope, $state, $timeout, $translate, csConfig, csSettings, csWallet, UIUtils, csWot, Modals);
+function WotGivenCertificationsTabController($scope) {
 
   $scope.showCertifications = false;
   $scope.showGivenCertifications = true;
-- 
GitLab