Procházet zdrojové kódy

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

Enrico Berti před 8 roky
rodič
revize
fe37ef1

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 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());
+        }
       },
     }
   });

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů