Explorar o código

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

Romain Rigaux %!s(int64=8) %!d(string=hai) anos
pai
achega
f26f96f53e
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  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;