From 194cb6380fce1ed8055904c18ed884f724f59d64 Mon Sep 17 00:00:00 2001 From: Flor Date: Fri, 23 Jun 2017 14:09:27 -0300 Subject: [PATCH] se corrije el atributo imagenes - issue #2 --- www/js/get_activities.js | 4 ++-- www/js/get_evento.js | 4 ++-- www/js/get_search_results.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/www/js/get_activities.js b/www/js/get_activities.js index a67954e..6a9e68f 100644 --- a/www/js/get_activities.js +++ b/www/js/get_activities.js @@ -26,8 +26,8 @@ var gobAbiertoAPI = "https://gobiernoabierto.cordoba.gob.ar/api"; if(item.inicia != null){ // var event_date_aux = new Date(item.inicia); start_date = new Date(dateFormat(item.inicia, "mmmm dd, yyyy h:MM TT")); - if (item.image != undefined ){ - var event_image = item.image.thumbnail.replace(/^http:\/\//i, 'https://'); + if (item.imagen != undefined ){ + var event_image = item.imagen.thumbnail.replace(/^http:\/\//i, 'https://'); }else{ var event_image = "img/default-event.png"; } diff --git a/www/js/get_evento.js b/www/js/get_evento.js index 6e19697..eae0513 100644 --- a/www/js/get_evento.js +++ b/www/js/get_evento.js @@ -35,8 +35,8 @@ var gobAbiertoAPI = "https://gobiernoabierto.cordoba.gob.ar/api"; $.each(data.results, function(i, item) { if(item.inicia != null){ var event_date_aux = new Date(item.inicia); - if (item.image != undefined ){ - var event_image = item.image.original.replace(/^http:\/\//i, 'https://'); + if (item.imagen != undefined ){ + var event_image = item.imagen.original.replace(/^http:\/\//i, 'https://'); }else{ var event_image = "img/default-event.png"; } diff --git a/www/js/get_search_results.js b/www/js/get_search_results.js index 0d6771d..40c4c8e 100644 --- a/www/js/get_search_results.js +++ b/www/js/get_search_results.js @@ -21,8 +21,8 @@ function handleData(data) { $.each(data.results, function(i, item) { if (item.inicia != null) { var event_date_aux = new Date(item.inicia); - if (item.image != undefined) { - var event_image = item.image.original.replace(/^http:\/\//i, 'https://'); + if (item.imagen != undefined) { + var event_image = item.imagen.original.replace(/^http:\/\//i, 'https://'); } else { var event_image = "img/default-event.png"; }