summaryrefslogtreecommitdiffstats
path: root/install/static/widget.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-12-06 16:30:10 -0600
committerAdam Young <ayoung@redhat.com>2010-12-06 20:16:15 -0500
commit6350686710c49b632ea7b1085e4db6755056d263 (patch)
tree6a12fdda5ec6f84a9d4654fff57e81ffcdd9730b /install/static/widget.js
parentca436d9ec3210e0c573ea96ae7d6fe71dc9bf943 (diff)
downloadfreeipa.git-6350686710c49b632ea7b1085e4db6755056d263.tar.gz
freeipa.git-6350686710c49b632ea7b1085e4db6755056d263.tar.xz
freeipa.git-6350686710c49b632ea7b1085e4db6755056d263.zip
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 <class name>_<method> (e.g. widget_init).
Diffstat (limited to 'install/static/widget.js')
-rwxr-xr-xinstall/static/widget.js20
1 files changed, 5 insertions, 15 deletions
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<that.fields.length; i++) {
+ var field = that.fields[i];
+ field.entity_name = that.entity_name;
+ field.init();
+ }
};
/**