|
|
@@ -498,7 +498,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
|
|
|
var formatDate = function(value) {
|
|
|
- return moment(value.toString().substr(0,4) + '-' + value.toString().substr(4,2) + '-' + value.toString().substr(6,2)).locale("fr");
|
|
|
+ return moment(value, 'DD/MM/YY');
|
|
|
};
|
|
|
|
|
|
var getFullAddress = function(callback) {
|
|
|
@@ -590,6 +590,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
})
|
|
|
.done(function( msg ) {
|
|
|
onResults(msg);
|
|
|
+
|
|
|
});
|
|
|
|
|
|
var onResults = function(results) {
|
|
|
@@ -797,7 +798,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
|
|
|
var isDate = function(value) {
|
|
|
- return (value.toString().length === 14 && value.toString().substring(0,2) === "20");
|
|
|
+ return (value.toString().length === 8 && value.toString().substr(2, 1) === "/" && value.toString().substr(5,1) === "/");
|
|
|
};
|
|
|
|
|
|
var isInside = function(polygon, point) {
|
|
|
@@ -930,7 +931,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
if(!date || date === "Invalid date") {return;}
|
|
|
var momentDate = moment(date, 'DD/MM/YYYY');
|
|
|
|
|
|
- var result = '<div class="popup-line"><div class="box-eligibilite-title">Date prévisionnelle abonnement FTTH</div><div style="font-weight: bold;" class="popup-value">' + momentDate.locale("fr").format('ddd, LL') + '</div><div class="popup-small-date">' + momentDate.locale("fr").fromNow() + '</div></div>';
|
|
|
+ var result = '<div class="popup-line"><div class="box-eligibilite-title">Date prévisionnelle abonnement FTTH</div><div style="font-weight: bold;" class="popup-value">' + momentDate.locale("fr").format('MMMM YYYY') + '</div><div class="popup-small-date">' + momentDate.locale("fr").fromNow() + '</div></div>';
|
|
|
return $sce.trustAsHtml(result);
|
|
|
};
|
|
|
|
|
|
@@ -999,7 +1000,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
if(property.substring(0, 5) === 'DATE_' && !$scope.dictionary[value] && isDate(value)) {
|
|
|
date = formatDate(value);
|
|
|
}
|
|
|
- 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>';
|
|
|
+ tooltip += '<div class="popup-line"><div class="popup-label">' + label + '</div><div class="popup-value">' + (date ? date.locale("fr").format('MMMM YYYY') : value) + '</div><div class="popup-small-date">' + (date ? date.locale("fr").fromNow() : '') + '</div></div>';
|
|
|
});
|
|
|
|
|
|
if(identifier === 'adsl') {
|