1
0
forked from ScoDoc/ScoDoc
ScoDoc-Front/app/templates/pn/form_modules_ue_coefs.html

55 lines
1.7 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="/ScoDoc/static/jQuery/jquery.js"></script>
<script src="/ScoDoc/static/js/table_editor.js"></script>
<link href="/ScoDoc/static/css/table_editor.css" rel="stylesheet" type="text/css" />
<title>Édition coef. formation</title>
</head>
<body>
<h2>Formation {{formation.titre}} ({{formation.acronyme}})
[version {{formation.version}}] code {{formation.code}}</h2>
<div class=wait></div>
<div class=modifOnOff>Modifier</div>
<div class="tableau"></div>
<script>
$(function () {
$.getJSON("{{data_source}}", function (data) {
build_table(data);
});
});
function save(obj) {
if (event?.currentTarget) {
obj = event.currentTarget;
}
document.querySelector(".wait").classList.remove("go");
// XXX DEBUG
console.log(`
x : ${getComputedStyle(obj).getPropertyValue("--x")}
y : ${getComputedStyle(obj).getPropertyValue("--y")}
data : ${obj.innerText}
ue_id: ${obj.dataset.ue_id}
module_id : ${obj.dataset.module_id}
`);
$.post("{{data_save}}",
{
module_id: `${obj.dataset.module_id}`,
ue_id: `${obj.dataset.ue_id}`,
coef: `${obj.innerText}`
},
function (result) {
console.log("enregistré");
}
);
}
</script>
</body>
</html>