Browse Source

Add buttons to detail

pull/5180/head
Ruud 10 years ago
parent
commit
9cdd012a8c
  1. 25
      couchpotato/core/media/movie/_base/static/movie.actions.js

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

@ -101,15 +101,22 @@ MA.IMDB = new Class({
self.id = self.movie.getIdentifier ? self.movie.getIdentifier() : self.get('imdb'); self.id = self.movie.getIdentifier ? self.movie.getIdentifier() : self.get('imdb');
self.button = new Element('a.imdb', { self.button = self.createButton();
self.detail_button = self.createButton();
if(!self.id) self.disable();
},
createButton: function(){
var self = this;
return new Element('a.imdb', {
'text': 'IMDB', 'text': 'IMDB',
'title': 'Go to the IMDB page of ' + self.getTitle(), 'title': 'Go to the IMDB page of ' + self.getTitle(),
'href': 'http://www.imdb.com/title/'+self.id+'/', 'href': 'http://www.imdb.com/title/'+self.id+'/',
'target': '_blank' 'target': '_blank'
}); });
},
if(!self.id) self.disable();
}
}); });
@ -748,14 +755,20 @@ MA.Refresh = new Class({
create: function(){ create: function(){
var self = this; var self = this;
self.button = new Element('a.refresh', { self.button = self.createButton();
self.detail_button = self.createButton();
},
createButton: function(){
var self = this;
return new Element('a.refresh', {
'text': 'Refresh', 'text': 'Refresh',
'title': 'Refresh the movie info and do a forced search', 'title': 'Refresh the movie info and do a forced search',
'events': { 'events': {
'click': self.doRefresh.bind(self) 'click': self.doRefresh.bind(self)
} }
}); });
}, },
doRefresh: function(e){ doRefresh: function(e){

Loading…
Cancel
Save