Dashboard split

Do more with snatched and other statusses
This commit is contained in:
Ruud
2013-03-16 22:23:11 +01:00
parent 4ba7ff9f27
commit 7b7488ece8
12 changed files with 796 additions and 717 deletions
+36 -24
View File
@@ -8,8 +8,14 @@ Page.Home = new Class({
indexAction: function(param){
var self = this;
if(self.soon_list)
if(self.soon_list){
// Reset lists
self.available_list.update();
self.late_list.update();
return
}
// Snatched
self.available_list = new MovieList({
@@ -17,48 +23,54 @@ Page.Home = new Class({
'identifier': 'snatched',
'load_more': false,
'view': 'list',
'actions': MovieActions,
'actions': [MA.IMDB, MA.Trailer, MA.Files, MA.Release, MA.Edit, MA.Readd, MA.Refresh, MA.Delete],
'title': 'Snatched & Available',
'on_empty_element': new Element('div'),
'filter': {
'release_status': 'snatched,available'
}
});
// Downloaded
// self.downloaded_list = new MovieList({
// 'navigation': false,
// 'identifier': 'downloaded',
// 'load_more': false,
// 'view': 'titles',
// 'filter': {
// 'release_status': 'done',
// 'order': 'release_order'
// }
// });
// self.el.adopt(
// new Element('h2', {
// 'text': 'Just downloaded'
// }),
// $(self.downloaded_list)
// );
// Comming Soon
// Coming Soon
self.soon_list = new MovieList({
'navigation': false,
'identifier': 'soon',
'limit': 24,
'title': 'Soon',
'limit': 18,
'title': 'Available soon',
'description': 'These are being searches for and should be available soon as they will be released on DVD in the next few weeks.',
'on_empty_element': new Element('div').grab(
new Element('span', {'text': 'There are no movies available soon'})
),
'filter': {
'random': true
},
'actions': [MA.IMDB, MA.Refresh],
'load_more': false,
'view': 'thumbs',
'api_call': 'dashboard.soon'
});
// Still not available
self.late_list = new MovieList({
'navigation': false,
'identifier': 'late',
'limit': 50,
'title': 'Still not available',
'description': 'Try another quality profile or maybe add more providers in <a href="'+App.createUrl('settings/searcher/providers/')+'">Settings</a>.',
'on_empty_element': new Element('div'),
'filter': {
'late': true
},
'load_more': false,
'view': 'list',
'actions': [MA.IMDB, MA.Trailer, MA.Edit, MA.Refresh, MA.Delete],
'api_call': 'dashboard.soon'
});
self.el.adopt(
$(self.available_list),
$(self.soon_list)
$(self.soon_list),
$(self.late_list)
);
// Suggest