Browse Source

Content overflow hiding back button on webkit

pull/5180/head
Ruud 10 years ago
parent
commit
a514e7d9ad
  1. 2
      couchpotato/core/media/movie/_base/static/manage.js
  2. 2
      couchpotato/core/media/movie/_base/static/page.js
  3. 4
      couchpotato/core/media/movie/_base/static/wanted.js
  4. 6
      couchpotato/core/plugins/log/static/log.js
  5. 2
      couchpotato/core/plugins/userscript/static/userscript.js
  6. 26
      couchpotato/static/scripts/combined.base.min.js
  7. 16
      couchpotato/static/scripts/combined.plugins.min.js
  8. 10
      couchpotato/static/scripts/page.js
  9. 10
      couchpotato/static/scripts/page/home.js
  10. 8
      couchpotato/static/scripts/page/settings.js
  11. 3
      couchpotato/static/style/combined.min.css
  12. 7
      couchpotato/static/style/main.scss

2
couchpotato/core/media/movie/_base/static/manage.js

@ -59,7 +59,7 @@ var MoviesManage = new Class({
) )
) )
}); });
$(self.list).inject(self.el); $(self.list).inject(self.content);
// Check if search is in progress // Check if search is in progress
self.startProgressInterval(); self.startProgressInterval();

2
couchpotato/core/media/movie/_base/static/page.js

@ -13,7 +13,7 @@ Page.Movies = new Class({
self.parent(parent, options); self.parent(parent, options);
self.navigation = new BlockNavigation(); self.navigation = new BlockNavigation();
$(self.navigation).inject(self.el, 'top'); $(self.navigation).inject(self.content, 'top');
}, },

4
couchpotato/core/media/movie/_base/static/wanted.js

@ -37,7 +37,7 @@ var MoviesWanted = new Class({
'menu': [self.manual_search, self.scan_folder], 'menu': [self.manual_search, self.scan_folder],
'on_empty_element': App.createUserscriptButtons().addClass('empty_wanted') 'on_empty_element': App.createUserscriptButtons().addClass('empty_wanted')
}); });
$(self.list).inject(self.el); $(self.list).inject(self.content);
// Check if search is in progress // Check if search is in progress
self.startProgressInterval.delay(4000, self); self.startProgressInterval.delay(4000, self);
@ -101,7 +101,7 @@ var MoviesWanted = new Class({
}); });
}; };
self.folder_browser.inject(self.el, 'top'); self.folder_browser.inject(self.content, 'top');
self.folder_browser.fireEvent('injected'); self.folder_browser.fireEvent('injected');
// Hide the settings box // Hide the settings box

6
couchpotato/core/plugins/log/static/log.js

