{"id":8324,"date":"2018-04-10T14:42:06","date_gmt":"2018-04-10T12:42:06","guid":{"rendered":"http:\/\/projectes.xtec.cat\/mobilitatfp\/?page_id=8324"},"modified":"2020-01-03T13:32:50","modified_gmt":"2020-01-03T12:32:50","slug":"cercador-de-centres","status":"publish","type":"page","link":"https:\/\/projectes.xtec.cat\/mobilitatfp\/cercador-de-centres\/","title":{"rendered":"Cercador de centres"},"content":{"rendered":"<style>\n.page-navigation a {<br \/>  margin: 0 2px;<br \/>  display: inline-block;<br \/>  padding: 3px 5px;<br \/>  color: #ffffff;<br \/>  background-color: #7CFC00;<br \/>  border-radius: 5px;<br \/>  text-decoration: none;<br \/>  font-weight: bold;<br \/>}<br \/>.page-navigation a[data-selected] {<br \/>  background-color: #87CEFA;<br \/>}<br \/><\/style>\n<p><script>\n\/* \nGlobal variables\n     - Language: language to use in order to buid the website\n*\/\nvar language=\"CAT\";\n\/* \n@name: loadScript\n@description: an JavaScript file is loaded in the document\n@author: Robert Plana\n@date: 2018\/05\/07\n@params: \n     - url: url with the script localization\n     - callback: function you execute after script loading, value null if no function is requiered\n*\/\nfunction loadScript(url, callback){\n   var head = document.getElementsByTagName('head')[0];\n   var script = document.createElement('script');\n   script.type = 'text\/javascript';\n   script.src = url;\n   script.onreadystatechange = callback;\n   script.onload = callback;\n   head.appendChild(script);\n}\n\/*\nScripts loading: two scripts needed: \n   - paginate script (in roder to paginat found institutions.\n   - multilingualSearcher: script that builds and manages all website\n*\/\nloadScript(location.protocol+'\/\/projectes.xtec.cat\/mobilitatfp\/wp-content\/uploads\/usu1833\/2018\/04\/jquery-paginate.js', null);\nloadScript(location.protocol+'\/\/projectes.xtec.cat\/mobilitatfp\/wp-content\/uploads\/usu1833\/2018\/05\/multilingualSearcher.js', null);\n\/\/Test\n\/*\nvar test = [];\njq.get(location.protocol+'\/\/projectes.xtec.cat\/mobilitatfp\/wp-content\/uploads\/usu1833\/2018\/06\/BD_Institutions_test.csv', function(institutionsData) {\n      var institutionsData = institutionsData.split(\"\\r\\n\");\nconsole.log(\"Entra: \"+institutionsData);\n      for (var i=1; i< institutionsData.length; i++) {\n         var institutionData = institutionsData[i].split(\";\")\n         \/\/We only save institutions type Mobility\n\t if (institutionData[0]==1) {\n\t    var institutionInformation = [];\n\t    institutionInformation.push(institutionData[1]);\n\t    institutionInformation.push(institutionData[2]);\n\t    institutionInformation.push(institutionData[3]);\n\t    institutionInformation.push(institutionData[4]);\n\t    institutionInformation.push(institutionData[5]);\n\t    institutionInformation.push(institutionData[6]);\n\n\t    \/\/The rest of information is loaded according to the webiste language\n\t    switch (language) {\n\t       case \"CAT\":\n\t          institutionInformation.push(institutionData[7]);\n\t          institutionInformation.push(institutionData[8]);\n\t          institutionInformation.push(institutionData[9]);\n\t          break;\n\t       case \"EN\":\n\t          institutionInformation.push(institutionData[10]);\n\t          institutionInformation.push(institutionData[11]);\n\t          institutionInformation.push(institutionData[12]);\n\t          break;  \n\t       default:\n\t          console.log(\"Global language variable not correct: \"+language);\n\t\t  alert(\"Some errros in script, try later plase.\");\n\t          break;  \n\t    }\n\t    test.push(institutionInformation);\n\t }         \n      }\n      console.log(test);\n});\n*\/\n<\/script><\/p>\n<div id=\"mainDiv\"><\/div>\n<p><!-- Map loading --><br \/>\n<iframe loading=\"lazy\" id=\"iframeMap\" style=\"border: none;\" src=\"https:\/\/script.google.com\/a\/macros\/xtec.cat\/s\/AKfycbxHRlIiK-j2CfC9jqGE0cG84_7TG8OATAxdmI3pzJ2fdYnoTDE\/exec?ID=1nkB3H6nQWKl6wcO_aEfCT97vYahT9r_50QxlMS5GNP8&amp;config=Config_CAT\" width=\"100%\" height=\"800px\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>.page-navigation a {  margin: 0 2px;  display: inline-block;  padding: 3px 5px;  color: #ffffff;  background-color: #7CFC00;  border-radius: 5px;  text-decoration: none;  font-weight: bold;}.page-navigation a[data-selected] {  background-color: #87CEFA;}<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":35,"comment_status":"closed","ping_status":"closed","template":"page-templates\/side-menu.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-8324","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/pages\/8324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/comments?post=8324"}],"version-history":[{"count":4,"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/pages\/8324\/revisions"}],"predecessor-version":[{"id":9929,"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/pages\/8324\/revisions\/9929"}],"wp:attachment":[{"href":"https:\/\/projectes.xtec.cat\/mobilitatfp\/wp-json\/wp\/v2\/media?parent=8324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}