diff --git a/misc/tabledrag.js b/misc/tabledrag.js index edcb5def5e858061ac06272854b451d5b262f3e1..24e7276b2778078aec6553f4f83a993b37b27a29 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -690,9 +690,16 @@ Drupal.tableDrag.prototype.updateField = function(changedRow, group) { $('option', targetElement).each(function() { values.push(this.value); }); + var maxVal = values[values.length - 1]; // Populate the values in the siblings. $(targetClass, siblings).each(function() { - this.value = values.shift(); + // If there are more items than possible values, assign the maximum value to the row. + if (values.length > 0) { + this.value = values.shift(); + } + else { + this.value = maxVal; + } }); } else { diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index 89e6f8bd69df7111434aa100d8876d354f216375..e564c5356dd86bf118d9ae6c093c084827946c25 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -80,6 +80,7 @@ function _menu_overview_tree_form($tree) { ); $form[$mlid]['weight'] = array( '#type' => 'weight', + '#delta' => 50, '#default_value' => isset($form_state[$mlid]['weight']) ? $form_state[$mlid]['weight'] : $item['weight'], ); $form[$mlid]['mlid'] = array(