be careful with identity values
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 23 Jul 2008 01:44:39 +0000 (01:44 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 23 Jul 2008 01:44:39 +0000 (01:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10092 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js

index d9292d7..f946ee2 100644 (file)
@@ -52,7 +52,7 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) {
 
                        postCreate : function () {
 
 
                        postCreate : function () {
 
-                               dojo.connect(this.tooltipDialog, 'onFocus', this, 'renderTranslatorPopup');
+                               dojo.connect(this.tooltipDialog, 'onOpen', this, 'renderTranslatorPopup');
 
                                this.nls = dojo.i18n.getLocalization("openils.widget", "TranslatorPopup");
 
 
                                this.nls = dojo.i18n.getLocalization("openils.widget", "TranslatorPopup");
 
@@ -183,7 +183,7 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) {
                                        isdeleted : method == 'delete' ? 1 : 0,
                                        id : trans_id,
                                        fq_field : this._targetObject.classname + '.' + this.field,
                                        isdeleted : method == 'delete' ? 1 : 0,
                                        id : trans_id,
                                        fq_field : this._targetObject.classname + '.' + this.field,
-                                       identity_value : this._targetObject.id(),
+                                       identity_value : this._targetObject[fieldmapper[this._targetObject.classname].Identifier](),
                                        translation : dijit.byId('locale_' + trans_id).getValue(),
                                        string : dijit.byId('translation_' + trans_id).getValue()
                                });
                                        translation : dijit.byId('locale_' + trans_id).getValue(),
                                        string : dijit.byId('translation_' + trans_id).getValue()
                                });
@@ -197,7 +197,7 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) {
                                var trans_obj = new i18n().fromHash({
                                        isnew : 1,
                                        fq_field : this._targetObject.classname + '.' + this.field,
                                var trans_obj = new i18n().fromHash({
                                        isnew : 1,
                                        fq_field : this._targetObject.classname + '.' + this.field,
-                                       identity_value : this._targetObject.id(),
+                                       identity_value : this._targetObject[fieldmapper[this._targetObject.classname].Identifier](),
                                        translation : dijit.byId('i18n_new_locale_' + this._targetObject.classname + '.' + this.field + this.unique).getValue(),
                                        string : dijit.byId('i18n_new_translation_' + this._targetObject.classname + '.' + this.field + this.unique).getValue()
                                });
                                        translation : dijit.byId('i18n_new_locale_' + this._targetObject.classname + '.' + this.field + this.unique).getValue(),
                                        string : dijit.byId('i18n_new_translation_' + this._targetObject.classname + '.' + this.field + this.unique).getValue()
                                });