Commit 8e199103 authored by alexpott's avatar alexpott

Issue #2412579 by idebr, geertvd: Tabledrag applies odd/even classes to tables...

Issue #2412579 by idebr, geertvd: Tabledrag applies odd/even classes to tables with striping disabled
parent fa9e1854
......@@ -1042,6 +1042,9 @@ function template_preprocess_table(&$variables) {
}
}
}
if (empty($variables['no_striping'])) {
$variables['attributes']['data-striping'] = 1;
}
}
/**
......
......@@ -60,6 +60,7 @@
this.changed = false; // Whether anything in the entire table has changed.
this.maxDepth = 0; // Maximum amount of allowed parenting.
this.rtl = $(this.table).css('direction') === 'rtl' ? -1 : 1; // Direction of the table.
this.striping = $(this.table).data('striping') === 1;
// Configure the scroll settings.
this.scrollSettings = {amount: 4, interval: 50, trigger: 70};
......@@ -459,7 +460,9 @@
$(self.oldRowElement).removeClass('drag-previous');
}
self.oldRowElement = item;
self.restripeTable();
if (self.striping === true) {
self.restripeTable();
}
self.onDrag();
}
......@@ -556,7 +559,9 @@
else {
self.rowObject.swap('before', currentRow, self);
}
self.restripeTable();
if (self.striping === true) {
self.restripeTable();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment