diff options
Diffstat (limited to 'web/widget/field.js')
-rw-r--r-- | web/widget/field.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/web/widget/field.js b/web/widget/field.js index e4524e1..338895a 100644 --- a/web/widget/field.js +++ b/web/widget/field.js @@ -12,15 +12,14 @@ define( "underscore" ], function(formatError, statusBar, Base, $, _) { - var Class = Base.extend({ + return Base.extend({ init: function( data, name, meta, level, editable, removable ) { this.editable = editable && meta.editable; - var el = this.super( - Class, - "init", + var el = Base.init.call( + this, data, name, meta, @@ -40,7 +39,7 @@ define( }, makeEl: function() { - this.super(Class, "makeEl"); + Base.makeEl.call(this); if (!this.field) this.field = this.el; }, @@ -59,7 +58,7 @@ define( }, validate: function(value) { - this.super(Class, "validate", value); + Base.validate.call(this, value); if (!this.visible || !this.editable) return; this.validateChange(); }, @@ -103,7 +102,5 @@ define( (this.field.val() || null) : this.data.get(this.name); } }); - - return Class; } ); |