Fix actions over grid always return the last row DOMNode, by passing DOMNode to et2_action_object_impl constructor for cases like the infamous loop problem (JS closure)

This commit is contained in:
Hadi Nategh
2014-02-18 13:59:45 +00:00
parent e789a8f3ee
commit d500e4cc91
2 changed files with 9 additions and 5 deletions

View File

@@ -704,12 +704,16 @@ var et2_surroundingsMgr = Class.extend(
* The class extension is different than the widgets
*
* @param {et2_DOMWidget} widget
* @param {Object} node
*
*/
function et2_action_object_impl(widget)
function et2_action_object_impl(widget, node)
{
var aoi = new egwActionObjectInterface();
var objectNode = node;
aoi.doGetDOMNode = function() {
return widget.getDOMNode();
return objectNode?objectNode:widget.getDOMNode();
};
// _outerCall may be used to determine, whether the state change has been
@@ -732,7 +736,7 @@ function et2_action_object_impl(widget)
break;
}
};
return aoi;
};