Fix some window/scope issues with jquery & plain assign handlers to make sure they operate on the window, not the request context (which can be anything)

This commit is contained in:
Nathan Gray 2013-10-28 22:22:09 +00:00
parent 388b2cbceb
commit 4d29125c41

View File

@ -262,7 +262,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
(typeof res.data.key != 'undefined') && (typeof res.data.key != 'undefined') &&
(typeof res.data.value != 'undefined')) (typeof res.data.value != 'undefined'))
{ {
var obj = document.getElementById(res.data.id); var obj = _wnd.document.getElementById(res.data.id);
if (obj) if (obj)
{ {
obj[res.data.key] = res.data.value; obj[res.data.key] = res.data.value;
@ -359,7 +359,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
return true; return true;
} }
throw 'Invalid parameters'; throw 'Invalid parameters';
}, null, 'jquery'); }, _wnd, 'jquery');
// Register the "redirect" plugin // Register the "redirect" plugin
json.registerJSONPlugin(function(type, res, req) { json.registerJSONPlugin(function(type, res, req) {