[open-ils-commits] r16946 - trunk/Open-ILS/web/js/dojo/openils/widget (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 15 17:19:30 EDT 2010
Author: senator
Date: 2010-07-15 17:19:24 -0400 (Thu, 15 Jul 2010)
New Revision: 16946
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js
Log:
make openils.widget.TranslatorPopup a little more environment-agnostic
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js 2010-07-15 20:27:18 UTC (rev 16945)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js 2010-07-15 21:19:24 UTC (rev 16946)
@@ -20,6 +20,7 @@
dojo._hasResource["openils.widget.TranslatorPopup"] = true;
dojo.provide("openils.widget.TranslatorPopup");
dojo.require("openils.I18N");
+ dojo.require("openils.User");
dojo.require("fieldmapper.dojoData");
dojo.require("DojoSRF");
dojo.require("dojo.data.ItemFileWriteStore");
@@ -214,16 +215,16 @@
OpenSRF.CachedClientSession('open-ils.permacrud').request({
method : 'open-ils.permacrud.' + method + '.i18n',
timeout: 10,
- params : [ ses, trans_obj ],
+ params : [ openils.User.authtoken, trans_obj ],
onerror: function (r) {
//highlighter.editor_pane.red.play();
- if (status_update) status_update( 'Problem saving translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
+ if ((typeof status_update != "undefined") && status_update) status_update( 'Problem saving translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
},
oncomplete : function (r) {
var res = r.recv();
if ( res && res.content() ) {
//highlighter.editor_pane.green.play();
- if (status_update) status_update( 'Saved changes to translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
+ if ((typeof status_update != "undefined") && status_update) status_update( 'Saved changes to translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
if (method == 'delete') {
dojo.NodeList(dojo.byId('translation_row_' + trans_obj.id())).orphan();
@@ -236,7 +237,7 @@
} else {
//highlighter.editor_pane.red.play();
- if (status_update) status_update( 'Problem saving translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
+ if ((typeof status_update != "undefined") && status_update) status_update( 'Problem saving translation for ' + _trans_dijit._targetObject[_trans_dijit.field]() );
}
},
}).send();
More information about the open-ils-commits
mailing list