Quellcode durchsuchen

Debug + addd link to Ariase

boutils vor 10 Jahren
Ursprung
Commit
86281321fb
1 geänderte Dateien mit 5 neuen und 18 gelöschten Zeilen
  1. 5 18
      js/app.js

+ 5 - 18
js/app.js

@@ -445,24 +445,11 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
       reverseLocation($scope.geoCode, null, function(address) {
         $scope.address = address;
-        ariaz(address, function(result) {
-          //console.log('ariaz', result);
-        });
         getResults();
       });
-
     });
   };
 
-  var ariaz = function(address, callback) {
-    var url = 'http://www.eligibilite-adsl.com/testXmlAriase.php?ip=80.13.25.43&insee=35238&rivoli=8993&numeroVoie=2&complementNumeroVoie=';
-      $.get(
-      url,
-      function(data, status) {
-        callback(data);
-      });
-  };
-
   var computeDateFTTH = function() {
     if(!$scope.results.ftth) {return;}
 
@@ -920,16 +907,13 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
   $scope.getHtmlContent = function(identifier, record) {
 
-    var title = record._properties.name.string ? record._properties.name.string : record[record._properties.name.key];
+    //var title = record._properties.name.string ? record._properties.name.string : record[record._properties.name.key];
 
     // Tooltip content
-    var tooltip = '<div class="popup-line"><span class="popup-title">' + title +'</span></div>' +
-                  '<hr>';
+    var tooltip = '';
 
     _.each(record, function(value, property) {
       if(property.charAt(0) === '_' ||
-         (record._properties.hidden && record._properties.hidden.indexOf(property) !== -1) ||
-         record._properties.name.key === property ||
          value === null |
          typeof value === 'undefined') {
 
@@ -947,6 +931,9 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
       tooltip += '<div class="popup-line"><div class="popup-label">' + label + '</div><div class="popup-value">' + (date ? date.locale("fr").format('ddd, LL') : value) + '</div><div class="popup-small-date">' + (date ? date.locale("fr").fromNow() : '') + '</div></div>';
     });
 
+    if(identifier === 'adsl') {
+      tooltip = '<a style="float: right;" href ="http://www.ariase.com" target="_blank">Tester mon éligibilité ADSL avec Ariase.com</a>';
+    }
     return tooltip;
   };