Fix JS codestyle

This commit is contained in:
Romain Neutron
2013-11-12 12:49:23 +01:00
parent 51fb364d13
commit 9fa95db23c
78 changed files with 5184 additions and 6309 deletions

View File

@@ -11,11 +11,11 @@ define([
"jquery",
"underscore",
"backbone"
], function($, _, Backbone) {
], function ($, _, Backbone) {
var ErrorView = Backbone.View.extend({
tagName: "div",
initialize: function(options) {
options = options || {};
initialize: function (options) {
options = options || {};
if (false === "name" in options) {
throw "Missing name attribute in error view";
@@ -28,11 +28,11 @@ define([
this.name = options.name;
this.errorTemplate = options.errorTemplate;
this.errors = options.errors || {};
this.errors = options.errors || {};
this.onRenderError = options.onRenderError || null;
},
render: function() {
if (this.errors.length > 0 ) {
render: function () {
if (this.errors.length > 0) {
var template = _.template($(this.errorTemplate).html(), {
errors: this.errors
});
@@ -54,7 +54,7 @@ define([
return this;
},
reset: function() {
reset: function () {
this.$el.empty();
}
});