]> git.parisson.com Git - teleforma.git/commitdiff
fix loading icon
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 22 Jul 2014 15:58:48 +0000 (17:58 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 22 Jul 2014 15:58:48 +0000 (17:58 +0200)
teleforma/exam/templates/exam/script_form.html
teleforma/static/teleforma/images/loading.gif [new file with mode: 0644]

index 47d5d3b524c889741081e6b3bb029a547d55e9f8..d4e0480b97275374f6cdbb9e565e5ced0340a078 100644 (file)
@@ -6,15 +6,15 @@
 
 {% block extra_javascript %}
   <script>
-    // increase the default animation speed to exaggerate the effect
+    $('#loading').hide();
     $(function() {
-        var b2 = $('#submit_button');
-        b2.unbind('click').click(function() {
+        $('#submit_button').unbind('click').click(function() {
             $(window).unbind('beforeunload');
             // b2.unbind('click');
             $('#id_status').val("2");
             $('#id_period').val("{{ period.id }}");
-            $(this).switchClass("icon_ok", "icon_wait");
+            $(this).hide();
+            $('#loading').show();
             $('#_ScriptForm').submit();
         });
     });
@@ -56,6 +56,7 @@
     <br />
     <center>
     <a href="#" id="submit_button" class="component_icon button icon_ok">{% trans "Submit" %}</a>
+    <img id="loading" src="{{STATIC_URL}}teleforma/images/loading.gif" style="vertical-align:middle" alt="loading" />
     </center>
     <br /><br />
 
diff --git a/teleforma/static/teleforma/images/loading.gif b/teleforma/static/teleforma/images/loading.gif
new file mode 100644 (file)
index 0000000..360615d
Binary files /dev/null and b/teleforma/static/teleforma/images/loading.gif differ