mirror of
https://github.com/NaN-tic/sao-base.git
synced 2023-12-14 03:13:01 +01:00
Fix linter
This commit is contained in:
parent
dea582c170
commit
ab6231329e
|
@ -44,10 +44,12 @@
|
||||||
}
|
}
|
||||||
environment.id = parent_.id;
|
environment.id = parent_.id;
|
||||||
if (parent_.parent)
|
if (parent_.parent)
|
||||||
Object.defineProperty(environment, '_parent_' + parent_.parent_name, {
|
Object.defineProperty(environment, '_parent_' +
|
||||||
|
parent_.parent_name, {
|
||||||
'enumerable': true,
|
'enumerable': true,
|
||||||
'get': function () {
|
'get': function() {
|
||||||
return Sao.common.EvalEnvironment(parent_.parent, eval_type);
|
return Sao.common.EvalEnvironment(parent_.parent,
|
||||||
|
eval_type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
environment.get = function(item, default_) {
|
environment.get = function(item, default_) {
|
||||||
|
|
|
@ -403,7 +403,7 @@
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
expr_eval: function(expr) {
|
expr_eval: function(expr) {
|
||||||
if (typeof(expr) != "string") return expr;
|
if (typeof(expr) != 'string') return expr;
|
||||||
var ctx = jQuery.extend({}, this.get_context());
|
var ctx = jQuery.extend({}, this.get_context());
|
||||||
ctx.context = jQuery.extend({}, ctx);
|
ctx.context = jQuery.extend({}, ctx);
|
||||||
jQuery.extend(ctx, this.get_eval());
|
jQuery.extend(ctx, this.get_eval());
|
||||||
|
|
14
src/view.js
14
src/view.js
|
@ -298,7 +298,7 @@
|
||||||
},
|
},
|
||||||
render: function(record) {
|
render: function(record) {
|
||||||
var cell = this.get_cell();
|
var cell = this.get_cell();
|
||||||
record.load(this.attributes.name).done(function () {
|
record.load(this.attributes.name).done(function() {
|
||||||
this.update_text(cell, record);
|
this.update_text(cell, record);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
return cell;
|
return cell;
|
||||||
|
@ -338,7 +338,8 @@
|
||||||
|
|
||||||
Sao.View.Tree.SelectionColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
Sao.View.Tree.SelectionColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||||
init: function(model, attributes) {
|
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 selection = attributes.selection || [];
|
||||||
var store_selection = function(selection) {
|
var store_selection = function(selection) {
|
||||||
this.selection = {};
|
this.selection = {};
|
||||||
|
@ -377,7 +378,7 @@
|
||||||
update_text: function(cell, record) {
|
update_text: function(cell, record) {
|
||||||
var text;
|
var text;
|
||||||
var value = this.field.get_client(record);
|
var value = this.field.get_client(record);
|
||||||
var pad = function (txt) {
|
var pad = function(txt) {
|
||||||
return (txt.toString().length < 2) ? '0' + txt : txt;
|
return (txt.toString().length < 2) ? '0' + txt : txt;
|
||||||
};
|
};
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -404,12 +405,13 @@
|
||||||
|
|
||||||
Sao.View.Tree.FloatTimeColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
Sao.View.Tree.FloatTimeColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||||
init: function(model, attributes) {
|
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;
|
this.conv = null;
|
||||||
},
|
},
|
||||||
update_text: function(cell, record) {
|
update_text: function(cell, record) {
|
||||||
cell.text(Sao.common.text_to_float_time(this.field.get_client(record),
|
cell.text(Sao.common.text_to_float_time(
|
||||||
this.conv));
|
this.field.get_client(record), this.conv));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue