From b04930870ef4433dbb1eedfaaff1fe57135644e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 26 Jul 2023 14:07:42 +0200 Subject: [PATCH] cosmetic --- app/static/css/scodoc.css | 7 +++ app/static/js/etud_info.js | 105 +++++++++++++++++++------------------ 2 files changed, 62 insertions(+), 50 deletions(-) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 5307eac4..9a4f08f4 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -1328,6 +1328,13 @@ tr.etuddem td { color: rgb(100, 100, 100); font-style: italic; } +table.gt_table tr.etuddem td a { + color: red; +} +table.gt_table tr.etuddem td.etudinfo:first-child::after { + color: red; + content: " (dem.)"; +} td.etudabs, td.etudabs a.discretelink, diff --git a/app/static/js/etud_info.js b/app/static/js/etud_info.js index f1ab66c5..ef04d0c1 100644 --- a/app/static/js/etud_info.js +++ b/app/static/js/etud_info.js @@ -3,59 +3,64 @@ // utilise jQuery / qTip function get_etudid_from_elem(e) { - // renvoie l'etudid, obtenu a partir de l'id de l'element - // qui est soit de la forme xxxx-etudid, soit tout simplement etudid - var etudid = e.id.split("-")[1]; - if (etudid == undefined) { - return e.id; - } else { - return etudid; - } + // renvoie l'etudid, obtenu a partir de l'id de l'element + // qui est soit de la forme xxxx-etudid, soit tout simplement etudid + var etudid = e.id.split("-")[1]; + if (etudid == undefined) { + return e.id; + } else { + return etudid; + } } $().ready(function () { + var elems = $(".etudinfo:not(th)"); - var elems = $(".etudinfo"); - - var q_args = get_query_args(); - var args_to_pass = new Set( - ["formsemestre_id", "group_ids", "group_id", "partition_id", - "moduleimpl_id", "evaluation_id" - ]); - var qs = ""; - for (var k in q_args) { - if (args_to_pass.has(k)) { - qs += '&' + k + '=' + q_args[k]; - } - } - for (var i = 0; i < elems.length; i++) { - $(elems[i]).qtip({ - content: { - ajax: { - url: SCO_URL + "/etud_info_html?etudid=" + get_etudid_from_elem(elems[i]) + qs, - type: "GET" - //success: function(data, status) { - // this.set('content.text', data); - // xxx called twice on each success ??? - // console.log(status); - } - }, - text: "Loading...", - position: { - at: "right bottom", - my: "left top" - }, - style: { - classes: 'qtip-etud' - }, - hide: { - fixed: true, - delay: 300 - } - // utile pour debugguer le css: - // hide: { event: 'unfocus' } - }); + var q_args = get_query_args(); + var args_to_pass = new Set([ + "formsemestre_id", + "group_ids", + "group_id", + "partition_id", + "moduleimpl_id", + "evaluation_id", + ]); + var qs = ""; + for (var k in q_args) { + if (args_to_pass.has(k)) { + qs += "&" + k + "=" + q_args[k]; } + } + for (var i = 0; i < elems.length; i++) { + $(elems[i]).qtip({ + content: { + ajax: { + url: + SCO_URL + + "/etud_info_html?etudid=" + + get_etudid_from_elem(elems[i]) + + qs, + type: "GET", + //success: function(data, status) { + // this.set('content.text', data); + // xxx called twice on each success ??? + // console.log(status); + }, + }, + text: "Loading...", + position: { + at: "right bottom", + my: "left top", + }, + style: { + classes: "qtip-etud", + }, + hide: { + fixed: true, + delay: 300, + }, + // utile pour debugguer le css: + // hide: { event: 'unfocus' } + }); + } }); - -