소스 검색

HUE-8193 [dashboard] Dragging from the right assist should never show the field picker

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

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

@@ -223,7 +223,7 @@
           <a href="javascript:void(0)" class="remove-widget" data-bind="publish: { 'gridster.remove': $data }"><i class="fa fa-times"></i></a>
         </div>
       </h2>
-      <div class="empty-content" data-bind="droppable: { data: function(w) { showAddFacetDemiModal(w, $data); }, options: { greedy:true, hoverClass: 'droppable-hover', drop: function(){ huePubSub.publish('gridster.added.widget'); } }}, css: { 'query-builder': $root.isQueryBuilder }"></div>
+      <div class="empty-content" data-bind="droppable: { data: function(w) { huePubSub.publish('gridster.empty.drop', { widget: w, target: $data }); }, options: { greedy:true, hoverClass: 'droppable-hover', drop: function(){ huePubSub.publish('gridster.added.widget'); } }}, css: { 'query-builder': $root.isQueryBuilder }"></div>
     </div>
     <!-- /ko -->
   <!-- ko with: widget -->

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

@@ -4265,6 +4265,11 @@ $(document).ready(function () {
 
   huePubSub.subscribe('gridster.added.widget', removePreviewHolder, 'dashboard');
 
+  huePubSub.subscribe('gridster.empty.drop', function (options) {
+    showAddFacetDemiModal(options.widget, options.target);
+    tempDraggable = null;
+  }, 'dashboard');
+
   huePubSub.subscribe('gridster.clean.whitespace', function () {
     if (searchViewModel.isGridster()) {
       var maxRow = 0;