From 6350686710c49b632ea7b1085e4db6755056d263 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 6 Dec 2010 16:30:10 -0600 Subject: Dialog i18n The ipa_add_dialog has been fixed to initialize the fields which will get the labels from metadata. Hard-coded labels have been removed from field declarations. The superior() method has been removed because it doesn't work with multi-level inheritance. Superclass method for now is called using _ (e.g. widget_init). --- install/static/widget.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'install/static/widget.js') diff --git a/install/static/widget.js b/install/static/widget.js index e864e8b5..f4869c99 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -44,13 +44,6 @@ function ipa_widget(spec) { that.save = spec.save || save; that.clear = spec.clear || clear; - that.superior = function(name) { - var method = that[name]; - return function () { - return method.apply(that, arguments); - }; - }; - that.__defineGetter__("entity_name", function(){ return that._entity_name; }); @@ -793,13 +786,6 @@ function ipa_dialog(spec) { that.fields = []; that.fields_by_name = {}; - that.superior = function(name) { - var method = that[name]; - return function () { - return method.apply(that, arguments); - }; - }; - that.__defineGetter__("entity_name", function(){ return that._entity_name; }); @@ -821,12 +807,16 @@ function ipa_dialog(spec) { }; that.add_field = function(field) { - field.entity_name = that.entity_name; that.fields.push(field); that.fields_by_name[field.name] = field; }; that.init = function() { + for (var i=0; i