Ver Fonte

[core] Don't show spinners for each item in the assist panel

With this change it will only show the spinner when fetching the tables and databases and not when expanding columns and complex types.
Johan Ahlen há 10 anos atrás
pai
commit
5925ee3
1 ficheiros alterados com 4 adições e 5 exclusões
  1. 4 5
      desktop/core/src/desktop/templates/ko_components.mako

+ 4 - 5
desktop/core/src/desktop/templates/ko_components.mako

@@ -154,11 +154,6 @@ from desktop.views import _ko
   </script>
 
   <script type="text/html" id="assist-entries">
-    <div class="center" data-bind="visible: loading">
-      <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 20px; color: #BBB"></i><!--<![endif]-->
-      <!--[if IE]><img src="${ static('desktop/art/spinner.gif') }"/><![endif]-->
-    </div>
-
     <ul data-bind="foreach: filteredEntries, css: { 'assist-tables': definition.isDatabase }, event: { 'scroll': assistPanel.repositionActions }">
       <li data-bind="css: { 'assist-table reveals-actions-2nd': definition.isTable, 'assist-column reveals-actions-3rd': definition.isColumn }">
         <!-- ko template: { if: definition.isTable || definition.isColumn, name: 'assist-entry-actions' } --><!-- /ko -->
@@ -207,6 +202,10 @@ from desktop.views import _ko
           </li>
 
         <div class="table-container">
+          <div class="center" data-bind="visible: selectedDatabase() != null && selectedDatabase().loading()">
+            <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 20px; color: #BBB"></i><!--<![endif]-->
+            <!--[if IE]><img src="${ static('desktop/art/spinner.gif') }"/><![endif]-->
+          </div>
           <!-- ko template: { if: selectedDatabase() != null, name: 'assist-entries', data: selectedDatabase } --><!-- /ko -->
           </div>
         <!-- /ko -->