Skip to content

Commit

Permalink
Merge pull request #1863 from sistemasases/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
melissamillares authored Jan 31, 2020
2 parents 44c4321 + 16fa4a7 commit 6f7683b
Show file tree
Hide file tree
Showing 14 changed files with 564 additions and 21 deletions.
2 changes: 1 addition & 1 deletion amd/build/geographic_main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/global_grade_book.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/student_profile_main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/wizard_categories.min.js

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions amd/src/geographic_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j

init: function(){

var id_ases = $('#id_ases').val();
const id_ases = $('#id_ases').val();
var student_marker;
const LATLNG_CAMPUS_MELENDEZ = new google.maps.LatLng(3.3741569,-76.5355235);
const LATLNG_CAMPUS_SANFER = new google.maps.LatLng(3.431626, -76.546822);

var cod_programa_activo = document.querySelector('#cod_programa_activo').dataset.info;
var cod_facultad = cod_programa_activo[1];
var latLng_student_campus = (cod_facultad === '6' || cod_facultad === '8')?LATLNG_CAMPUS_SANFER:LATLNG_CAMPUS_MELENDEZ;

/**
* Executes the method search_direction() by unfocusing the address text area.
Expand Down Expand Up @@ -120,11 +126,11 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j

if (ciudad_est == 1079) {

document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=transit'></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=transit'></iframe>";

} else {

document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=driving'></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=driving'></iframe>";
}
});

Expand Down Expand Up @@ -190,7 +196,6 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j
document.getElementById('longitude').value = longitude;

var latLng_estudiante = new google.maps.LatLng(latitude, longitude);
var latLng_univalle = new google.maps.LatLng(3.3759493, -76.5355789);

/**
* Repaints the map after editing the student's marker.
Expand All @@ -199,19 +204,19 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j
if(city == 1079){
var mapa = document.getElementById('mapa').outerHTML;
document.getElementById('geographic_map').innerHTML = mapa;
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=transit'></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=transit'></iframe>";
mode='TRANSIT';
} else {
var mapa = document.getElementById('mapa').outerHTML;
document.getElementById('geographic_map').innerHTML = mapa;
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=driving' allowfullscreen></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=driving' allowfullscreen></iframe>";
mode = 'DRIVING';
}

//Instancies a route.
var route_request = {
origin: latLng_estudiante,
destination: latLng_univalle,
destination: latLng_student_campus,
travelMode: mode
};

Expand Down Expand Up @@ -292,16 +297,15 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j

var geocoder;

var latLng_univalle = new google.maps.LatLng(3.3759493, -76.5355789);
var opciones = {
center: latLng_univalle,
center: latLng_student_campus,
zoom: 14
};

var map = new google.maps.Map(document.getElementById('mapa'), opciones);

var initial_marker = new google.maps.Marker({
position: latLng_univalle,
position: latLng_student_campus,
map: map,
title: 'Universidad del Valle'
});
Expand Down Expand Up @@ -416,4 +420,4 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j
}
}
}
})
});
5 changes: 4 additions & 1 deletion amd/src/global_grade_book.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j




$(document).on('blur', '.text', function () {
if (validateNota($(this))) {
var id = $(this).attr('id').split("_");
Expand Down Expand Up @@ -131,7 +132,6 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j


$(document).on('click', '.reload', function () {

location.reload();
});

Expand Down Expand Up @@ -205,12 +205,14 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j
$("#user-grades a").removeAttr("href");

$('.cat').each(function () {
$(this).css('background-color', 'rgb(225, 228, 254)');
var input = $(this).children().next('.text');
input.attr('disabled', true);
input.css('font-weight', 'bold');
});

$('.course').each(function () {
$(this).css('background-color', 'rgb(225, 228, 254)');
var input = $(this).children().next('.text');
input.attr('disabled', true);
input.css('font-weight', 'bold');
Expand Down Expand Up @@ -295,6 +297,7 @@ define(['jquery', 'block_ases/bootstrap', 'block_ases/sweetalert', 'block_ases/j
}
}
}

}
};
});
Expand Down
10 changes: 8 additions & 2 deletions amd/src/student_profile_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ define(['jquery',
var ciudad_est = $('#municipio_act').val();
var latitude = $('#latitude').val();
var longitude = $('#longitude').val();
const LATLNG_CAMPUS_MELENDEZ = new google.maps.LatLng(3.3741569,-76.5355235);
const LATLNG_CAMPUS_SANFER = new google.maps.LatLng(3.431626, -76.546822);

var cod_programa_activo = document.querySelector('#cod_programa_activo').dataset.info;
var cod_facultad = cod_programa_activo[1];
var latLng_student_campus = (cod_facultad === '6' || cod_facultad === '8')?LATLNG_CAMPUS_SANFER:LATLNG_CAMPUS_MELENDEZ;

// Agrega iframe para Google Maps
if (ciudad_est == 'CALI') {

document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=transit'></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=transit'></iframe>";

} else {

document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination=3.3759493,-76.5355789&mode=driving'></iframe>";
document.getElementById('mapa').innerHTML = "<iframe class='col-xs-12 col-sm-12 col-md-12 col-lg-12' height='396' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/directions?key=AIzaSyAoE-aPVfruphY4V4BbE8Gdwi93x-5tBTM&origin=" + latitude + "," + longitude + "&destination="+latLng_student_campus.lat()+","+latLng_student_campus.lng()+"&mode=driving'></iframe>";
}


Expand Down
Loading

0 comments on commit 6f7683b

Please sign in to comment.