Skip to content

Commit

Permalink
Add link to IMDb page (Issue #118)
Browse files Browse the repository at this point in the history
closes #118
  • Loading branch information
nomad2k committed Dec 8, 2014
1 parent c88dfd0 commit c1a31a8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
4.1.13
- Allow semi-colon (;) to be used as a list delimiter
- Add download movie/episode button
- Add link to IMDb page

4.1.12
- Massive clean up of the music section
Expand Down
15 changes: 15 additions & 0 deletions resources/js/app/movies/movie.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,21 @@ var movieDetailsPanel = new Ext.FormPanel({
window.open(Ext.getCmp('trailer').getValue(), '');
}
}
},
{
xtype: 'button',
text: 'View on IMDb',
handler: function() {
var selectedMovie = Ext.getCmp('Moviegrid').getSelectionModel().getSelected(),
imdbId = selectedMovie.data.imdbnumber;

if (imdbId !== '') {
window.open('http://imdb.com/title/' + imdbId, '');
}
else {
alert('There is no IMDb ID set for this movie.');
}
}
}
]
}
Expand Down

0 comments on commit c1a31a8

Please sign in to comment.