Browse Source

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

Enrico Berti 7 years ago
parent
commit
847b560

File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue-embedded.css


File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


File diff suppressed because it is too large
+ 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) {

Some files were not shown because too many files changed in this diff