Forráskód Böngészése

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

Enrico Berti 7 éve
szülő
commit
2e93f17c65

+ 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;