Skip to content

Commit

Permalink
CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
colmexdev committed Jun 5, 2019
1 parent 5848bc0 commit 692d2a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/views/principal/eventos.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function clean(){
<script>
$(document).ready(function(){
$.ajax({
url: 'https://www.colmex.mx/catalogo_eventos.json?categoria=1:Estudios sobre América Latina&ordercrono=asc&crono=true&limit=5',
url: 'https://www.colmex.mx/catalogo_eventos.json?categoria=Latina&ordercrono=asc&crono=true&limit=5',
success: function(result){
var ev_html = '<div id="carr-evs" class="owl-1-pag-auto owl-carousel owl-dark-bg owl-pag-2">';
for(var i = 0; i < result["videos"].length; i++){
Expand Down
2 changes: 1 addition & 1 deletion app/views/principal/eventos.html.erb~
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function clean(){

<select onchange="filter(['tipo','centros','fecha']);" name="fecha" id="fecha" class="select-md input-border w-100">
<option value>Año</option>
<option value="2019">2018</option>
<option value="2019">2019</option>
<option value="2018">2018</option>
<option value="2017">2017</option>
<option value="2016">2016</option>
Expand Down
4 changes: 2 additions & 2 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function fill_eventos(conds){
var centros = (grupos !== undefined && grupos[4] !== undefined ? "&centro=" + grupos[4].split("=")[1] : "");
var fecha = (grupos !== undefined && grupos[5] !== undefined ? "&anio=" + grupos[5].split("=")[1] : "");
$.ajax({
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=1:Estudios sobre América Latina" + "&ordercrono=desc&limit=10" + offset + centros + tipo + fecha,
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=Latina" + "&ordercrono=desc&limit=10" + offset + centros + tipo + fecha,
success: function(result){
var vids_html = "";
for(var i = 0; i < result["videos"].length; i++){
Expand Down Expand Up @@ -174,7 +174,7 @@ function fill_seminarios(conds){
var offset = (grupos !== undefined && grupos[2] !== undefined ? "&offset=" + (parseInt(grupos[2].split("=")[1])) : "");
var centros = (grupos !== undefined && grupos[3] !== undefined ? "&centro=" + grupos[3].split("=")[1] : "");
$.ajax({
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=1:Estudios sobre América Latina" + "&ordercrono=desc&limit=10&tipos=seminario" + offset + centros,
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=Latina" + "&ordercrono=desc&limit=10&tipos=seminario" + offset + centros,
success: function(result){
var vids_html = "";
for(var i = 0; i < result["videos"].length; i++){
Expand Down
3 changes: 1 addition & 2 deletions public/js/main.js~
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ function fill_eventos(conds){
var tipo = (grupos !== undefined && grupos[3] !== undefined ? "&tipo=" + grupos[3].split("=")[1] : "");
var centros = (grupos !== undefined && grupos[4] !== undefined ? "&centro=" + grupos[4].split("=")[1] : "");
var fecha = (grupos !== undefined && grupos[5] !== undefined ? "&anio=" + grupos[5].split("=")[1] : "");
console.log(tipo);
$.ajax({
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=1:Estudios sobre América Latina" + "&ordercrono=desc&limit=10" + offset + centros + tipo + fecha,
success: function(result){
Expand Down Expand Up @@ -175,7 +174,7 @@ function fill_seminarios(conds){
var offset = (grupos !== undefined && grupos[2] !== undefined ? "&offset=" + (parseInt(grupos[2].split("=")[1])) : "");
var centros = (grupos !== undefined && grupos[3] !== undefined ? "&centro=" + grupos[3].split("=")[1] : "");
$.ajax({
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=1:Estudios sobre América Latina" + "&ordercrono=desc&limit=10&tipos=seminario" + offset + centros,
url: "https://www.colmex.mx/catalogo_eventos.json?categoria=Latina" + "&ordercrono=desc&limit=10&tipos=seminario" + offset + centros,
success: function(result){
var vids_html = "";
for(var i = 0; i < result["videos"].length; i++){
Expand Down

0 comments on commit 692d2a2

Please sign in to comment.