Extra manage options
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user