Эх сурвалжийг харах

HUE-7907 [frontend] Dropping on overflowing widgets should create a new widget too

Enrico Berti 7 жил өмнө
parent
commit
9244fa2374

+ 1 - 1
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -277,7 +277,7 @@
 </script>
 
 <script type="text/html" id="widget-template${ suffix }">
-  <div data-bind="attr: {'id': 'wdg_'+ id(),}, css: klass, droppable: { data: function() { $root.collection.dropOnWidget(id()) }, options:{ greedy:true }}">
+  <div data-bind="attr: {'id': 'wdg_'+ id(),}, css: klass, droppable: { data: function() { $root.collection.dropOnWidget(id()) }, options:{ greedy:true, drop: function(event, ui) { huePubSub.publish('dashboard.drop.on.page', { event: event, ui: ui } } }}">
     <h2 class="card-heading simple">
       %if not USE_GRIDSTER.get():
       <span data-bind="visible: $root.isEditing">

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

@@ -3974,6 +3974,7 @@ $(document).ready(function () {
             if (isShrinking && dropPosition.row > 1) {
               dropPosition.row++;
             }
+            restoreWidgetSizes();
           }
           else {
             // automatically resize the width of all the widgets that collide