From 6dd8f7d0fa0864fba7d1cb11730c4606c45dc46c Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Sat, 8 Feb 2014 00:45:43 +0200 Subject: web client: eliminate the super method from widgets --- web/widget/field.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'web/widget/field.js') 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; } ); -- cgit v1.2.3