2021-05-28 14:21:10 +02:00
|
|
|
/**
|
|
|
|
* Práctica - Sistemas Web | Grupo D
|
|
|
|
* CompluCine - FDI-cines
|
|
|
|
*/
|
|
|
|
|
2021-05-26 09:03:02 +02:00
|
|
|
function cambiarCSS(nuevo){
|
2021-06-04 20:43:14 +02:00
|
|
|
/*
|
2021-06-04 12:38:17 +02:00
|
|
|
if(nuevo.includes("main.css")){
|
|
|
|
var viejo = "{$prefix}assets/css/highContrast.css";
|
|
|
|
var oldName = "Alto Contraste";
|
|
|
|
} else {
|
|
|
|
var viejo = "{$prefix}assets/css/main.css";
|
|
|
|
var oldName = "Contrast Normal";
|
|
|
|
}
|
2021-06-04 20:43:14 +02:00
|
|
|
*/
|
2021-06-04 12:38:17 +02:00
|
|
|
|
|
|
|
var url = "../assets/php/common/changeCSS.php?css=" + nuevo;
|
|
|
|
$.get(url);
|
|
|
|
|
|
|
|
/* La idea era que cambiase todo dinámicamente sin refrescar la página */
|
|
|
|
//document.getElementById('estilo').setAttribute('href', nuevo);
|
|
|
|
//document.getElementById('cssChange').innerHTML = oldName;
|
|
|
|
//document.getElementById('cssChange').setAttribute('onClick', 'cambiarCSS('+viejo+')');
|
|
|
|
|
|
|
|
location.reload();
|
2021-05-26 09:03:02 +02:00
|
|
|
}
|