@ -41,7 +41,7 @@ Page.Log = new Class({
self.showSelectionButton.delay(100, self, e); self.showSelectionButton.delay(100, self, e);
} }
} }
}).inject(self.el); }).inject(self.content);
Api.request('logging.get', { Api.request('logging.get', {
'data': { 'data': {
@ -74,7 +74,7 @@ Page.Log = new Class({
'events': { 'events': {
'change': function () { 'change': function () {
var type_filter = this.getSelected()[0].get('value'); var type_filter = this.getSelected()[0].get('value');
self.el.set('data-filter', type_filter); self.content.set('data-filter', type_filter);
self.scrollToBottom(); self.scrollToBottom();
} }
} }
@ -110,7 +110,7 @@ Page.Log = new Class({
}).inject(nav); }).inject(nav);
// Add to page // Add to page
navigation.inject(self.el, 'top'); navigation.inject(self.content, 'top');
self.scrollToBottom(); self.scrollToBottom();
} }

2
couchpotato/core/plugins/userscript/static/userscript.js

@ -16,7 +16,7 @@ Page.Userscript = new Class({
indexAction: function(){ indexAction: function(){
var self = this; var self = this;
self.el.adopt( self.content.grab(
self.frame = new Element('div.frame.loading', { self.frame = new Element('div.frame.loading', {
'text': 'Loading...' 'text': 'Loading...'
}) })

26
couchpotato/static/scripts/combined.base.min.js

@ -664,11 +664,11 @@ var PageBase = new Class({
self.setOptions(options); self.setOptions(options);
self.el = new Element("div", { self.el = new Element("div", {
class: "page " + self.getPageClass() + (" level_" + (options.level || 0)) class: "page " + self.getPageClass() + (" level_" + (options.level || 0))
}); }).grab(self.content = new Element("div.content"));
App.addEvent("load", function() { App.addEvent("load", function() {
setTimeout(function() { setTimeout(function() {
if (!App.mobile_screen) { if (!App.mobile_screen) {
self.el.addEvent("scroll", self.preventHover.bind(self)); self.content.addEvent("scroll", self.preventHover.bind(self));
} }
}, 100); }, 100);
}); });
@ -724,8 +724,8 @@ var PageBase = new Class({
elements = self[action + "Action"](params); elements = self[action + "Action"](params);
} }
if (elements !== undefined) { if (elements !== undefined) {
self.el.empty(); self.content.empty();
self.el.adopt(elements); self.content.adopt(elements);
} }
App.getBlock("navigation").activate(self.name); App.getBlock("navigation").activate(self.name);
self.fireEvent("opened"); self.fireEvent("opened");
@ -1014,7 +1014,7 @@ Page.Home = new Class({
App.on("movie.searcher.ended", after_search); App.on("movie.searcher.ended", after_search);
} }
}); });
$(self.available_list).inject(self.el); $(self.available_list).inject(self.content);
}, },
createSoon: function() { createSoon: function() {
var self = this; var self = this;
@ -1036,7 +1036,7 @@ Page.Home = new Class({
self.chain.callChain(); self.chain.callChain();
} }
}); });
$(self.soon_list).inject(self.el); $(self.soon_list).inject(self.content);
}, },
createSuggestions: function() { createSuggestions: function() {
var self = this; var self = this;
@ -1055,7 +1055,7 @@ Page.Home = new Class({
self.chain.callChain(); self.chain.callChain();
} }
}); });
$(self.suggestions_list).inject(self.el); $(self.suggestions_list).inject(self.content);
}, },
createCharts: function() { createCharts: function() {
var self = this; var self = this;
@ -1064,7 +1064,7 @@ Page.Home = new Class({
self.chain.callChain(); self.chain.callChain();
} }
}); });
$(self.charts_list).inject(self.el); $(self.charts_list).inject(self.content);
}, },
createLate: function() { createLate: function() {
var self = this; var self = this;
@ -1086,7 +1086,7 @@ Page.Home = new Class({
self.chain.callChain(); self.chain.callChain();
} }
}); });
$(self.late_list).inject(self.el); $(self.late_list).inject(self.content);
} }
}); });
@ -1126,7 +1126,7 @@ Page.Settings = new Class({
Object.each(self.params, function(param, subtab_name) { Object.each(self.params, function(param, subtab_name) {
subtab = param; subtab = param;
}); });
self.el.getElements("li." + c + " , .tab_content." + c).each(function(active) { self.content.getElements("li." + c + " , .tab_content." + c).each(function(active) {
active.removeClass(c); active.removeClass(c);
}); });
if (t.subtabs[subtab]) { if (t.subtabs[subtab]) {
@ -1146,7 +1146,7 @@ Page.Settings = new Class({
if (onComplete) Api.request("settings", { if (onComplete) Api.request("settings", {
useSpinner: true, useSpinner: true,
spinnerOptions: { spinnerOptions: {
target: self.el target: self.content
}, },
onComplete: function(json) { onComplete: function(json) {
self.data = json; self.data = json;
@ -1166,7 +1166,7 @@ Page.Settings = new Class({
showAdvanced: function() { showAdvanced: function() {
var self = this; var self = this;
var c = self.advanced_toggle.checked ? "addClass" : "removeClass"; var c = self.advanced_toggle.checked ? "addClass" : "removeClass";
self.el[c]("show_advanced"); self.content[c]("show_advanced");
Cookie.write("advanced_toggle_checked", +self.advanced_toggle.checked, { Cookie.write("advanced_toggle_checked", +self.advanced_toggle.checked, {
duration: 365 duration: 365
}); });
@ -1226,7 +1226,7 @@ Page.Settings = new Class({
}); });
}); });
setTimeout(function() { setTimeout(function() {
self.el.adopt(self.navigation, self.tabs_container, self.containers); self.content.adopt(self.navigation, self.tabs_container, self.containers);
self.fireEvent("create"); self.fireEvent("create");
self.openTab(); self.openTab();
}, 0); }, 0);

16
couchpotato/static/scripts/combined.plugins.min.js

@ -942,7 +942,7 @@ var MoviesManage = new Class({
} }
}))) })))
}); });
$(self.list).inject(self.el); $(self.list).inject(self.content);
self.startProgressInterval(); self.startProgressInterval();
} }
}, },
@ -2081,7 +2081,7 @@ Page.Movies = new Class({
var self = this; var self = this;
self.parent(parent, options); self.parent(parent, options);
self.navigation = new BlockNavigation(); self.navigation = new BlockNavigation();
$(self.navigation).inject(self.el, "top"); $(self.navigation).inject(self.content, "top");
}, },
defaultAction: function(action, params) { defaultAction: function(action, params) {
var self = this; var self = this;
@ -2289,7 +2289,7 @@ var MoviesWanted = new Class({
menu: [ self.manual_search, self.scan_folder ], menu: [ self.manual_search, self.scan_folder ],
on_empty_element: App.createUserscriptButtons().addClass("empty_wanted") on_empty_element: App.createUserscriptButtons().addClass("empty_wanted")
}); });
$(self.list).inject(self.el); $(self.list).inject(self.content);
self.startProgressInterval.delay(4e3, self); self.startProgressInterval.delay(4e3, self);
} }
}, },
@ -2336,7 +2336,7 @@ var MoviesWanted = new Class({
} }
}); });
}; };
self.folder_browser.inject(self.el, "top"); self.folder_browser.inject(self.content, "top");
self.folder_browser.fireEvent("injected"); self.folder_browser.fireEvent("injected");
self.folder_browser.directory_inlay.hide(); self.folder_browser.directory_inlay.hide();
self.folder_browser.el.removeChild(self.folder_browser.el.firstChild); self.folder_browser.el.removeChild(self.folder_browser.el.firstChild);
@ -2982,7 +2982,7 @@ Page.Log = new Class({
self.showSelectionButton.delay(100, self, e); self.showSelectionButton.delay(100, self, e);
} }
} }
}).inject(self.el); }).inject(self.content);
Api.request("logging.get", { Api.request("logging.get", {
data: { data: {
nr: nr nr: nr
@ -3006,7 +3006,7 @@ Page.Log = new Class({
events: { events: {
change: function() { change: function() {
var type_filter = this.getSelected()[0].get("value"); var type_filter = this.getSelected()[0].get("value");
self.el.set("data-filter", type_filter); self.content.set("data-filter", type_filter);
self.scrollToBottom(); self.scrollToBottom();
} }
} }
@ -3041,7 +3041,7 @@ Page.Log = new Class({
} }
} }
}).inject(nav); }).inject(nav);
navigation.inject(self.el, "top"); navigation.inject(self.content, "top");
self.scrollToBottom(); self.scrollToBottom();
} }
}); });
@ -3626,7 +3626,7 @@ Page.Userscript = new Class({
}, },
indexAction: function() { indexAction: function() {
var self = this; var self = this;
self.el.adopt(self.frame = new Element("div.frame.loading", { self.content.grab(self.frame = new Element("div.frame.loading", {
text: "Loading..." text: "Loading..."
})); }));
var url = window.location.href.split("url=")[1]; var url = window.location.href.split("url=")[1];

10
couchpotato/static/scripts/page.js

@ -23,13 +23,15 @@ var PageBase = new Class({
// Create main page container // Create main page container
self.el = new Element('div', { self.el = new Element('div', {
'class': 'page ' + self.getPageClass() + (' level_' + (options.level || 0)) 'class': 'page ' + self.getPageClass() + (' level_' + (options.level || 0))
}); }).grab(
self.content = new Element('div.content')
);
// Stop hover events while scrolling // Stop hover events while scrolling
App.addEvent('load', function(){ App.addEvent('load', function(){
setTimeout(function(){ setTimeout(function(){
if(!App.mobile_screen){ if(!App.mobile_screen){
self.el.addEvent('scroll', self.preventHover.bind(self)); self.content.addEvent('scroll', self.preventHover.bind(self));
} }
}, 100); }, 100);
}); });
@ -104,8 +106,8 @@ var PageBase = new Class({
elements = self[action+'Action'](params); elements = self[action+'Action'](params);
} }
if(elements !== undefined){ if(elements !== undefined){
self.el.empty(); self.content.empty();
self.el.adopt(elements); self.content.adopt(elements);
} }
App.getBlock('navigation').activate(self.name); App.getBlock('navigation').activate(self.name);

10
couchpotato/static/scripts/page/home.js

@ -79,7 +79,7 @@ Page.Home = new Class({
} }
}); });
$(self.available_list).inject(self.el); $(self.available_list).inject(self.content);
}, },
@ -106,7 +106,7 @@ Page.Home = new Class({
} }
}); });
$(self.soon_list).inject(self.el); $(self.soon_list).inject(self.content);
}, },
@ -129,7 +129,7 @@ Page.Home = new Class({
} }
}); });
$(self.suggestions_list).inject(self.el); $(self.suggestions_list).inject(self.content);
}, },
@ -143,7 +143,7 @@ Page.Home = new Class({
} }
}); });
$(self.charts_list).inject(self.el); $(self.charts_list).inject(self.content);
}, },
@ -170,7 +170,7 @@ Page.Home = new Class({
} }
}); });
$(self.late_list).inject(self.el); $(self.late_list).inject(self.content);
} }

8
couchpotato/static/scripts/page/settings.js

@ -53,7 +53,7 @@ Page.Settings = new Class({
subtab = param; subtab = param;
}); });
self.el.getElements('li.'+c+' , .tab_content.'+c).each(function(active){ self.content.getElements('li.'+c+' , .tab_content.'+c).each(function(active){
active.removeClass(c); active.removeClass(c);
}); });
@ -83,7 +83,7 @@ Page.Settings = new Class({
Api.request('settings', { Api.request('settings', {
'useSpinner': true, 'useSpinner': true,
'spinnerOptions': { 'spinnerOptions': {
'target': self.el 'target': self.content
}, },
'onComplete': function(json){ 'onComplete': function(json){
self.data = json; self.data = json;
@ -108,7 +108,7 @@ Page.Settings = new Class({
var self = this; var self = this;
var c = self.advanced_toggle.checked ? 'addClass' : 'removeClass'; var c = self.advanced_toggle.checked ? 'addClass' : 'removeClass';
self.el[c]('show_advanced'); self.content[c]('show_advanced');
Cookie.write('advanced_toggle_checked', +self.advanced_toggle.checked, {'duration': 365}); Cookie.write('advanced_toggle_checked', +self.advanced_toggle.checked, {'duration': 365});
}, },
@ -209,7 +209,7 @@ Page.Settings = new Class({
}); });
setTimeout(function(){ setTimeout(function(){
self.el.adopt( self.content.adopt(
self.navigation, self.navigation,
self.tabs_container, self.tabs_container,
self.containers self.containers

3
couchpotato/static/style/combined.min.css

@ -565,9 +565,10 @@ input,select,textarea{font-size:1em;font-weight:300;padding:6.67px;background:#F
.content h1,.content h2,.content h3{padding:0;margin:0} .content h1,.content h2,.content h3{padding:0;margin:0}
.content .pages{width:100%} .content .pages{width:100%}
.content .footer{position:fixed;bottom:0;height:20px;width:100%} .content .footer{position:fixed;bottom:0;height:20px;width:100%}
.page{position:absolute;top:0;left:0;right:0;bottom:0;display:none;padding:20px 0;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch} .page{position:absolute;top:0;left:0;right:0;bottom:0;display:none;padding:20px 0;-webkit-overflow-scrolling:touch}
.page.home{padding:0 0 20px} .page.home{padding:0 0 20px}
.page.active{display:block} .page.active{display:block}
.page>.content{overflow:hidden;overflow-y:auto}
.page h1,.page h2,.page h3,.page h4{font-weight:300} .page h1,.page h2,.page h3,.page h4{font-weight:300}
.page h2{font-size:24px;padding:20px} .page h2{font-size:24px;padding:20px}
.page .navigation{z-index:2;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:fixed;top:0;height:80px;left:152px;right:20px;background:#FFF;border-radius:3px 0 0} .page .navigation{z-index:2;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:fixed;top:0;height:80px;left:152px;right:20px;background:#FFF;border-radius:3px 0 0}

7
couchpotato/static/style/main.scss

@ -386,8 +386,6 @@ input, textarea, select {
bottom: 0; bottom: 0;
display: none; display: none;
padding: $padding 0; padding: $padding 0;
overflow: hidden;
overflow-y: auto;
-webkit-overflow-scrolling:touch; -webkit-overflow-scrolling:touch;
&.home { &.home {
@ -398,6 +396,11 @@ input, textarea, select {
display: block; display: block;
} }
> .content {
overflow: hidden;
overflow-y: auto;
}
h1, h2, h3, h4 { h1, h2, h3, h4 {
font-weight: 300; font-weight: 300;
} }

Loading…
Cancel
Save