From c9926802097059594cd298c5b69f9819718a6627 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 11 Oct 2014 15:35:56 +0200 Subject: [PATCH 1/2] Meta and Middle click not triggering new tab --- couchpotato/static/scripts/couchpotato.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index 19b9f455..2da96a7c 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -54,16 +54,22 @@ }, pushState: function(e){ - if((!e.meta && Browser.platform.mac) || (!e.control && !Browser.platform.mac)){ + var self = this; + + if((!e.meta && self.isMac()) || (!e.control && !self.isMac())){ (e).preventDefault(); var url = e.target.get('href'); - if(History.getPath() != url) + + // Middle click + if(e.event && e.event.button == 1) + window.open(url); + else if(History.getPath() != url) History.push(url); } }, isMac: function(){ - return Browser.platform.mac + return Browser.platform == 'mac' }, createLayout: function(){ @@ -325,11 +331,12 @@ }, openDerefered: function(e, el){ + var self = this; (e).stop(); var url = 'http://www.dereferer.org/?' + el.get('href'); - if(el.get('target') == '_blank' || (e.meta && Browser.platform.mac) || (e.control && !Browser.platform.mac)) + if(el.get('target') == '_blank' || (e.meta && self.isMac()) || (e.control && !self.isMac())) window.open(url); else window.location = url; From d31a2e2768adea48fd34a890ab7af46d14f358d1 Mon Sep 17 00:00:00 2001 From: Joshua McKinney Date: Sun, 12 Oct 2014 03:01:20 +1100 Subject: [PATCH 2/2] Fix default permissions on files to remove execute bits on files #4053 --- couchpotato/core/_base/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/_base/_core.py b/couchpotato/core/_base/_core.py index 78d54714..320131b8 100644 --- a/couchpotato/core/_base/_core.py +++ b/couchpotato/core/_base/_core.py @@ -290,7 +290,7 @@ config = [{ }, { 'name': 'permission_file', - 'default': '0755', + 'default': '0644', 'label': 'File CHMOD', 'description': 'See Folder CHMOD description, but for files', },