You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB

Page.Manage = new Class({
Extends: PageBase,
name: 'manage',
title: 'Do stuff to your existing movies!',
indexAction: function(param){
var self = this;
if(!self.list){
self.refresh_button = new Element('a', {
'title': 'Rescan your library for new movies',
'text': 'Full library refresh',
'events':{
'click': self.refresh.bind(self, true)
}
});
self.refresh_quick = new Element('a', {
'title': 'Just scan for recently changed',
'text': 'Quick library scan',
'events':{
'click': self.refresh.bind(self, false)
}
});
self.list = new MovieList({
'identifier': 'manage',
'status': 'done',
'actions': MovieActions,
'menu': [self.refresh_button, self.refresh_quick],
'on_empty_element': new Element('div.empty_manage').adopt(
new Element('div', {
'text': 'Seems like you don\'t have anything in your library yet.'
}),
new Element('div', {
'text': 'Add your existing movie folders in '
}).adopt(
new Element('a', {
'text': 'Settings > Manage',
'href': App.createUrl('settings/manage')
})
)
)
});
$(self.list).inject(self.el);
}
14 years ago
},
refresh: function(full){
14 years ago
var self = this;
Api.request('manage.update', {
'data': {
'full': +full
}
})
}
14 years ago
});