Update dashboard when the search ends of added new movie

This commit is contained in:
Ruud
2013-11-22 16:47:55 +01:00
parent 88d6148500
commit 99e641a30d
2 changed files with 14 additions and 0 deletions
+11
View File
@@ -57,6 +57,17 @@ Page.Home = new Class({
'limit': null,
'onLoaded': function(){
self.chain.callChain();
},
'onMovieAdded': function(notification){
// Track movie added
var after_search = function(data){
// Force update after search
self.available_list.update();
App.removeEvent('movie.searcher.ended.' + notification.data.id, after_search);
}
App.addEvent('movie.searcher.ended.' + notification.data.id, after_search);
}
});