This commit is contained in:
Ruud committed 2014-12-28 00:53:37 +01:00
1 parent 819f619297
commit 02e25a9e25
10 files changed
+181 -478

No files matched your search

@@ -239,13 +239,4 @@
}
}
.mask,
.media_result .mask {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
}
}
@@ -12,7 +12,11 @@ var MovieDetails = new Class({
self.el = new Element('div',{
'class': 'page active movie_details level_' + (options.level || 0)
}).adopt(
self.overlay = new Element('div.overlay').grab(
self.overlay = new Element('div.overlay', {
'events': {
'click': self.close.bind(self)
}
}).grab(
new Element('a.close.icon-left-arrow')
),
self.content = new Element('div.content').grab(
@@ -36,6 +40,12 @@ var MovieDetails = new Class({
'class': 'section section_' + name
}).grab(section_el)
);
},
close: function(){
var self = this;
self.el.dispose();
}
});
});
@@ -138,8 +138,6 @@ MA.Release = new Class({
getDetails: function(refresh){
var self = this;
p('test');
if(!self.options_container || refresh){
self.options_container = new Element('div.options').grab(
self.release_container = new Element('div.releases.table')
@@ -181,7 +179,7 @@ MA.Release = new Class({
'id': 'release_'+release._id
}).adopt(
new Element('span.name', {'text': release_name, 'title': release_name}),
new Element('span.status', {'text': release.status, 'class': 'release_status '+release.status}),
new Element('span.status', {'text': release.status, 'class': 'status '+release.status}),
new Element('span.quality', {'text': quality.label + (release.is_3d ? ' 3D' : '') || 'n/a'}),
new Element('span.size', {'text': info.size ? Math.floor(self.get(release, 'size')) : 'n/a'}),
new Element('span.age', {'text': self.get(release, 'age')}),
@@ -533,7 +531,8 @@ MA.Edit = new Class({
create: function(){
var self = this;
self.el = new Element('a.edit', {
self.button = new Element('a.edit', {
'text': 'Edit',
'title': 'Change movie information, like title and quality.',
'events': {
'click': self.editMovie.bind(self)
@@ -656,7 +655,8 @@ MA.Refresh = new Class({
create: function(){
var self = this;
self.el = new Element('a.refresh', {
self.button = new Element('a.refresh', {
'text': 'Refresh',
'title': 'Refresh the movie info and do a forced search',
'events': {
'click': self.doRefresh.bind(self)
@@ -667,7 +667,7 @@ MA.Refresh = new Class({
doRefresh: function(e){
var self = this;
(e).preventDefault();
(e).stop();
Api.request('media.refresh', {
'data': {
@@ -38,16 +38,15 @@ var Movie = new Class({
'level': 3
});
App.getPageContainer().grab(self.details);
// Add action items
self.actions.each(function(action, nr){
var details = action.getDetails();
p(action, action.getLabel(), details);
if(details)
self.details.addSection(action.getLabel(), details);
});
}
App.getPageContainer().grab(self.details);
},
addEvents: function(){
@@ -60,7 +59,6 @@ var Movie = new Class({
if(self.data._id != notification.data._id) return;
self.busy(false);
self.removeView();
self.update.delay(2000, self, notification);
};
App.on('movie.update', self.global_events['movie.update']);
@@ -132,7 +130,7 @@ var Movie = new Class({
if(self.mask)
self.mask.destroy();
if(self.spinner)
self.spinner.el.destroy();
self.spinner.destroy();
self.spinner = null;
self.mask = null;
}, timeout || 400);
@@ -160,7 +158,6 @@ var Movie = new Class({
self.data = notification.data;
self.el.empty();
self.removeView();
self.profile = Quality.getProfile(self.data.profile_id) || {};
self.category = CategoryList.getCategory(self.data.category_id) || {};
@@ -225,7 +222,13 @@ var Movie = new Class({
}
})
),
self.actions_el = new Element('div.actions')
self.actions_el = new Element('div.actions', {
'events': {
'click': function(e){
(e).stopPropagation();
}
}
})
)
);
@@ -72,6 +72,7 @@
@include span(6);
float: left;
margin-bottom: $padding;
position: relative;
&:nth-child(4n+4){
@include span(last);
@@ -82,7 +83,7 @@
}
.poster {
border-radius: 2px;
border-radius: $border_radius;
overflow: hidden;
width: 100%;
float: left;
@@ -92,6 +93,7 @@
clear: both;
.info {
height: 44px;
.title {
@include flexbox();
@@ -126,6 +128,32 @@
}
}
}
.actions {
position: absolute;
top: $padding / 2;
right: $padding / 2;
display: none;
a {
display: block;
background: $background_color;
padding: $padding / 3;
width: auto;
margin-bottom: 1px;
clear: both;
float: right;
}
}
&:hover .actions {
display: block;
}
.mask {
bottom: 44px;
border-radius: $border_radius;
}
}
}
@@ -190,6 +218,28 @@
border-bottom: 1px solid rgba(0,0,0,.1);
}
}
.releases {
.item span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
.item .name {
@include flex(1 auto);
text-align: left;
}
.status { min-width: 70px; max-width: 70px; }
.quality { min-width: 60px; max-width: 60px; }
.size { min-width: 40px; max-width: 40px; }
.age { min-width: 40px; max-width: 40px; }
.score { min-width: 45px; max-width: 45px; }
.provider { min-width: 100px; max-width: 100px; }
}
}