diff --git a/assets/js/co.js b/assets/js/co.js index ee55bfba35dd73783e1b0b03d12e636e0f680bb4..cdc82abcfd47eef02c7265ee415b62785f084447 100755 --- a/assets/js/co.js +++ b/assets/js/co.js @@ -2007,7 +2007,22 @@ var coInterface = { else post.participate = 0; } - ajaxPost(null, url, post, resolve, reject); + ajaxPost(null, url, post, response => { + if (response.success) + resolve(response.content); + else + reject({ + side: "server", + msg: response.content, + fn, + }); + }, (xhr, status, error) => { + reject({ + side: "server", + msg: error, + fn, + }); + }); } }); }, diff --git a/assets/js/default/editInPlace.js b/assets/js/default/editInPlace.js index 9eec35d8ab035ce31330becfdaed0f5be3181934..31bbf4e5d10da69d5c024a237103b1d6bc87c8ab 100755 --- a/assets/js/default/editInPlace.js +++ b/assets/js/default/editInPlace.js @@ -306,7 +306,7 @@ function bindAboutPodElement() { if(typeof data.resultGoods.values.birthDate != "undefined"){ mylog.log("update birthDate"); contextData.birthDate = data.resultGoods.values.birthDate; - $("#birthDateAbout").html(moment(contextData.birthDate).local().format("DD/MM/YYYY")); + $("#birthDateAbout").html(moment((contextData.birthDate.sec * 1000)).local().format("DD/MM/YYYY")); } if(typeof data.resultGoods.values.fixe != "undefined"){ @@ -588,7 +588,7 @@ function bindAboutPodElement() { if(notNull(contextData.username) && contextData.username.length > 0) dataUpdate.username = contextData.username; if(notEmpty(contextData.birthDate)) - dataUpdate.birthDate = moment(contextData.birthDate).local().format("DD/MM/YYYY"); + dataUpdate.birthDate = moment(contextData.birthDate.sec * 1000).local().format("DD/MM/YYYY"); } mylog.log("ORGA ", contextData.type, typeObj.organization.col, dataUpdate.type); diff --git a/assets/js/default/filters.js b/assets/js/default/filters.js index 90413e7cb6eb24fdadc7868075d9e51305d1c8be..6cef677b486c0e7c73a952dbf0e6a1d7f85e11a3 100644 --- a/assets/js/default/filters.js +++ b/assets/js/default/filters.js @@ -5633,9 +5633,9 @@ var searchObj = { } }); - /*if(fObj.results.count["citoyens"]<10){ + if(fObj.results.count["citoyens"]==0){ $("#btn-load-graph").remove(); - }*/ + } }, changeNumberOfResults : function(fObj){ diff --git a/views/element/about.php b/views/element/about.php index 2abba67407d09de205e609788f4f188b4ac88305..47569d4643068ba89cf6c0bd691c1972c3a566fc 100755 --- a/views/element/about.php +++ b/views/element/about.php @@ -1000,7 +1000,7 @@ function redirigerVersPage(url) { $("#endDateAbout").html(moment(contextData.endDateDB).local().locale(mainLanguage).format(formatDateView)); if(notEmpty(contextData.birthDate)) - $("#birthDateAbout").html(moment(contextData.birthDate).local().locale(mainLanguage).format("DD/MM/YYYY")); + $("#birthDateAbout").html(moment(contextData.birthDate.sec * 1000).local().locale(mainLanguage).format("DD/MM/YYYY")); if ($("#birthDate").html() != "") $("#birthDate").html(moment($("#birthDate").html()).local().locale(mainLanguage).format("DD/MM/YYYY"));