mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-6120: UI > listView widget > sorting order > fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
e.g. An Template/ISO of multiple zones have the same UUID.
This commit is contained in:
parent
443acac927
commit
e1e16a2301
@ -1180,8 +1180,17 @@
|
||||
if (actionName == 'moveDrag') return false;
|
||||
|
||||
rowActions[actionName]($tr);
|
||||
var map1 = {};
|
||||
$tr.closest('tbody').find('tr').each(function() {
|
||||
/*
|
||||
* fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
|
||||
* e.g. An Template/ISO of multiple zones have the same UUID.
|
||||
*/
|
||||
var objId = $(this).data('json-obj').id;
|
||||
if(!(objId in map1)) {
|
||||
sort($(this), action);
|
||||
map1[objId] = 1;
|
||||
}
|
||||
});
|
||||
$tr.closest('.data-table').dataTable('selectRow', $tr.index());
|
||||
|
||||
@ -1203,7 +1212,15 @@
|
||||
rowActions._std($tr, function() {});
|
||||
|
||||
$tr.closest('tbody').find('tr').each(function() {
|
||||
/*
|
||||
* fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
|
||||
* e.g. An Template/ISO of multiple zones have the same UUID.
|
||||
*/
|
||||
var objId = $(this).data('json-obj').id;
|
||||
if(!(objId in map1)) {
|
||||
sort($(this), reorder.moveDrag);
|
||||
map1[objId] = 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user