Extra manage options

This commit is contained in:
Ruud
2012-02-29 23:02:57 +01:00
parent 560f74e5ba
commit 62d89c641a
6 changed files with 135 additions and 17 deletions
@@ -35,7 +35,7 @@ Block.Navigation = new Class({
addTab: function(tab){
var self = this
return new Element('li').adopt(
return new Element('li.tab_'+(tab.text.toLowerCase() || 'unknown')).adopt(
new Element('a', tab)
).inject(self.nav)
+22 -7
View File
@@ -9,27 +9,42 @@ Page.Manage = new Class({
var self = this;
if(!self.list){
self.refresh_button = new Element('a.icon.refresh', {
'text': 'Refresh',
self.refresh_button = new Element('a', {
'title': 'Rescan your library for new movies',
'text': 'Full library refresh',
'events':{
'click': self.refresh.bind(self)
'click': self.refresh.bind(self, true)
}
}).inject(self.el);
});
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
'actions': MovieActions,
'menu': [self.refresh_button, self.refresh_quick]
});
$(self.list).inject(self.el);
}
},
refresh: function(){
refresh: function(full){
var self = this;
p(full)
Api.request('manage.update')
Api.request('manage.update', {
'data': {
'full': full ? 1 : null
}
})
}