Browse Source

HUE-8276 [dashboard] Allow deleting the filter bar and grid widget on standard mode

Enrico Berti 7 years ago
parent
commit
f852bb2a5d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      desktop/core/src/desktop/templates/common_dashboard.mako

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

@@ -416,11 +416,9 @@
       <!-- ko if: typeof $root.collection == 'undefined' || $root.collection.getFacetById(id()) == null -->
       <!-- ko if: typeof $root.collection == 'undefined' || $root.collection.getFacetById(id()) == null -->
         <span data-bind="editable: name, editableOptions: { enabled: true, placement: 'right' }" title="${ _('Click to change the widget title') }"></span>
         <span data-bind="editable: name, editableOptions: { enabled: true, placement: 'right' }" title="${ _('Click to change the widget title') }"></span>
       <!-- /ko -->
       <!-- /ko -->
-      <!-- ko if: $root.isGridster() && widgetType() !== 'resultset-widget' && widgetType() !== 'filter-widget' -->
-      <div class="inline pull-right margin-right-10">
+      <div class="inline pull-right margin-right-10" data-bind="visible: !$root.hasNewAdd() || ($root.hasNewAdd() && widgetType() !== 'resultset-widget' && widgetType() !== 'filter-widget')">
         <a href="javascript:void(0)" class="remove-widget" data-bind="click: $root.removeWidget"><i class="fa fa-times"></i></a>
         <a href="javascript:void(0)" class="remove-widget" data-bind="click: $root.removeWidget"><i class="fa fa-times"></i></a>
       </div>
       </div>
-      <!-- /ko -->
     </h2>
     </h2>
     <div class="card-body" style="padding: 5px;">
     <div class="card-body" style="padding: 5px;">
       <div data-bind="template: { name: function() { return widgetType(); }}" class="widget-main-section"></div>
       <div data-bind="template: { name: function() { return widgetType(); }}" class="widget-main-section"></div>