diff --git a/assets/css/highContrast.css b/assets/css/highContrast.css index 47ead3c..449c6cf 100644 --- a/assets/css/highContrast.css +++ b/assets/css/highContrast.css @@ -181,8 +181,8 @@ color: #dadada; } table tbody tr { - color: #dadada; - border: solid 1px #dadada; + color: #1f2c3d; + border: solid 1px #1f2c3d; border-left: 0; border-right: 0; } @@ -193,7 +193,7 @@ padding: 0.75em 0.75em; } table th { - color: #dadada; + color: #1f2c3d; font-size: 0.9em; font-weight: 600; padding: 0.85em 0.85em 0.85em 0.85em; @@ -784,7 +784,7 @@ form select option { footer button { display: inline-block; margin: 1px; - width: 115px; + width: 120px; height: 25px; padding: 0px 0px; text-align: center; diff --git a/assets/js/cambiarCSS.js b/assets/js/cambiarCSS.js index 51e9ba6..3de430a 100644 --- a/assets/js/cambiarCSS.js +++ b/assets/js/cambiarCSS.js @@ -4,5 +4,21 @@ */ function cambiarCSS(nuevo){ - document.getElementById('estilo').setAttribute('href', nuevo); + 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"; + } + + 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(); } \ No newline at end of file diff --git a/assets/js/goBack.js b/assets/js/goBack.js new file mode 100644 index 0000000..2194701 --- /dev/null +++ b/assets/js/goBack.js @@ -0,0 +1,7 @@ +$(document).ready(function(){ + document.getElementById('go-back').addEventListener('click', function(event){ + event.preventDefault(); + history.back(); + //window.history.go(-1); + }); +}); \ No newline at end of file diff --git a/assets/js/goUp.js b/assets/js/goUp.js index 2cf01f7..d014fa7 100644 --- a/assets/js/goUp.js +++ b/assets/js/goUp.js @@ -1,4 +1,5 @@ $(document).ready(function(){ + $('.go-up').click(function(){ $('body, html').animate({ scrollTop: '0px' diff --git a/assets/js/selectTicket.js b/assets/js/selectTicket.js index 1de59c9..d765f56 100644 --- a/assets/js/selectTicket.js +++ b/assets/js/selectTicket.js @@ -10,7 +10,7 @@ window.onload = function(){ function select_cinema(){ var select = document.getElementById("select_cinema"); - console.log(select); + if(select != undefined){ select.onchange = function(){ location.href += "&cinema=" + $('select[id=cinemas]').val(); diff --git a/assets/php/common/changeCSS.php b/assets/php/common/changeCSS.php new file mode 100644 index 0000000..0424bdf --- /dev/null +++ b/assets/php/common/changeCSS.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/assets/php/template.php b/assets/php/template.php index 8e7619a..bb2f380 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -70,13 +70,15 @@ $page = $this->page; $prefix = $this->prefix; + if(!isset($_SESSION["css"])) $_SESSION["css"] = "main.css"; + $extraCSS = ""; if($page === "Comprar Entrada") $extraCSS = "\n"; echo"
Vuelva atrás para selecionar una butaca.
+