Skip to content
Snippets Groups Projects
Commit a1abd9a9 authored by DELARUELLE Myriam's avatar DELARUELLE Myriam
Browse files

added loader

parent ad70b6af
Branches
No related tags found
No related merge requests found
...@@ -188,6 +188,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], ...@@ -188,6 +188,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'],
//À changer pour intégrer une fonction plus générique //À changer pour intégrer une fonction plus générique
function changeGroup(){ function changeGroup(){
loadMessage("loading"); loadMessage("loading");
var completeUrl=getCompleteUrl(); var completeUrl=getCompleteUrl();
var groupscheckboxes= $('input[name="groupoptions[]"]:checked'); var groupscheckboxes= $('input[name="groupoptions[]"]:checked');
var groupsid=[]; var groupsid=[];
...@@ -448,6 +449,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], ...@@ -448,6 +449,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'],
} }
function deleteAdvancedFilter(old_data){ function deleteAdvancedFilter(old_data){
loadMessage("loading");
$('#iena-filters-tag').html(""); $('#iena-filters-tag').html("");
data=old_data; data=old_data;
$(".iena-filters #symbol-select").prop('disabled', false); $(".iena-filters #symbol-select").prop('disabled', false);
...@@ -579,6 +581,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], ...@@ -579,6 +581,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'],
} }
function deleteSearch(old_data){ function deleteSearch(old_data){
loadMessage("loading");
$('#iena-search-tag').html(""); $('#iena-search-tag').html("");
data=old_data; data=old_data;
$(".iena-filters .custom-select").prop('disabled', false); $(".iena-filters .custom-select").prop('disabled', false);
...@@ -773,8 +776,10 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], ...@@ -773,8 +776,10 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'],
//Charge message de chargement ou d'erreur //Charge message de chargement ou d'erreur
function loadMessage(type){ function loadMessage(type){
var loard="";
if(type=="loading"){ if(type=="loading"){
var message = str.get_string('loadingResults', 'format_iena'); var message = str.get_string('loadingResults', 'format_iena');
loader="<div class=loader></div>";
} }
else if(type=="error"){ else if(type=="error"){
...@@ -782,7 +787,8 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], ...@@ -782,7 +787,8 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'],
} }
$.when(message).done(function(localizedEditString) { $.when(message).done(function(localizedEditString) {
$("#partial-table").html("<div class='alert alert-primary' role='alert'>"+localizedEditString+"</div>"); $("#partial-table").html("<div class='alert alert-primary' role='alert'>"+localizedEditString+loader+"</div>");
console.log($("#partial-table"));
}); });
} }
......
...@@ -1312,4 +1312,21 @@ border-bottom: 1px solid #dee2e6; ...@@ -1312,4 +1312,21 @@ border-bottom: 1px solid #dee2e6;
#check-more-filters.disabled{ #check-more-filters.disabled{
pointer-events: none; pointer-events: none;
color:grey; color:grey;
}
/* HTML: <div class="loader"></div> */
.loader {
width: 50px;
aspect-ratio: 1;
border-radius: 50%;
background: radial-gradient(farthest-side,#2a657d 94%,#0000) top/8px 8px no-repeat,conic-gradient(#0000 30%,#2a657d);
-webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8px),#000 0);
animation: l13 1s infinite linear;
display: inline-block;
width: 20px;
line-height: 20px;
vertical-align: bottom;
}
@keyframes l13{
100%{transform: rotate(1turn)}
} }
\ No newline at end of file
...@@ -332,6 +332,7 @@ function get_progress_student($identifier, $completion, $modules){ ...@@ -332,6 +332,7 @@ function get_progress_student($identifier, $completion, $modules){
error_log($time_elapsed_secs = microtime(true) - $start); error_log($time_elapsed_secs = microtime(true) - $start);
if(count($users)>0){ if(count($users)>0){
$completion_student=array(); $completion_student=array();
$where = array(); $where = array();
$where_params = array(); $where_params = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment