Get submit buttons + buttons with no onclick function in a nm row (legacy actions) to at least fire

This commit is contained in:
Nathan Gray 2011-09-22 16:25:41 +00:00
parent afb4dff864
commit 15ed02894f
2 changed files with 7 additions and 6 deletions

View File

@ -323,6 +323,7 @@ var et2_dataview_rowProvider = Class.extend({
// Create the row widget and insert the given widgets into the row // Create the row widget and insert the given widgets into the row
var rowWidget = new et2_dataview_rowWidget(rowTemplate.mgrs, row[0]); var rowWidget = new et2_dataview_rowWidget(rowTemplate.mgrs, row[0]);
rowWidget._parent = _rootWidget;
rowWidget.createWidgets(_widgets); rowWidget.createWidgets(_widgets);
// Get the set containing all variable attributes // Get the set containing all variable attributes
@ -500,12 +501,12 @@ var et2_dataview_rowWidget = et2_widget.extend(et2_IDOMNode, {
var et2_dataview_rowTemplateWidget = et2_widget.extend(et2_IDOMNode, { var et2_dataview_rowTemplateWidget = et2_widget.extend(et2_IDOMNode, {
init: function(_mgrs, _row) { init: function(_root, _row) {
// Call the parent constructor with some dummy attributes // Call the parent constructor with some dummy attributes
this._super(null, {"id": "", "type": "rowTemplateWidget"}); this._super(null, {"id": "", "type": "rowTemplateWidget"});
// Copy the managers - do not use "setArrayMgrs" here this._root = _root;
this._mgrs = _mgrs; this._mgrs = {};
this._row = _row; this._row = _row;
// Clone the widgets inside the placeholders array // Clone the widgets inside the placeholders array

View File

@ -174,10 +174,10 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
if (typeof _values["onclick"] == "function") if (typeof _values["onclick"] == "function")
{ {
this.options.onclick = _values["onclick"]; this.options.onclick = _values["onclick"];
this.btn.bind("click.et2_baseWidget", this, function(e) {
return e.data.click.call(e.data,e);
});
} }
this.btn.bind("click.et2_baseWidget", this, function(e) {
return e.data.click.call(e.data,e);
});
} }
}); });