Browse Source

HUE-7977 [frontend] Use delayedOverflow on the top search result list, chart Y axis on editor, file chooser and dashboard widgets

Enrico Berti 7 years ago
parent
commit
8d369f3250

+ 4 - 0
desktop/core/src/desktop/static/desktop/js/jquery.filechooser.js

@@ -358,6 +358,10 @@
           'white-space': 'nowrap'
         });
 
+        if (ko && ko.bindingHandlers.delayedOverflow) {
+          ko.bindingHandlers.delayedOverflow.init($scrollingBreadcrumbs[0]);
+        }
+
         if (_parent.options.showExtraHome) {
           var _extraHome = $("<li>");
           var _extraHomelink = $("<a>").addClass("nounderline").html('<i class="fa ' + _parent.options.extraHomeProperties.icon + '"></i> ' + _parent.options.extraHomeProperties.label).css("cursor", "pointer").click(function () {

+ 1 - 1
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -420,7 +420,7 @@
         <a href="javascript:void(0)" class="remove-widget" data-bind="click: $root.removeWidget"><i class="fa fa-times"></i></a>
       </div>
     </h2>
-    <div class="card-body" style="padding: 5px;">
+    <div class="card-body" style="padding: 5px;" data-bind="delayedOverflow">
       <div data-bind="template: { name: function() { return widgetType(); }}" class="widget-main-section"></div>
       <div class="clearfix"></div>
     </div>

+ 1 - 1
desktop/core/src/desktop/templates/ko_components/ko_global_search.mako

@@ -52,7 +52,7 @@ from desktop.views import _ko
     <!-- /ko -->
     <!-- ko if: searchResultCategories().length > 0 -->
     <div class="global-search-results" data-bind="onClickOutside: onResultClickOutside, style: { 'height' : heightWhenDragging }">
-      <div class="global-search-alternatives" data-bind="css: { 'global-search-full-width': !selectedResult() }" style="position: relative">
+      <div class="global-search-alternatives" data-bind="css: { 'global-search-full-width': !selectedResult() }, delayedOverflow" style="position: relative">
         <!-- ko foreach: searchResultCategories -->
         <div class="global-search-category">
           <div class="global-search-category-header" data-bind="text: label"></div>

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1313,7 +1313,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
       <li data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.MAP" class="nav-header">${_('longitude')}</li>
     </ul>
 
-    <div style="overflow-y: auto; max-height: 220px" data-bind="visible: chartType() != '' && ((chartType() == ko.HUE_CHARTS.TYPES.BARCHART && !chartXPivot()) || chartType() == ko.HUE_CHARTS.TYPES.LINECHART || chartType() == ko.HUE_CHARTS.TYPES.TIMELINECHART)">
+    <div style="max-height: 220px" data-bind="delayedOverflow, visible: chartType() != '' && ((chartType() == ko.HUE_CHARTS.TYPES.BARCHART && !chartXPivot()) || chartType() == ko.HUE_CHARTS.TYPES.LINECHART || chartType() == ko.HUE_CHARTS.TYPES.TIMELINECHART)">
       <ul class="unstyled" data-bind="foreach: result.cleanedNumericMeta" style="margin-bottom: 0">
         <li><label class="checkbox"><input type="checkbox" data-bind="checkedValue: name, checked: $parent.chartYMulti" /> <span data-bind="text: $data.name"></span></label></li>
       </ul>