Browse Source

HUE-8432 [editor] Fullscreen result does not hide assist anymore and conflict with presentation

Romain Rigaux 7 years ago
parent
commit
46374ffcde

+ 0 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -2366,7 +2366,6 @@ var EditorViewModel = (function() {
     self.isPresentationMode = ko.observable(false);
     self.isPresentationModeInitialized = ko.observable(false);
     self.isPresentationMode.subscribe(function(newValue) {
-      wasResultFullScreenMode = false;
       if (! newValue) {
         self.cancelExecutingAll();
       }

+ 4 - 5
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2118,8 +2118,6 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
   var shareViewModel = initSharing("#documentShareModal");
   % endif
 
-function togglePresentation(value) {};
-
   var isLeftNavOpen = false;
   huePubSub.subscribe('left.nav.open.toggle', function (val) {
     isLeftNavOpen = val;
@@ -3451,9 +3449,10 @@ function togglePresentation(value) {};
         } else {
           viewModel.isResultFullScreenMode(false);
         }
+        wasResultFullScreenMode = false;
       }
 
-       huePubSub.subscribe('editor.presentation.operate.toggle', function (value) {
+      huePubSub.subscribe('editor.presentation.operate.toggle', function (value) {
         viewModel.isEditing(! viewModel.isEditing());
         if (value) {
           $(".jHueNotify").remove();
@@ -3506,8 +3505,8 @@ function togglePresentation(value) {};
       }, HUE_PUB_SUB_EDITOR_ID);
 
       viewModel.isResultFullScreenMode.subscribe(function(newValue) {
-        wasResultFullScreenMode = true;
-        togglePresentation(newValue);
+        wasResultFullScreenMode = newValue;
+        huePubSub.publish('editor.presentation.operate.toggle', newValue);
       });
 
       huePubSub.subscribe('assist.set.manual.visibility', function () {