Преглед изворни кода

HUE-7216 [presentation] Close the editor mode when leaving by other links than the exit button

Romain Rigaux пре 8 година
родитељ
комит
f26f96f
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      desktop/core/src/desktop/templates/hue.mako

+ 8 - 1
desktop/core/src/desktop/templates/hue.mako

@@ -770,7 +770,14 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
           opts.callback(self.processHeaders(opts.response));
         });
 
-        self.loadApp = function(app){
+        self.loadApp = function(app) {
+          if (self.currentApp() == 'editor') {
+           var vm = ko.dataFor($('#editorComponents')[0]);
+            if (vm.isPresentationMode()) {
+              vm.isPresentationMode(false);
+            }
+          }
+
           self.currentApp(app);
           if (!app.startsWith('security')) {
             self.lastContext = null;