Commit cde3375b authored by Dries's avatar Dries

- Patch #1016056 by nod_: added Hide tabledrag handle and 'Show row weights'...

- Patch #1016056 by nod_: added Hide tabledrag handle and 'Show row weights' when there is only one item in list.
parent 9b29a0da
......@@ -84,7 +84,10 @@ Drupal.tableDrag = function (table, tableSettings) {
// Make each applicable row draggable.
// Match immediate children of the parent element to allow nesting.
$table.find('> tr.draggable, > tbody > tr.draggable').each(function () { self.makeDraggable(this); });
var $rows = $table.find('> tr.draggable, > tbody > tr.draggable');
if ($rows.length > 1) {
$rows.each(function () { self.makeDraggable(this); });
}
// Add a link before the table for users to show or hide weight columns.
$table.before($('<a href="#" class="tabledrag-toggle-weight"></a>')
......
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