summaryrefslogtreecommitdiff
path: root/modules/book/book.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/book/book.module')
-rw-r--r--modules/book/book.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/book/book.module b/modules/book/book.module
index 25f0254d2..760eb5b62 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -510,11 +510,12 @@ function _book_add_form_elements(&$form, &$form_state, $node) {
$form['book']['plid'] = _book_parent_select($node->book);
+ // @see _book_admin_table_tree(). The weight may be larger than 15.
$form['book']['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight'),
'#default_value' => $node->book['weight'],
- '#delta' => 15,
+ '#delta' => max(15, abs($node->book['weight'])),
'#weight' => 5,
'#description' => t('Pages at a given level are ordered first by weight and then by title.'),
);