Damn semicolons

This commit is contained in:
Ruud committed 2014-12-05 14:44:12 +01:00
1 parent d6cfcae45b
commit 5145618c39
27 files changed
+261 -263

No files matched your search

@@ -52,7 +52,7 @@ var CategoryListBase = new Class({
});
})
});
},
@@ -71,7 +71,7 @@ var CategoryListBase = new Class({
'events': {
'click': function(){
var category = self.createCategory();
$(category).inject(self.category_container)
$(category).inject(self.category_container);
}
}
})
@@ -79,15 +79,15 @@ var CategoryListBase = new Class({
// Add categories, that aren't part of the core (for editing)
Array.each(self.categories, function(category){
$(category).inject(self.category_container)
$(category).inject(self.category_container);
});
},
getCategory: function(id){
return this.categories.filter(function(category){
return category.data._id == id
}).pick()
return category.data._id == id;
}).pick();
},
getAll: function(){
@@ -97,7 +97,7 @@ var CategoryListBase = new Class({
createCategory: function(data){
var self = this;
var data = data || {'id': randomString()};
data = data || {'id': randomString()};
var category = new Category(data);
self.categories.include(category);
@@ -225,7 +225,7 @@ var Category = new Class({
)
);
self.makeSortable()
self.makeSortable();
},
@@ -248,7 +248,7 @@ var Category = new Class({
}
});
}).delay(delay || 0, self)
}).delay(delay || 0, self);
},
@@ -262,13 +262,13 @@ var Category = new Class({
'preferred' : self.el.getElement('.category_preferred input').get('value'),
'ignored' : self.el.getElement('.category_ignored input').get('value'),
'destination': self.data.destination
}
};
},
del: function(){
var self = this;
if(self.data.label == undefined){
if(self.data.label === undefined){
self.el.destroy();
return;
}
@@ -318,11 +318,11 @@ var Category = new Class({
},
get: function(attr){
return this.data[attr]
return this.data[attr];
},
toElement: function(){
return this.el
return this.el;
}
});
+14 -15
View File
@@ -8,20 +8,19 @@ Page.Log = new Class({
has_tab: false,
log_items: [],
report_text: '\
### Steps to reproduce:\n\
1. ..\n\
2. ..\n\
\n\
### Information:\n\
Movie(s) I have this with: ...\n\
Quality of the movie being searched: ...\n\
Providers I use: ...\n\
Version of CouchPotato: {version}\n\
Running on: ...\n\
\n\
### Logs:\n\
```\n{issue}```',
report_text: '### Steps to reproduce:\n'+
'1. ..\n'+
'2. ..\n'+
'\n'+
'### Information:\n'+
'Movie(s) I have this with: ...\n'+
'Quality of the movie being searched: ...\n'+
'Providers I use: ...\n'+
'Version of CouchPotato: {version}\n'+
'Running on: ...\n'+
'\n'+
'### Logs:\n'+
'```\n{issue}```',
indexAction: function () {
var self = this;
@@ -133,7 +132,7 @@ Running on: ...\n\
new Element('span.message', {
'text': log.message
})
))
));
});
return elements;
@@ -81,7 +81,7 @@ var Profile = new Class({
'quality': quality,
'finish': data.finish[nr] || false,
'3d': data['3d'] ? data['3d'][nr] || false : false
})
});
});
}
@@ -123,7 +123,7 @@ var Profile = new Class({
}
});
}).delay(delay, self)
}).delay(delay, self);
},
@@ -148,7 +148,7 @@ var Profile = new Class({
});
});
return data
return data;
},
addType: function(data){
@@ -177,7 +177,7 @@ var Profile = new Class({
var self = this;
return self.types.filter(function(type){
return type.get('quality')
return type.get('quality');
});
},
@@ -231,15 +231,15 @@ var Profile = new Class({
},
get: function(attr){
return this.data[attr]
return this.data[attr];
},
isCore: function(){
return this.data.core
return this.data.core;
},
toElement: function(){
return this.el
return this.el;
}
});
@@ -342,7 +342,7 @@ Profile.Type = new Class({
'text': q.label,
'value': q.identifier,
'data-allow_3d': q.allow_3d
}).inject(self.qualities)
}).inject(self.qualities);
});
self.qualities.set('value', self.data.quality);
@@ -358,7 +358,7 @@ Profile.Type = new Class({
'quality': self.qualities.get('value'),
'finish': +self.finish.checked,
'3d': +self['3d'].checked
}
};
},
get: function(key){
@@ -12,20 +12,20 @@ var QualityBase = new Class({
self.profiles = [];
Array.each(data.profiles, self.createProfilesClass.bind(self));
App.addEvent('loadSettings', self.addSettings.bind(self))
App.addEvent('loadSettings', self.addSettings.bind(self));
},
getProfile: function(id){
return this.profiles.filter(function(profile){
return profile.data._id == id
}).pick()
return profile.data._id == id;
}).pick();
},
// Hide items when getting profiles
getActiveProfiles: function(){
return Array.filter(this.profiles, function(profile){
return !profile.data.hide
return !profile.data.hide;
});
},
@@ -37,7 +37,7 @@ var QualityBase = new Class({
}
catch(e){}
return {}
return {};
},
addSettings: function(){
@@ -58,7 +58,7 @@ var QualityBase = new Class({
self.createProfileOrdering();
self.createSizes();
})
});
},
@@ -68,7 +68,7 @@ var QualityBase = new Class({
createProfiles: function(){
var self = this;
var non_core_profiles = Array.filter(self.profiles, function(profile){ return !profile.isCore() });
var non_core_profiles = Array.filter(self.profiles, function(profile){ return !profile.isCore(); });
var count = non_core_profiles.length;
self.settings.createGroup({
@@ -81,7 +81,7 @@ var QualityBase = new Class({
'events': {
'click': function(){
var profile = self.createProfilesClass();
$(profile).inject(self.profile_container)
$(profile).inject(self.profile_container);
}
}
})
@@ -89,7 +89,7 @@ var QualityBase = new Class({
// Add profiles, that aren't part of the core (for editing)
Array.each(non_core_profiles, function(profile){
$(profile).inject(self.profile_container)
$(profile).inject(self.profile_container);
});
},
@@ -97,7 +97,7 @@ var QualityBase = new Class({
createProfilesClass: function(data){
var self = this;
var data = data || {'id': randomString()};
data = data || {'id': randomString()};
var profile = new Profile(data);
self.profiles.include(profile);
@@ -190,7 +190,6 @@ var QualityBase = new Class({
'name': 'sizes'
}).inject(self.content);
new Element('div.item.head.ctrlHolder').adopt(
new Element('span.label', {'text': 'Quality'}),
new Element('span.min', {'text': 'Min'}),
@@ -204,7 +203,7 @@ var QualityBase = new Class({
'value': quality.size_min,
'events': {
'keyup': function(e){
self.changeSize(quality.identifier, 'size_min', e.target.get('value'))
self.changeSize(quality.identifier, 'size_min', e.target.get('value'));
}
}
}),
@@ -212,11 +211,11 @@ var QualityBase = new Class({
'value': quality.size_max,
'events': {
'keyup': function(e){
self.changeSize(quality.identifier, 'size_max', e.target.get('value'))
self.changeSize(quality.identifier, 'size_max', e.target.get('value'));
}
}
})
).inject(group)
).inject(group);
});
},
@@ -235,7 +234,7 @@ var QualityBase = new Class({
'value': value
}
});
}).delay(300)
}).delay(300);
}
@@ -54,7 +54,7 @@ var UserscriptSettingTab = new Class({
initialize: function(){
var self = this;
App.addEvent('loadSettings', self.addSettings.bind(self))
App.addEvent('loadSettings', self.addSettings.bind(self));
},
@@ -88,7 +88,7 @@ var UserscriptSettingTab = new Class({
'events': {
'click': function(e){
(e).stop();
alert('Drag it to your bookmark ;)')
alert('Drag it to your bookmark ;)');
}
}
}),
@@ -41,7 +41,7 @@ Page.Wizard = new Class({
'content': function(){
return App.createUserscriptButtons().setStyles({
'background-image': "url('https://couchpota.to/media/images/userscript.gif')"
})
});
}
},
'finish': {
@@ -103,7 +103,7 @@ Page.Wizard = new Class({
(function(){
var sc = self.el.getElement('.wgroup_'+action);
self.scroll.start(0, sc.getCoordinates().top-80);
}).delay(1)
}).delay(1);
},
orderGroups: function(){
@@ -114,8 +114,9 @@ Page.Wizard = new Class({
self.groups.each(function(group){
var group_container;
if(self.headers[group]){
var group_container = new Element('.wgroup_'+group, {
group_container = new Element('.wgroup_'+group, {
'styles': {
'opacity': 0.2
},
@@ -127,7 +128,7 @@ Page.Wizard = new Class({
if(self.headers[group].include){
self.headers[group].include.each(function(inc){
group_container.addClass('wgroup_'+inc);
})
});
}
var content = self.headers[group].content;
@@ -148,7 +149,7 @@ Page.Wizard = new Class({
tab_navigation = [];
self.headers[group].include.each(function(inc){
tab_navigation.include(tabs.getElement('.t_'+inc));
})
});
}
if(tab_navigation && group_container){
@@ -165,7 +166,7 @@ Page.Wizard = new Class({
'href': App.createUrl('wizard/'+group),
'text': (self.headers[group].label || group).capitalize()
})
).inject(tabs)
).inject(tabs);
}
else
@@ -190,7 +191,7 @@ Page.Wizard = new Class({
}
if(self.headers[group] && self.headers[group].event)
self.headers[group].event.call()
self.headers[group].event.call();
});
// Remove toggle
@@ -220,22 +221,22 @@ Page.Wizard = new Class({
g.tween('opacity', 1);
};
if(nr == 0)
if(nr === 0)
func();
new ScrollSpy( {
min: function(){
var c = g.getCoordinates();
var top = c.top-(window.getSize().y/2);
return top > minimum ? minimum : top
return top > minimum ? minimum : top;
},
max: function(){
var c = g.getCoordinates();
return c.top+(c.height/2)
return c.top+(c.height/2);
},
onEnter: func,
onLeave: function(){
g.tween('opacity', 0.2)
g.tween('opacity', 0.2);
}
});
});