浏览代码

HUE-7949 [dashboard] Fix hidden x-overflow problems and autofit widgets over time

Enrico Berti 7 年之前
父节点
当前提交
847b56075d

文件差异内容过多而无法显示
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue-embedded.css


文件差异内容过多而无法显示
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


文件差异内容过多而无法显示
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 4 - 0
desktop/core/src/desktop/static/desktop/less/components/hue-gridster.less

@@ -70,6 +70,10 @@
     .hue-ease-transition(opacity);
   }
 
+  .gs-resize-handle-x {
+    right: 0;
+  }
+
   .empty-gridster-widget {
     height: 215px;
   }

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

@@ -3995,6 +3995,19 @@ $(document).ready(function () {
     });
   }
 
+  window.setInterval(function () {
+    if (searchViewModel.isGridster()) {
+      var $gridster = $('.gridster>ul').data('gridster');
+      searchViewModel.gridItems().forEach(function (existingWidget) {
+        var scrollDifference = existingWidget.gridsterElement.scrollHeight - existingWidget.gridsterElement.clientHeight;
+        if (scrollDifference > 0) {
+          existingWidget.size_y(existingWidget.size_y() + Math.ceil(scrollDifference / WIDGET_BASE_HEIGHT));
+          $gridster.resize_widget($(existingWidget.gridsterElement), existingWidget.size_x(), existingWidget.size_y());
+        }
+      });
+    }
+  }, 1000, 'dashboard');
+
   var tempDraggable = null;
   var skipRestoreOnStop = false;
   huePubSub.subscribe('dashboard.top.widget.drag.start', function (options) {

部分文件因为文件数量过多而无法显示