Author: ralfbecker
New Revision: 55364
URL: http://svn.stylite.de/viewvc/egroupware?rev=55364&view=rev
Log:
fix actions got wrong row, if thead/tfooter (part attribute != “body”) was used
Modified:
trunk/etemplate/js/et2_widget_grid.js
— trunk/etemplate/js/et2_widget_grid.js (original)
+++ trunk/etemplate/js/et2_widget_grid.js Fri Mar 11 19:57:18 2016
@@ -188,8 +188,8 @@
et2_filteredNodeIterator(columns, function(node, nodeName) {
var colDataEntry = this._getColDataEntry();
// This cannot be done inside a nm, it will expand it later
-
colDataEntry["disabled"] = nm ?
-
et2_readAttrWithDefault(node, "disabled", "") :
-
colDataEntry["disabled"] = nm ?
-
et2_readAttrWithDefault(node, "disabled", "") :
this.getArrayMgr("content")
.parseBoolExpression(et2_readAttrWithDefault(node, "disabled", ""));
if (nodeName == "column")
@@ -953,27 +953,24 @@
// ‘allowed’ for this widget at this time
var action_links = this._get_action_links(actions);
-
// Deal with each row
-
for(var i = 0; i < this.rowData.length; i++)
-
{
-
// Add a new action object to the object manager
-
var row = $j('tr', this.tbody)[i];
-
var aoi = new et2_action_object_impl(this, row);
-
var id = "row_"+i;
-
// Deal with each row in tbody, ignore action-wise rows in thead or tfooter for now
-
for(var i = 0, r = 0; i < this.rowData.length; i++)
-
{
-
if (this.rowData[i].part != 'body') continue;
var content = this.getArrayMgr('content').getEntry(i);
-
if(content && content.id)
-
{
-
id = content.id;
-
}
-
var obj = widget_object.addObject(id, aoi);
-
-
// Set the data to the content so it's available for the action
if(content)
{
-
// Add a new action object to the object manager
-
var row = $j('tr', this.tbody)[r];
-
var aoi = new et2_action_object_impl(this, row);
-
var obj = widget_object.addObject(content.id || "row_"+r, aoi);
-
-
// Set the data to the content so it's available for the action
obj.data = content;
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs