Merged in [14354] from rcross@amsl.com:

Fix problem where slide reordering is not retained.  Fixes #2405.
 - Legacy-Id: 14357
Note: SVN reference [14354] has been migrated to Git commit fec655caf9
This commit is contained in:
Henrik Levkowetz 2017-11-11 07:03:39 +00:00
commit 2ca8c562de

View file

@ -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 ) {