Browse Source

modif style

master V2
BARRAUX Arthur 3 years ago
parent
commit
82cc066a60
  1. 4
      referant/js/admin.js
  2. 30
      stylepage.css

4
referant/js/admin.js

@ -2,19 +2,17 @@ function Edit(clas) {
let obj = document.getElementsByClassName(clas); let obj = document.getElementsByClassName(clas);
let data = new FormData(); let data = new FormData();
if (obj[2].querySelector('input').value == 'edit') { if (obj[2].querySelector('input').value == 'edit') {
obj[1].innerHTML = '<input type="text" style="width: 80%;" value="' + obj[1].textContent + '">'; obj[1].innerHTML = '<input type="text" style="width: 100px;" value="' + obj[1].textContent + '">';
obj[2].querySelector('input').value = 'ok'; obj[2].querySelector('input').value = 'ok';
} }
else { else {
let value = {}; let value = {};
value.login = obj[0].textContent; value.login = obj[0].textContent;
value.pwd = obj[1].querySelector('input').value; value.pwd = obj[1].querySelector('input').value;
console.log(value);
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
data.append('value', JSON.stringify(value)); data.append('value', JSON.stringify(value));
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
console.log(this.response);
obj[1].innerHTML = this.response[1]; obj[1].innerHTML = this.response[1];
obj[2].querySelector('input').value = 'edit'; obj[2].querySelector('input').value = 'edit';
} }

30
stylepage.css

@ -8,6 +8,7 @@
body{ body{
z-index: 1; z-index: 1;
font-family: monofonto;
background-color: #e5e5e5; background-color: #e5e5e5;
margin: 20px; margin: 20px;
text-align: center; text-align: center;
@ -35,10 +36,13 @@ p{
form{ form{
width: 400px; width: 20%;
position: relative; min-width: 300px;
background-color: #ffffff; background-color: #ffffff;
display: block; display: block;
position: relative;
margin: auto; margin: auto;
border-radius: 30px; border-radius: 30px;
padding: 20px; padding: 20px;
@ -94,10 +98,8 @@ form{
resize: none; resize: none;
outline: none; outline: none;
width: 100%; width: 100%;
text-align: inherit; text-align: center;
background-color: inherit; background-color: rgba(0, 0, 0, 0);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; appearance: none;
} }
@ -134,6 +136,10 @@ form{
position: relative; position: relative;
} }
.help img{
border-radius: 15px;
}
code { code {
background-color: #aaa; background-color: #aaa;
border-radius: 5px; border-radius: 5px;
@ -185,7 +191,7 @@ nav> ul > li > a{
.menu:hover{ .menu:hover{
background-color: #59184E; background-color: #59184E;
transition: 1s; transition: .25s;
border-radius: 10px; border-radius: 10px;
} }
@ -213,10 +219,15 @@ table{
border: 1px solid #84878C; border: 1px solid #84878C;
} }
th{
width: 100%;
}
td { td {
background-color: #e5e5e5; background-color: #e5e5e5;
border: 1px solid #84878C; border: 1px solid #84878C;
min-width: 20px;
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
@ -224,8 +235,9 @@ td {
color: #84878C; color: #84878C;
} }
th{ td img {
width: 100%; width: 40%;
max-width: 40px;
} }

Loading…
Cancel
Save