소스 검색

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

Enrico Berti 8 년 전
부모
커밋
9244fa2
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      desktop/core/src/desktop/templates/common_dashboard.mako
  2. 1 0
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

+ 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