Spring cleanup

This commit is contained in:
Ruud
2014-03-29 23:44:14 +01:00
parent 83c5d701b3
commit 99e77e409a
98 changed files with 469 additions and 489 deletions
@@ -8,7 +8,7 @@ var QualityBase = new Class({
self.qualities = data.qualities;
self.profiles = []
self.profiles = [];
Array.each(data.profiles, self.createProfilesClass.bind(self));
App.addEvent('load', self.addSettings.bind(self))
@@ -37,7 +37,7 @@ var QualityBase = new Class({
addSettings: function(){
var self = this;
self.settings = App.getPage('Settings')
self.settings = App.getPage('Settings');
self.settings.addEvent('create', function(){
var tab = self.settings.createSubTab('profile', {
'label': 'Quality',
@@ -91,9 +91,9 @@ var QualityBase = new Class({
createProfilesClass: function(data){
var self = this;
var data = data || {'id': randomString()}
var profile = new Profile(data)
self.profiles.include(profile)
var data = data || {'id': randomString()};
var profile = new Profile(data);
self.profiles.include(profile);
return profile;
},
@@ -102,7 +102,7 @@ var QualityBase = new Class({
var self = this;
var profile_list;
var group = self.settings.createGroup({
self.settings.createGroup({
'label': 'Profile Defaults',
'description': '(Needs refresh \'' +(App.isMac() ? 'CMD+R' : 'F5')+ '\' after editing)'
}).adopt(
@@ -113,7 +113,7 @@ var QualityBase = new Class({
'html': 'Change the order the profiles are in the dropdown list. Uncheck to hide it completely.<br />First one will be default.'
})
)
).inject(self.content)
).inject(self.content);
Array.each(self.profiles, function(profile){
var check;
@@ -175,14 +175,14 @@ var QualityBase = new Class({
'description': 'Edit the minimal and maximum sizes (in MB) for each quality.',
'advanced': true,
'name': 'sizes'
}).inject(self.content)
}).inject(self.content);
new Element('div.item.head.ctrlHolder').adopt(
new Element('span.label', {'text': 'Quality'}),
new Element('span.min', {'text': 'Min'}),
new Element('span.max', {'text': 'Max'})
).inject(group)
).inject(group);
Array.each(self.qualities, function(quality){
new Element('div.ctrlHolder.item').adopt(