Ver Fonte

HUE-7633 [dashboard] Resizing a Gridster widget should resize its content too

Enrico Berti há 8 anos atrás
pai
commit
fe37ef1

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


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

@@ -23,6 +23,7 @@
     & > li {
       border: 1px solid @cui-gray-200;
       background: @cui-gray-050 !important;
+      overflow: hidden;
     }
   }
   .card-widget {

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

@@ -3619,8 +3619,17 @@ $(document).ready(function () {
     max_rows: 6000,
     resize: {
       enabled: true,
+      start: function (event, ui, $widget) {
+        if ($widget.find('.card-widget').length > 0) {
+          $widget.find('.card-widget').hide();
+        }
+      },
       stop: function (event, ui, $widget) {
         huePubSub.publish('resize.plotly.chart');
+        if ($widget.find('.card-widget').length > 0) {
+          $widget.find('.card-widget').show();
+          $widget.find('.card-widget').height($widget.height());
+        }
       },
     }
   });

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff