فهرست منبع

[about] Page becomes blank when check config finishes

Caused by font awesome spinner being removed from the page.
Simply moving it to a place that it can't be seen.
Abraham Elmahrek 11 سال پیش
والد
کامیت
83c3c18457
2فایلهای تغییر یافته به همراه18 افزوده شده و 4 حذف شده
  1. 12 3
      apps/about/src/about/templates/admin_wizard.mako
  2. 6 1
      desktop/core/src/desktop/templates/common_header.mako

+ 12 - 3
apps/about/src/about/templates/admin_wizard.mako

@@ -58,8 +58,11 @@ ${ header.menubar() }
 
               <div class="card-body">
                 <div id="check-config-section" style="margin-bottom:20px">
-                  <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 60px; color: #DDD"></i><!--<![endif]-->
-                  <!--[if IE]><img src="/static/art/spinner.gif" /><![endif]-->
+                  <div class="spinner">
+                    <!--[if !IE]> --><i class="fa fa-spinner fa-spin" style="font-size: 60px; color: #DDD"></i><!-- <![endif]-->
+                    <!--[if IE]><img src="/static/art/spinner.gif" /><![endif]-->
+                  </div>
+                  <div class="info hide"></div>
                 </div>
               </div>
             </div>
@@ -260,10 +263,16 @@ ${ header.menubar() }
 <script src="/static/ext/js/routie-0.3.0.min.js" type="text/javascript" charset="utf-8"></script>
 
 <script type="text/javascript" charset="utf-8">
+
 $(document).ready(function(){
 
   $.get("${ url('desktop.views.check_config') }", function(response) {
-    $("#check-config-section").html(response);
+    $("#check-config-section .spinner").css({
+      'position': 'absolute',
+      'top': '-100px'
+    });
+    $("#check-config-section .info").html(response);
+    $("#check-config-section .info").removeClass('hide');
   })
   .fail(function() { $(document).trigger('error', '${ _("Check config failed: ")}'); });
 

+ 6 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -57,6 +57,7 @@ from django.utils.translation import ugettext as _
     % if conf.CUSTOM.BANNER_TOP_HTML.get():
       body {
         display: none;
+        visibility: hidden;
         padding-top: ${str(int(padding[:-2]) + 30) + 'px'};
       }
       .banner {
@@ -77,6 +78,7 @@ from django.utils.translation import ugettext as _
     % else:
       body {
         display: none;
+        visibility: hidden;
         padding-top: ${padding};
       }
     % endif
@@ -142,7 +144,10 @@ from django.utils.translation import ugettext as _
     $(document).ready(function () {
       // prevents framebusting and clickjacking
       if (self == top){
-        $("body").show();
+        $("body").css({
+          'display': 'block',
+          'visibility': 'visible'
+        });
       }
       else {
         top.location = self.location;