Fix problem where slide reordering is not retained. Fixes #2405. Commit ready for merge.
- Legacy-Id: 14354
This commit is contained in:
parent
5ac6cf3987
commit
fec655caf9
|
@ -69,12 +69,12 @@
|
|||
|
||||
$(".slides tbody").sortable({
|
||||
helper: rowWidthHelper,
|
||||
stop: function(event,ui) {adjustDatabase("#slides")}
|
||||
stop: function(event,ui) {adjustDatabase(ui.item.parent())}
|
||||
}).disableSelection();
|
||||
});
|
||||
|
||||
function adjustDatabase(tableID) {
|
||||
$(tableID + " tr").each(function() {
|
||||
function adjustDatabase(tbody) {
|
||||
tbody.find('tr').each(function() {
|
||||
count = $(this).parent().children().index($(this)) + 1;
|
||||
old_order = $(this).attr("data-order");
|
||||
if ( count != old_order ) {
|
||||
|
|
Loading…
Reference in a new issue