Browse Source

HUE-3457 [assist] Assist is not showing up in old editors

Johan Ahlen 9 years ago
parent
commit
97862352b5

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1142,7 +1142,7 @@
       var checkForElements = function () {
       var checkForElements = function () {
         var $allPanels = $container.children('.assist-inner-panel');
         var $allPanels = $container.children('.assist-inner-panel');
         var $allExtras = $container.children('.assist-fixed-height');
         var $allExtras = $container.children('.assist-fixed-height');
-        if (panelDefinitions().length == $allPanels.length && $allExtras.length > 0) {
+        if (panelDefinitions().length == $allPanels.length && ($allExtras.length > 0 || options.noFixedHeights)) {
           ko.bindingHandlers.assistVerticalResizer.updateWhenRendered(element, valueAccessor);
           ko.bindingHandlers.assistVerticalResizer.updateWhenRendered(element, valueAccessor);
         } else {
         } else {
           timeout = window.setTimeout(checkForElements, 10);
           timeout = window.setTimeout(checkForElements, 10);

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

@@ -758,7 +758,7 @@ from desktop.views import _ko
 
 
   <script type="text/html" id="assist-panel-template">
   <script type="text/html" id="assist-panel-template">
     <!-- ko if: (searchInput() === '' && !searchHasFocus()) || ! navigatorEnabled() -->
     <!-- ko if: (searchInput() === '' && !searchHasFocus()) || ! navigatorEnabled() -->
-    <div style="position:relative; height: 100%; overflow: hidden" data-bind="assistVerticalResizer: { panels: visiblePanels, assistHelper: assistHelper }">
+    <div style="position:relative; height: 100%; overflow: hidden" data-bind="assistVerticalResizer: { panels: visiblePanels, assistHelper: assistHelper, noFixedHeights: onlySql }">
       <!-- ko template: { if: navigatorEnabled, name: 'assist-panel-navigator-search' }--><!-- /ko -->
       <!-- ko template: { if: navigatorEnabled, name: 'assist-panel-navigator-search' }--><!-- /ko -->
       <!-- ko template: { if: availablePanels.length > 1, name: 'assist-panel-switches' }--><!-- /ko -->
       <!-- ko template: { if: availablePanels.length > 1, name: 'assist-panel-switches' }--><!-- /ko -->
       <div data-bind="visible: visiblePanels().length === 0" style="margin:10px; font-style: italic; display:none;">${_('Select your assist contents above.')}</div>
       <div data-bind="visible: visiblePanels().length === 0" style="margin:10px; font-style: italic; display:none;">${_('Select your assist contents above.')}</div>