Don't show button bar when there aren't any releases
This commit is contained in:
@@ -479,29 +479,32 @@ var ReleaseAction = new Class({
|
|||||||
self.release_container.getElement('#release_'+self.next_release.id).addClass('next_release');
|
self.release_container.getElement('#release_'+self.next_release.id).addClass('next_release');
|
||||||
}
|
}
|
||||||
|
|
||||||
self.trynext_container.adopt(
|
if(self.next_release || self.last_release){
|
||||||
new Element('span.or', {
|
|
||||||
'text': 'This movie is snatched, if anything went wrong, download'
|
self.trynext_container.adopt(
|
||||||
}),
|
new Element('span.or', {
|
||||||
self.last_release ? new Element('a.button.orange', {
|
'text': 'This movie is snatched, if anything went wrong, download'
|
||||||
'text': 'the same release again',
|
}),
|
||||||
'events': {
|
self.last_release ? new Element('a.button.orange', {
|
||||||
'click': self.trySameRelease.bind(self)
|
'text': 'the same release again',
|
||||||
}
|
'events': {
|
||||||
}) : null,
|
'click': self.trySameRelease.bind(self)
|
||||||
self.next_release && self.last_release ? new Element('span.or', {
|
}
|
||||||
'text': ','
|
}) : null,
|
||||||
}) : null,
|
self.next_release && self.last_release ? new Element('span.or', {
|
||||||
self.next_release ? [new Element('a.button.green', {
|
'text': ','
|
||||||
'text': self.last_release ? 'another release' : 'the best release',
|
}) : null,
|
||||||
'events': {
|
self.next_release ? [new Element('a.button.green', {
|
||||||
'click': self.tryNextRelease.bind(self)
|
'text': self.last_release ? 'another release' : 'the best release',
|
||||||
}
|
'events': {
|
||||||
}),
|
'click': self.tryNextRelease.bind(self)
|
||||||
new Element('span.or', {
|
}
|
||||||
'text': 'or pick one below'
|
}),
|
||||||
})] : null
|
new Element('span.or', {
|
||||||
)
|
'text': 'or pick one below'
|
||||||
|
})] : null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user