mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Fixes bug #556: Updating elements on page >1 error
The element tr is now retrieved from the whole pool of elements in the datatable, not just from the visible ones. Also, pagination is not resetted anymore when updating a single element.
This commit is contained in:
parent
d9db42e40d
commit
cd7d62998d
@ -143,9 +143,10 @@ function updateView(item_list,data_table){
|
||||
|
||||
//replaces an element with id 'tag' in a dataTable with a new one
|
||||
function updateSingleElement(element,data_table,tag){
|
||||
var tr = $(tag).parents('tr')[0];
|
||||
var nodes = data_table.fnGetNodes();
|
||||
var tr = $(tag,nodes).parents('tr')[0];
|
||||
var position = data_table.fnGetPosition(tr);
|
||||
data_table.fnUpdate(element,position,0);
|
||||
data_table.fnUpdate(element,position,0,false);
|
||||
$('input',data_table).trigger("change");
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user