Pārlūkot izejas kodu

HUE-6434 [assist] Open S3 files in the file browser on click

Johan Ahlen 8 gadi atpakaļ
vecāks
revīzija
b86cfd0

+ 10 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistS3Entry.js

@@ -176,9 +176,18 @@ var AssistS3Entry = (function () {
     return parts;
   };
 
-  AssistS3Entry.prototype.toggleOpen = function () {
+  AssistS3Entry.prototype.toggleOpen = function (data, event) {
     var self = this;
     if (self.definition.type === 'file') {
+      if (IS_HUE_4) {
+        if (event.ctrlKey || event.metaKey || event.which === 2) {
+          window.open('/hue' + self.definition.url, '_blank');
+        } else {
+          huePubSub.publish('open.link', self.definition.url);
+        }
+      } else {
+        window.open(self.definition.url, '_blank');
+      }
       return;
     }
     self.open(!self.open());