|
|
@@ -366,26 +366,21 @@
|
|
|
};
|
|
|
|
|
|
HueFileEntry.prototype.open = function (entry, e) {
|
|
|
- var isLeftButton = (e.which || e.button) === 1;
|
|
|
- var hasModifierKey = e.ctrlKey || e.shiftKey || e.metaKey;
|
|
|
var self = this;
|
|
|
- if (isLeftButton && !hasModifierKey) {
|
|
|
- e.stopPropagation();
|
|
|
- e.preventDefault();
|
|
|
- if (self.definition().type === 'directory') {
|
|
|
- self.makeActive();
|
|
|
- huePubSub.publish('file.browser.directory.opened');
|
|
|
- if (! self.loaded()) {
|
|
|
- self.load();
|
|
|
- }
|
|
|
- } else {
|
|
|
- window.location.href = self.definition().absoluteUrl;
|
|
|
+ if (self.definition().type === 'directory') {
|
|
|
+ self.makeActive();
|
|
|
+ huePubSub.publish('file.browser.directory.opened');
|
|
|
+ if (!self.loaded()) {
|
|
|
+ self.load();
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- if (self.definition().type !== 'directory') {
|
|
|
+ if (e && ((e.which || e.button) !== 1 || (e.ctrlKey || e.shiftKey || e.metaKey))) {
|
|
|
window.open(self.definition().absoluteUrl);
|
|
|
}
|
|
|
+ else {
|
|
|
+ window.location.href = self.definition().absoluteUrl;
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|