瀏覽代碼

HUE-7949 [dashboard] Improved text widget filter display

Enrico Berti 7 年之前
父節點
當前提交
b767bd1

文件差異過大導致無法顯示
+ 0 - 0
desktop/libs/dashboard/src/dashboard/static/dashboard/css/common_dashboard.css


文件差異過大導致無法顯示
+ 0 - 0
desktop/libs/dashboard/src/dashboard/static/dashboard/css/search.css


+ 5 - 0
desktop/libs/dashboard/src/dashboard/static/dashboard/less/common_dashboard.less

@@ -465,6 +465,11 @@
       box-sizing: border-box;
       height: 25px;
       border-radius: 4px;
+      opacity: .5;
+      .hue-ease-transition(opacity);
+      &:hover, &:focus {
+        opacity: 1;
+      }
     }
   }
 

+ 7 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/less/search.less

@@ -800,7 +800,13 @@
 
   .facet-count {
     overflow: auto;
-    max-height: 110px;
+    max-height: 230px;
+    margin-top: 5px;
+    .no-results {
+      color: @cui-gray-600;
+      font-style: italic;
+      white-space: normal;
+    }
   }
 
   .gridster {

+ 7 - 0
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -755,6 +755,7 @@ ${ dashboard.layout_skeleton(suffix='search') }
               }
             } --><!-- /ko -->
           </div>
+          <!-- ko if: $parent.countsFiltered().length -->
           <div data-bind="foreach: $parent.countsFiltered" class="facet-count">
             <div class="trigger-exclude">
                 <!-- ko if: $index() < $parent.properties.limit() -->
@@ -793,6 +794,12 @@ ${ dashboard.layout_skeleton(suffix='search') }
                 <!-- /ko -->
             </div>
           </div>
+          <!-- /ko -->
+          <!-- ko ifnot: $parent.countsFiltered().length -->
+            <div class="facet-count">
+              <span class="no-results">${ _('No results found.') }</span>
+            </div>
+          <!-- /ko -->
        <!-- /ko -->
        <!-- ko ifnot: properties.facets()[0].multiselect -->
         <select data-bind="selectize: $parent.counts, optionsText: 'text', optionsValue:'value', value: $parent.countsSelected"/>

部分文件因文件數量過多而無法顯示