[TV] Added "eta" display placeholder (data not there yet)
This commit is contained in:
1 parent
f7ed5d4b2f
commit
479e20d8f3
2 files changed
+46
-1
No files matched your search
@@ -378,6 +378,32 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shows .data .eta {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shows.details_list .data .eta {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
display: block;
|
||||||
|
min-height: 20px;
|
||||||
|
text-align: right;
|
||||||
|
font-style: italic;
|
||||||
|
opacity: .8;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shows.details_list .movie:hover .data .eta {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shows.thumbs_list .data .eta {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
.shows .data .quality {
|
.shows .data .quality {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 2px;
|
bottom: 2px;
|
||||||
|
|||||||
@@ -140,7 +140,22 @@ var Show = new Class({
|
|||||||
|
|
||||||
self.el.addClass('status_'+self.get('status'));
|
self.el.addClass('status_'+self.get('status'));
|
||||||
|
|
||||||
self.el.adopt(
|
var eta = null,
|
||||||
|
eta_date = null,
|
||||||
|
now = Math.round(+new Date()/1000);
|
||||||
|
|
||||||
|
if(self.data.info.release_date)
|
||||||
|
[self.data.info.release_date.dvd, self.data.info.release_date.theater].each(function(timestamp){
|
||||||
|
if (timestamp > 0 && (eta == null || Math.abs(timestamp - now) < Math.abs(eta - now)))
|
||||||
|
eta = timestamp;
|
||||||
|
});
|
||||||
|
|
||||||
|
if(eta){
|
||||||
|
eta_date = new Date(eta * 1000);
|
||||||
|
eta_date = eta_date.toLocaleString('en-us', { month: "long" }) + ' ' + eta_date.getFullYear();
|
||||||
|
}
|
||||||
|
|
||||||
|
self.el.adopt(
|
||||||
self.select_checkbox = new Element('input[type=checkbox].inlay', {
|
self.select_checkbox = new Element('input[type=checkbox].inlay', {
|
||||||
'events': {
|
'events': {
|
||||||
'change': function(){
|
'change': function(){
|
||||||
@@ -170,6 +185,10 @@ var Show = new Class({
|
|||||||
self.description = new Element('div.description.tiny_scroll', {
|
self.description = new Element('div.description.tiny_scroll', {
|
||||||
'text': self.data.info.plot
|
'text': self.data.info.plot
|
||||||
}),
|
}),
|
||||||
|
self.eta = eta_date && (now+8035200 > eta) ? new Element('div.eta', {
|
||||||
|
'text': eta_date,
|
||||||
|
'title': 'ETA'
|
||||||
|
}) : null,
|
||||||
self.quality = new Element('div.quality', {
|
self.quality = new Element('div.quality', {
|
||||||
'events': {
|
'events': {
|
||||||
'click': function(e){
|
'click': function(e){
|
||||||
|
|||||||
Reference in new issue
Block a user