mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
fix actions got wrong row, if thead/tfooter (part attribute != "body") was used
This commit is contained in:
parent
021d992463
commit
999b0a7083
@ -953,28 +953,25 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta
|
||||
// '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++)
|
||||
// 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++)
|
||||
{
|
||||
// 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;
|
||||
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;
|
||||
}
|
||||
|
||||
obj.updateActionLinks(action_links);
|
||||
}
|
||||
r++;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user