Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Milleville
SCODOC_R6A06
Commits
47f17157
Commit
47f17157
authored
11 months ago
by
Iziram
Browse files
Options
Downloads
Patches
Plain Diff
update etud_info : func attach_etud_info
parent
10b7b876
Branches
master
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/static/js/assiduites.js
+9
-0
9 additions, 0 deletions
app/static/js/assiduites.js
app/static/js/etud_info.js
+50
-2
50 additions, 2 deletions
app/static/js/etud_info.js
with
59 additions
and
2 deletions
app/static/js/assiduites.js
+
9
−
0
View file @
47f17157
...
...
@@ -263,6 +263,8 @@ function creerLigneEtudiant(etud, index) {
// div index avec l'index
const
indexDiv
=
document
.
createElement
(
"
div
"
);
indexDiv
.
classList
.
add
(
"
index
"
);
indexDiv
.
id
=
`etudid-
${
etud
.
id
}
`
;
indexDiv
.
textContent
=
index
;
ligneEtud
.
appendChild
(
indexDiv
);
...
...
@@ -280,6 +282,7 @@ function creerLigneEtudiant(etud, index) {
const
nameSet
=
document
.
createElement
(
"
a
"
);
nameSet
.
classList
.
add
(
"
name_set
"
);
nameSet
.
id
=
`etudid-
${
etud
.
id
}
`
;
nameSet
.
href
=
`bilan_etud?etudid=
${
etud
.
id
}
`
;
const
nom
=
document
.
createElement
(
"
h4
"
);
...
...
@@ -426,6 +429,12 @@ function creerLigneEtudiant(etud, index) {
ligneEtud
.
appendChild
(
btnsField
);
// Attache les infos de l'étudiant (bulle etud_info)
try
{
attach_etud_info
(
nameSet
);
attach_etud_info
(
indexDiv
);
}
catch
{}
return
ligneEtud
;
}
...
...
This diff is collapsed.
Click to expand it.
app/static/js/etud_info.js
+
50
−
2
View file @
47f17157
...
...
@@ -14,7 +14,7 @@ function get_etudid_from_elem(e) {
}
$
().
ready
(
function
()
{
if
(
typeof
SCO_URL
==
'
undefined
'
)
{
if
(
typeof
SCO_URL
==
"
undefined
"
)
{
return
;
}
var
elems
=
$
(
"
.etudinfo:not(th)
"
);
...
...
@@ -38,7 +38,10 @@ $().ready(function () {
$
(
elems
[
i
]).
qtip
({
content
:
{
ajax
:
{
url
:
`
${
SCO_URL
}
etud_info_html?etudid=`
+
get_etudid_from_elem
(
elems
[
i
])
+
qs
,
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);
...
...
@@ -63,3 +66,48 @@ $().ready(function () {
});
}
});
// Fonction pour attacher un tooltip a un élément
// e est l'élément HTML
// son id doit être de la forme "...-{etudid}"
// ou bien son id est "{etudid}"
function
attach_etud_info
(
e
)
{
var
q_args
=
get_query_args
();
const
args_to_pass
=
new
Set
([
"
formsemestre_id
"
,
"
group_ids
"
,
"
group_id
"
,
"
partition_id
"
,
"
moduleimpl_id
"
,
"
evaluation_id
"
,
]);
let
qs
=
""
;
for
(
var
k
in
q_args
)
{
if
(
args_to_pass
.
has
(
k
))
{
qs
+=
"
&
"
+
k
+
"
=
"
+
q_args
[
k
];
}
}
const
etudid
=
get_etudid_from_elem
(
e
);
$
(
e
).
qtip
({
content
:
{
ajax
:
{
url
:
`
${
SCO_URL
}
etud_info_html?etudid=`
+
etudid
+
qs
,
type
:
"
GET
"
,
},
},
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' }
});
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment