Browse Source

Home

pull/5180/head
Ruud 10 years ago
parent
commit
ffd4a1ef03
  1. 1
      couchpotato/core/media/_base/search/static/search.scss
  2. 2
      couchpotato/core/media/movie/_base/static/list.js
  3. 2
      couchpotato/core/media/movie/_base/static/manage.js
  4. 2
      couchpotato/core/media/movie/_base/static/movie.actions.js
  5. 70
      couchpotato/core/media/movie/_base/static/movie.scss
  6. 71
      couchpotato/static/scripts/page/home.js
  7. 1
      couchpotato/static/style/main.scss

1
couchpotato/core/media/_base/search/static/search.scss

@ -12,7 +12,6 @@
top: 50%; top: 50%;
left: 0; left: 0;
height: 100%; height: 100%;
cursor: pointer;
text-align: center; text-align: center;
color: #FFF; color: #FFF;
font-size: 20px; font-size: 20px;

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

@ -498,7 +498,7 @@ var MovieList = new Class({
getSavedView: function(){ getSavedView: function(){
var self = this; var self = this;
return Cookie.read(self.options.identifier+'_view3'); return Cookie.read(self.options.identifier+'_view');
}, },
search: function(){ search: function(){

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

@ -33,7 +33,7 @@ var MoviesManage = new Class({
'release_status': 'done', 'release_status': 'done',
'status_or': 1 'status_or': 1
}, },
'actions': [MA.IMDB, MA.Trailer, MA.Files, MA.Readd, MA.Edit, MA.Delete], 'actions': [MA.IMDB, MA.Trailer, MA.Files, MA.Readd, MA.Delete],
'menu': [self.refresh_button, self.refresh_quick], 'menu': [self.refresh_button, self.refresh_quick],
'on_empty_element': new Element('div.empty_manage').adopt( 'on_empty_element': new Element('div.empty_manage').adopt(
new Element('div', { new Element('div', {

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

@ -142,7 +142,7 @@ MA.Release = new Class({
getDetails: function(refresh){ getDetails: function(refresh){
var self = this; var self = this;
if(self.movie.data.releases.length === 0) return; if(!self.movie.data.releases || self.movie.data.releases.length === 0) return;
if(!self.options_container || refresh){ if(!self.options_container || refresh){
self.options_container = new Element('div.options').grab( self.options_container = new Element('div.options').grab(

70
couchpotato/core/media/movie/_base/static/movie.scss

@ -10,6 +10,39 @@
padding: 0; padding: 0;
} }
.movie {
.quality {
span {
background: rgba(0,0,0,.2);
color: #FFF;
border-radius: 1px;
padding: 2px 4px;
&.failed {
background: #99563e;
}
&.ignored {
background: rgba(0,0,0,.2);
}
&.available {
background: #2f8199;
}
&.snatched {
background: #41997f;
}
&.downloaded {
background: #54994a;
}
}
}
}
.list_list { .list_list {
font-weight: 300; font-weight: 300;
@ -51,11 +84,7 @@
.quality span { .quality span {
float: left; float: left;
color: #FFF;
font-size: .7em; font-size: .7em;
padding: 2px 4px;
background: rgba(0,0,0,.2);
border-radius: 1px;
margin: 2px 0 0 2px; margin: 2px 0 0 2px;
} }
} }
@ -145,11 +174,7 @@
overflow: hidden; overflow: hidden;
span { span {
color: #FFF;
font-size: .8em; font-size: .8em;
padding: 2px 4px;
background: rgba(0,0,0,.2);
border-radius: 1px;
margin-right: 2px; margin-right: 2px;
} }
} }
@ -216,7 +241,6 @@
line-height: $header_height; line-height: $header_height;
color: #FFF; color: #FFF;
width: $gab-width; width: $gab-width;
cursor: pointer;
height: 100%; height: 100%;
} }
} }
@ -244,10 +268,13 @@
font-size: 24px; font-size: 24px;
color: rgba(0,0,0,.5); color: rgba(0,0,0,.5);
font-weight: 300; font-weight: 300;
overflow: hidden;
} }
.more_menu { .more_menu {
display: inline-block; display: inline-block;
max-width: 100%;
> a { > a {
line-height: $header_height; line-height: $header_height;
@ -256,7 +283,6 @@
.icon-dropdown { .icon-dropdown {
position: relative; position: relative;
padding: 0 $padding 0 0; padding: 0 $padding 0 0;
cursor: pointer;
&:before { &:before {
position: absolute; position: absolute;
@ -288,18 +314,36 @@
} }
a { a {
cursor: pointer; padding-right: $padding * 1.5;
&:hover { &:before {
position: absolute;
right: $padding/2;
}
&:hover, &.icon-ok {
color: $primary_color; color: $primary_color;
} }
} }
} }
&.title { &.title {
> a {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
.wrapper { .wrapper {
left: 0; left: 0;
right: auto; right: auto;
&:before {
left: 22px;
right: auto;
}
} }
} }
@ -362,7 +406,6 @@
padding: $padding/3; padding: $padding/3;
min-width: 26px; min-width: 26px;
color: $text_color; color: $text_color;
cursor: pointer;
&:hover { &:hover {
color: $primary_color; color: $primary_color;
@ -422,7 +465,6 @@
width: 30px; width: 30px;
line-height: 80px; line-height: 80px;
text-align: center; text-align: center;
cursor: pointer;
&:hover { &:hover {
color: $primary_color; color: $primary_color;

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

@ -39,7 +39,7 @@ Page.Home = new Class({
'identifier': 'snatched', 'identifier': 'snatched',
'load_more': false, 'load_more': false,
'view': 'list', 'view': 'list',
'actions': [MA.IMDB, MA.Trailer, MA.Release, MA.Refresh, MA.Delete], 'actions': [MA.IMDB, MA.Release, MA.Trailer, MA.Refresh, MA.Readd, MA.Delete, MA.Category, MA.Profile],
'title': 'Snatched & Available', 'title': 'Snatched & Available',
'description': 'These movies have been snatched or have finished downloading', 'description': 'These movies have been snatched or have finished downloading',
'on_empty_element': new Element('div').adopt( 'on_empty_element': new Element('div').adopt(
@ -93,9 +93,9 @@ Page.Home = new Class({
'filter': { 'filter': {
'random': true 'random': true
}, },
'actions': [MA.IMDB, MA.Refresh], 'actions': [MA.IMDB, MA.Release, MA.Trailer, MA.Refresh, MA.Delete, MA.Category, MA.Profile],
'load_more': false, 'load_more': false,
'view': 'thumbs', 'view': 'thumb',
'force_view': true, 'force_view': true,
'api_call': 'dashboard.soon', 'api_call': 'dashboard.soon',
'onLoaded': function(){ 'onLoaded': function(){
@ -103,41 +103,6 @@ Page.Home = new Class({
} }
}); });
// Make all thumbnails the same size
self.soon_list.addEvent('loaded', function(){
var images = $(self.soon_list).getElements('.poster, .no_thumbnail'),
timer,
highest = 100;
images.each(function(img){
img.addEvent('load', function(){
var height = img.getSize().y;
if(!highest || highest < height){
highest = height;
if(timer) clearTimeout(timer);
timer = (function(){
images.setStyle('height', highest);
}).delay(50);
}
});
});
$(window).addEvent('resize', function(){
if(timer) clearTimeout(timer);
timer = (function(){
var highest = 100;
images.each(function(img){
img.setStyle('height', null);
var height = img.getSize().y;
if(!highest || highest < height)
highest = height;
});
images.setStyle('height', highest);
}).delay(300);
});
});
$(self.soon_list).inject(self.el); $(self.soon_list).inject(self.el);
}, },
@ -145,15 +110,37 @@ Page.Home = new Class({
createSuggestions: function(){ createSuggestions: function(){
var self = this; var self = this;
// Suggest // Coming Soon
self.suggestions_list = new SuggestList({ self.suggestions_list = new MovieList({
'onCreated': function(){ 'navigation': false,
'identifier': 'soon',
'limit': 12,
'title': 'Available soon',
'description': 'These are being searched for and should be available soon as they will be released on DVD in the next few weeks.',
'filter': {
'random': true
},
'actions': [MA.IMDB, MA.Release, MA.Trailer, MA.Refresh, MA.Delete, MA.Category, MA.Profile],
'load_more': false,
'view': 'thumb',
'force_view': true,
'api_call': 'suggestion.view',
'onLoaded': function(){
self.chain.callChain(); self.chain.callChain();
} }
}); });
$(self.suggestions_list).inject(self.el); $(self.suggestions_list).inject(self.el);
// Suggest
//self.suggestions_list = new SuggestList({
// 'onCreated': function(){
// self.chain.callChain();
// }
//});
//
//$(self.suggestions_list).inject(self.el);
}, },
createCharts: function(){ createCharts: function(){
@ -232,7 +219,7 @@ Page.Home = new Class({
'loader': false, 'loader': false,
'load_more': false, 'load_more': false,
'view': 'list', 'view': 'list',
'actions': [MA.IMDB, MA.Trailer, MA.Edit, MA.Refresh, MA.Delete], 'actions': [MA.IMDB, MA.Trailer, MA.Refresh, MA.Delete, MA.Category, MA.Profile],
'api_call': 'dashboard.soon', 'api_call': 'dashboard.soon',
'onLoaded': function(){ 'onLoaded': function(){
self.chain.callChain(); self.chain.callChain();

1
couchpotato/static/style/main.scss

@ -28,6 +28,7 @@ body {
a { a {
text-decoration: none; text-decoration: none;
cursor: pointer;
} }
input, textarea, select { input, textarea, select {

Loading…
Cancel
Save