mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Fix JS codestyle
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user