Browse Source

HUE-8250 [dashboard] Remove widget toolbar on Gridster

Enrico Berti 7 years ago
parent
commit
97d65004af

+ 2 - 0
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -79,6 +79,7 @@
   </div>
   %endif
 
+  % if not USE_NEW_ADD_METHOD.get():
   <!-- ko if: columns().length > 0 && isToolbarVisible -->
   <div data-bind="dockable: { scrollable: '.page-content', jumpCorrection: 50, topSnap: '${ conf.CUSTOM.BANNER_TOP_HTML.get() and "128px" or "100px" }', triggerAdjust: 50 }">
     %if hasattr(caller, "results"):
@@ -100,6 +101,7 @@
     %endif
   </div>
   <!-- /ko -->
+  % endif
   <div class="clearfix"></div>
 </div>
 

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

@@ -135,7 +135,7 @@ from dashboard.conf import USE_GRIDSTER, USE_NEW_ADD_METHOD, HAS_REPORT_ENABLED,
       <!-- ko if: $root.isGridster() -->
       <div class="btn-group">
         % if USE_NEW_ADD_METHOD.get():
-        <a class="btn draggable-plus-button move-cursor" title="${ _('Drag to add a widget') }" rel="tooltip" data-placement="bottom" data-bind="draggable: {data: $root.collection.supportAnalytics() ? draggableBucket() : draggableBar(), options: getDraggableOptions({ data: $root.collection.supportAnalytics() ? draggableBucket() : draggableBar(), plusButton: true })}, visible: columns().length, click: function() { isToolbarVisible(!isToolbarVisible()) }, css: {'btn': true, 'btn-inverse': isToolbarVisible }">
+        <a class="btn draggable-plus-button move-cursor" title="${ _('Drag to add a widget') }" rel="tooltip" data-placement="bottom" data-bind="draggable: {data: $root.collection.supportAnalytics() ? draggableBucket() : draggableBar(), options: getDraggableOptions({ data: $root.collection.supportAnalytics() ? draggableBucket() : draggableBar(), plusButton: true })}, visible: columns().length">
           <i class="fa fa-plus"></i>
         </a>
         % else: