{"id":9789,"date":"2018-11-14T10:12:33","date_gmt":"2018-11-14T10:12:33","guid":{"rendered":"http:\/\/4dhealth.com\/calendari\/"},"modified":"2019-01-22T10:54:47","modified_gmt":"2019-01-22T10:54:47","slug":"calendario","status":"publish","type":"page","link":"https:\/\/4dhealth.com\/es\/calendario\/","title":{"rendered":"Calendario"},"content":{"rendered":"\t <div id=\"events-calendar-wrapper\">\n\t   \n\t   <section id=\"events-calendar\">\n\t     <section id=\"controls-calendar\">\n\t       <div id=\"month-event\">\n\t\t     <a href=\"#\" class=\"arrow-left\"><a>\n\t\t     <span id=\"current-month\" data-month=\"07\" data-year=\"2026\">Desembre 2018<\/span>\n\t\t     <a href=\"#\" class=\"arrow-right\"><\/a>\n\t\t   <\/div>\n\t\t   \t     <\/section>\n\t     <section id=\"list-events-calendar\">\n\t   \n\t       \n\t     <\/section>\n\t   <\/section>\n\t   \n\t   <section id=\"events-calendar-information\">\n\t   \n\t     <div id=\"search-wrapper\">\n\t\t   <h3 class=\"search-title\">Buscar<\/h3>\n\t\t   <form role=\"search\" method=\"get\" class=\"search-form\" action=\"https:\/\/4dhealth.com\/es\/\">\n\t<div class=\"search-form__input-wrap\">\n\t\t<span class=\"screen-reader-text\">Search for:<\/span>\n\t\t<i class=\"fa ui-1_zoom\"><\/i>\t\t<input type=\"search\" class=\"search-form__field\"\n\t\t\tplaceholder=\"Enter keyword\"\n\t\t\tvalue=\"\" name=\"s\"\n\t\t\ttitle=\"Search for:\" \/>\n\t<\/div>\n\t<button type=\"submit\" class=\"search-form__submit btn btn-primary\">Search<\/button>\n<\/form>\n\t\t <\/div>\n    \n\t     \n\t\t <section id=\"inscription-box\">\n  <h3>Inscripcions i <\/h3>\n  <h4>m\u00e9s informaci\u00f3<\/h4>\n  <a href=\"https:\/\/4dhealth.com\/es\/contacto\/mas-informacion\/\">\n\tcontacta  <\/a>\n<\/section>\t   \n\t   <\/section>\n\t   \n\t   \n\t <\/div>\n\t \n\t <script>\n\n\n\t  jQuery('#month-event a').on('click', function(evt) {\n\n\t\tevt.preventDefault();\n\t\t\n\t\tvar currentMonth = parseInt(jQuery('#current-month').data('month'));\n\t\tvar currentYear  = parseInt(jQuery('#current-month').data('year'));\n\t\t\n\t\tif(jQuery(this).hasClass('arrow-right')) {\n\t\t  \n\t\t  \/\/ month\n\t\t  currentMonth = (currentMonth == 12) ? 1 : currentMonth + 1;\n\t\t  \n\t\t  \/\/ year\n\t\t  currentYear = (currentMonth == 1) ? currentYear + 1 : currentYear;\n\t\t  \n\t\t} else {\n\t\t\t\n\t\t  \/\/ month\n\t\t  currentMonth = (currentMonth == 1) ? 12 : currentMonth - 1;\n\t\t  \n\t\t  \/\/ year\n\t\t  currentYear = (currentMonth == 12) ? currentYear - 1 : currentYear;\n\t\t  \n\t\t}\n\n\t\tgetCalendarEvents(currentMonth, currentYear);\n\n\t  });\n\t  \n\t  function changeCurrentMonth(month, year) {\n\t    jQuery('#current-month').data('month', month);\n\t\tjQuery('#current-month').data('year', year);\n\t\tjQuery('#current-month').html(months[month - 1] + ' ' + year);\n\t  }\n\n\n\t  function getCalendarEvents(month, year) {\n\n\t\tjQuery.ajax({\n\t\t  type: \"POST\",\n\t\t  url: \"https:\/\/4dhealth.com\/wp-content\/plugins\/boxcom\/controllers\/AjaxController.php\",\n\t\t  dataType: 'json',\n\t\t  cache: false,\n\t\t  data: {\n\t\t\tmonth  : month,\n            year   : year,\n            action : 'get_events'\t\t\t\n\t\t  },\n\n\n\t\t  beforeSend: function( xhr ) {\n\n\t\t\t  MESSAGES_.popupMsg('CARREGANT', {hideCloseButton: true, css: {'background-color' : '#180d8d', 'padding' : '7px 11px'} });\n\n\t\t  }\n\n\t\t}).done(function(data) {\n\n\t\t  MESSAGES_.popupMsg(false);\n\n\t\t  if(data.ok) {\n\t\t\t  \n\t\t\t\/\/alert(data.ok)\n\t        \n\t\t\tjQuery('#list-events-calendar').html(data.ok);\n\n\t\t  } else if(data.error) {\n\t\t\t\n\t\t\tjQuery('#list-events-calendar').html('<div id=\"no-events\">' + data.error + '<\/div>');\n\n\t\t  } else {    \n\n\t\t\talert('Error al procesar<\/div>');\n\n\t\t  }\n\n\t\t}).always(function() {\n\t\t\n\t\t  changeCurrentMonth(month, year)\n\t\t\t\n\t\t});\n\n\t  }\n\t  \n\t  var months = [\n\t    'gener',\n\t\t'febrer',\n\t\t'mar\u00e7',\n\t\t'abril',\n\t\t'maig',\n\t\t'juny',\n\t\t'juliol',\n\t\t'agost',\n\t\t'setembre',\n\t\t'octubre',\n\t\t'novembre',\n\t\t'desembre'\n\t  ]\n\n\t<\/script>\n\t \n\t \n\t \n\t \n\t \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-maintenance.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-9789","page","type-page","status-publish","hentry","no-thumb"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/pages\/9789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/comments?post=9789"}],"version-history":[{"count":1,"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/pages\/9789\/revisions"}],"predecessor-version":[{"id":9792,"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/pages\/9789\/revisions\/9792"}],"wp:attachment":[{"href":"https:\/\/4dhealth.com\/es\/wp-json\/wp\/v2\/media?parent=9789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}