Added New Loader bar to import

remotes/angel/1.11.x
José Loguercio 8 years ago
parent 7c2af3bcfb
commit 029e45d075
  1. 270
      app/Resources/public/css/base.css
  2. 8
      main/coursecopy/import_moodle.php
  3. 13
      main/template/default/coursecopy/import_moodle.tpl

@ -6026,3 +6026,273 @@ footer{
#upload_form .fa-plus-square-o, #upload_form .fa-minus-square-o {
cursor:pointer;
}
@-moz-keyframes wobblebar-loader {
0% {
left: 4px;
}
3% {
left: 204px;
}
6% {
left: 4px;
}
9% {
left: 204px;
}
12% {
left: 4px;
}
15% {
left: 204px;
}
18% {
left: 32px;
}
27% {
left: 32px;
}
30% {
left: 204px;
}
33% {
left: 4px;
}
36% {
left: 204px;
}
39% {
left: 4px;
}
42% {
left: 204px;
}
45% {
left: 4px;
}
48% {
left: 204px;
}
51% {
left: 152px;
}
63% {
left: 152px;
}
66% {
left: 4px;
}
69% {
left: 204px;
}
72% {
left: 4px;
}
75% {
left: 204px;
}
78% {
left: 4px;
}
81% {
left: 204px;
}
84% {
left: 72px;
}
94% {
left: 72px;
}
97% {
left: 204px;
}
}
@-webkit-keyframes wobblebar-loader {
0% {
left: 4px;
}
3% {
left: 204px;
}
6% {
left: 4px;
}
9% {
left: 204px;
}
12% {
left: 4px;
}
15% {
left: 204px;
}
18% {
left: 32px;
}
27% {
left: 32px;
}
30% {
left: 204px;
}
33% {
left: 4px;
}
36% {
left: 204px;
}
39% {
left: 4px;
}
42% {
left: 204px;
}
45% {
left: 4px;
}
48% {
left: 204px;
}
51% {
left: 152px;
}
63% {
left: 152px;
}
66% {
left: 4px;
}
69% {
left: 204px;
}
72% {
left: 4px;
}
75% {
left: 204px;
}
78% {
left: 4px;
}
81% {
left: 204px;
}
84% {
left: 72px;
}
94% {
left: 72px;
}
97% {
left: 204px;
}
}
@keyframes wobblebar-loader {
0% {
left: 4px;
}
3% {
left: 204px;
}
6% {
left: 4px;
}
9% {
left: 204px;
}
12% {
left: 4px;
}
15% {
left: 204px;
}
18% {
left: 32px;
}
27% {
left: 32px;
}
30% {
left: 204px;
}
33% {
left: 4px;
}
36% {
left: 204px;
}
39% {
left: 4px;
}
42% {
left: 204px;
}
45% {
left: 4px;
}
48% {
left: 204px;
}
51% {
left: 152px;
}
63% {
left: 152px;
}
66% {
left: 4px;
}
69% {
left: 204px;
}
72% {
left: 4px;
}
75% {
left: 204px;
}
78% {
left: 4px;
}
81% {
left: 204px;
}
84% {
left: 72px;
}
94% {
left: 72px;
}
97% {
left: 204px;
}
}
/* :not(:required) hides this rule from IE9 and below */
.wobblebar-loader:not(:required) {
background: #2E6DA4;
-moz-border-radius: 10.66667px;
-webkit-border-radius: 10.66667px;
border-radius: 10.66667px;
display: inline-block;
overflow: hidden;
text-indent: -9999px;
width: 228px;
height: 21.33333px;
position: relative;
}
.wobblebar-loader:not(:required)::after {
-moz-animation: wobblebar-loader 15000ms infinite ease;
-webkit-animation: wobblebar-loader 15000ms infinite ease;
animation: wobblebar-loader 15000ms infinite ease;
background: white;
display: block;
-moz-border-radius: 7.11111px;
-webkit-border-radius: 7.11111px;
border-radius: 7.11111px;
content: '';
position: absolute;
top: 3.55556px;
left: 4px;
width: 21.33333px;
height: 14.22222px;
}

@ -41,7 +41,13 @@ $form->addButtonImport(get_lang('Import'));
if ($form->validate()) {
$file = $_FILES['moodle_file'];
$moodleImport = new MoodleImport();
$moodleImport->readMoodleFile($file);
$responseImport = $moodleImport->readMoodleFile($file);
if ($responseImport) {
Display::addFlash(Display::return_message(get_lang('MoodleFileImportedSuccessfull'), 'success'));
} else {
Display::addFlash(Display::return_message(get_lang('ErrorImportingFile'), 'error'));
}
header('Location: ' . api_get_self() . '?' . api_get_cidreq());
}
$templateName = get_lang('ImportFromMoodle');

@ -1,4 +1,15 @@
{{ info_msg }}
<br />
<div id="loader" class="text-center">
</div>
<br />
{{ form }}
{{ form }}
<script>
$(document).ready(function(){
$(".btn-primary").click(function() {
$("#loader").html('<div class="wobblebar-loader"></div><p> {{ 'ProcessingImportPleaseDontCloseThisWindowThisActionMayTakeLongTimePlaseWait' | get_lang }} </p>');
});
});
</script>
Loading…
Cancel
Save