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
a42a3708
Commit
a42a3708
authored
2 years ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Table recap: efface données client cachées si erreur.
parent
cb21043f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/static/js/table_recap.js
+82
-74
82 additions, 74 deletions
app/static/js/table_recap.js
with
82 additions
and
74 deletions
app/static/js/table_recap.js
+
82
−
74
View file @
a42a3708
...
@@ -14,6 +14,8 @@ $(function () {
...
@@ -14,6 +14,8 @@ $(function () {
const
url
=
new
URL
(
document
.
URL
);
const
url
=
new
URL
(
document
.
URL
);
const
formsemestre_id
=
url
.
searchParams
.
get
(
"
formsemestre_id
"
);
const
formsemestre_id
=
url
.
searchParams
.
get
(
"
formsemestre_id
"
);
const
order_info_key
=
JSON
.
stringify
([
url
.
pathname
,
formsemestre_id
]);
const
order_info_key
=
JSON
.
stringify
([
url
.
pathname
,
formsemestre_id
]);
const
etudids_key
=
JSON
.
stringify
([
"
etudids
"
,
url
.
origin
,
formsemestre_id
]);
const
noms_key
=
JSON
.
stringify
([
"
noms
"
,
url
.
origin
,
formsemestre_id
]);
let
order_info
;
let
order_info
;
if
(
formsemestre_id
)
{
if
(
formsemestre_id
)
{
const
x
=
localStorage
.
getItem
(
order_info_key
);
const
x
=
localStorage
.
getItem
(
order_info_key
);
...
@@ -157,6 +159,7 @@ $(function () {
...
@@ -157,6 +159,7 @@ $(function () {
}
}
});
});
}
}
try
{
let
table
=
$
(
'
table.table_recap
'
).
DataTable
(
let
table
=
$
(
'
table.table_recap
'
).
DataTable
(
{
{
paging
:
false
,
paging
:
false
,
...
@@ -226,14 +229,19 @@ $(function () {
...
@@ -226,14 +229,19 @@ $(function () {
document
.
querySelectorAll
(
"
td.identite_court
"
).
forEach
(
e
=>
{
document
.
querySelectorAll
(
"
td.identite_court
"
).
forEach
(
e
=>
{
noms
.
push
(
e
.
dataset
.
nomprenom
);
noms
.
push
(
e
.
dataset
.
nomprenom
);
});
});
const
etudids_key
=
JSON
.
stringify
([
"
etudids
"
,
url
.
origin
,
formsemestre_id
]);
localStorage
.
setItem
(
etudids_key
,
JSON
.
stringify
(
etudids
));
localStorage
.
setItem
(
etudids_key
,
JSON
.
stringify
(
etudids
));
const
noms_key
=
JSON
.
stringify
([
"
noms
"
,
url
.
origin
,
formsemestre_id
]);
localStorage
.
setItem
(
noms_key
,
JSON
.
stringify
(
noms
));
localStorage
.
setItem
(
noms_key
,
JSON
.
stringify
(
noms
));
},
},
"
order
"
:
order_info
,
"
order
"
:
order_info
,
}
}
);
);
}
catch
(
error
)
{
// l'erreur peut etre causee par un ancien storage:
localStorage
.
removeItem
(
etudids_key
);
localStorage
.
removeItem
(
noms_key
);
localStorage
.
removeItem
(
order_info_key
);
location
.
reload
();
}
update_buttons_labels
(
table
);
update_buttons_labels
(
table
);
});
});
$
(
'
table.table_recap tbody
'
).
on
(
'
click
'
,
'
tr
'
,
function
()
{
$
(
'
table.table_recap tbody
'
).
on
(
'
click
'
,
'
tr
'
,
function
()
{
...
...
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