瀏覽代碼

HUE-7949 [dashboard] Use the whole width of the page for the widgets after loading an existing dashboard

Enrico Berti 7 年之前
父節點
當前提交
6a3200b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

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

@@ -4057,6 +4057,9 @@ $(document).ready(function () {
 
   window.setInterval(function () {
     if (searchViewModel.isGridster() && !isDraggingOrResizingWidgets) {
+      if ($('.gridster li:first').width() !== $('.gridster').width()) {
+        $(window).trigger('resize');
+      }
       var $gridster = $('.gridster>ul').data('gridster');
       searchViewModel.gridItems().forEach(function (existingWidget) {
         var scrollDifference = existingWidget.gridsterElement.scrollHeight - existingWidget.gridsterElement.clientHeight;