From 7cd264e2e10756123d029bd8759afa142b46b7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 4 Feb 2013 18:29:15 +0100 Subject: [PATCH] Fix linter --- src/common.js | 8 +++++--- src/model.js | 2 +- src/view.js | 14 ++++++++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/common.js b/src/common.js index 9c338d1feb..b8114efd3e 100644 --- a/src/common.js +++ b/src/common.js @@ -44,10 +44,12 @@ } environment.id = parent_.id; if (parent_.parent) - Object.defineProperty(environment, '_parent_' + parent_.parent_name, { + Object.defineProperty(environment, '_parent_' + + parent_.parent_name, { 'enumerable': true, - 'get': function () { - return Sao.common.EvalEnvironment(parent_.parent, eval_type); + 'get': function() { + return Sao.common.EvalEnvironment(parent_.parent, + eval_type); } }); environment.get = function(item, default_) { diff --git a/src/model.js b/src/model.js index 52218fa7b5..da18481e0d 100644 --- a/src/model.js +++ b/src/model.js @@ -403,7 +403,7 @@ return value; }, expr_eval: function(expr) { - if (typeof(expr) != "string") return expr; + if (typeof(expr) != 'string') return expr; var ctx = jQuery.extend({}, this.get_context()); ctx.context = jQuery.extend({}, ctx); jQuery.extend(ctx, this.get_eval()); diff --git a/src/view.js b/src/view.js index 6a0083845d..ca47700330 100644 --- a/src/view.js +++ b/src/view.js @@ -298,7 +298,7 @@ }, render: function(record) { var cell = this.get_cell(); - record.load(this.attributes.name).done(function () { + record.load(this.attributes.name).done(function() { this.update_text(cell, record); }.bind(this)); return cell; @@ -338,7 +338,8 @@ Sao.View.Tree.SelectionColumn = Sao.class_(Sao.View.Tree.CharColumn, { init: function(model, attributes) { - Sao.View.Tree.SelectionColumn._super.init.call(this, model, attributes); + Sao.View.Tree.SelectionColumn._super.init.call(this, model, + attributes); var selection = attributes.selection || []; var store_selection = function(selection) { this.selection = {}; @@ -377,7 +378,7 @@ update_text: function(cell, record) { var text; var value = this.field.get_client(record); - var pad = function (txt) { + var pad = function(txt) { return (txt.toString().length < 2) ? '0' + txt : txt; }; if (value) { @@ -404,12 +405,13 @@ Sao.View.Tree.FloatTimeColumn = Sao.class_(Sao.View.Tree.CharColumn, { init: function(model, attributes) { - Sao.View.Tree.FloatTimeColumn._super_.init.call(this, model, attributes); + Sao.View.Tree.FloatTimeColumn._super_.init.call(this, model, + attributes); this.conv = null; }, update_text: function(cell, record) { - cell.text(Sao.common.text_to_float_time(this.field.get_client(record), - this.conv)); + cell.text(Sao.common.text_to_float_time( + this.field.get_client(record), this.conv)); } });