Reordering of settings

This commit is contained in:
Ruud
2012-03-04 23:26:36 +01:00
parent ca67370b44
commit f160bfe779
36 changed files with 370 additions and 176 deletions
+30 -50
View File
@@ -38,6 +38,36 @@ var AboutSettingTab = new Class({
today = new Date(),
one_day = 1000*60*60*24;
self.settings.createGroup({
'label': 'About This CouchPotato',
'name': 'variables'
}).inject(self.content).adopt(
new Element('dl.info').adopt(
new Element('dt[text=Version]'),
self.version_text = new Element('dd.version', {
'text': 'Getting version...',
'events': {
'click': self.checkForUpdate.bind(self),
'mouseenter': function(){
this.set('text', 'Check for updates')
},
'mouseleave': function(){
self.fillVersion(Updater.getInfo())
}
}
}),
new Element('dt[text=Directories]'),
new Element('dd', {'text': App.getOption('app_dir')}),
new Element('dd', {'text': App.getOption('data_dir')}),
new Element('dt[text=Startup Args]'),
new Element('dd', {'html': App.getOption('args')}),
new Element('dd', {'html': App.getOption('options')})
)
);
if(!self.fillVersion(Updater.getInfo()))
Updater.addEvent('loaded', self.fillVersion.bind(self))
self.settings.createGroup({
'name': 'Help Support CouchPotato'
}).inject(self.content).adopt(
@@ -78,56 +108,6 @@ var AboutSettingTab = new Class({
})
);
self.settings.createGroup({
'label': 'About This CouchPotato',
'name': 'variables'
}).inject(self.content).adopt(
new Element('dl.info').adopt(
new Element('dt[text=Version]'),
self.version_text = new Element('dd.version', {
'text': 'Getting version...',
'events': {
'click': self.checkForUpdate.bind(self),
'mouseenter': function(){
this.set('text', 'Check for updates')
},
'mouseleave': function(){
self.fillVersion(Updater.getInfo())
}
}
}),
new Element('dt[text=Directories]'),
new Element('dd', {'text': App.getOption('app_dir')}),
new Element('dd', {'text': App.getOption('data_dir')}),
new Element('dt[text=Startup Args]'),
new Element('dd', {'html': App.getOption('args')}),
new Element('dd', {'html': App.getOption('options')})
)
);
if(!self.fillVersion(Updater.getInfo()))
Updater.addEvent('loaded', self.fillVersion.bind(self))
self.settings.createGroup({
'name': 'actions'
}).inject(self.content).adopt(
new Element('div').adopt(
new Element('a.button.red', {
'text': 'Shutdown',
'events': {
'click': App.shutdown.bind(App)
}
}),
new Element('a.button.orange', {
'text': 'Restart',
'events': {
'click': App.restart.bind(App)
}
})
)
);
},
fillVersion: function(json){