diff --git a/modules/book/book.admin.inc b/modules/book/book.admin.inc index 7b9dea3..7baa60a 100644 --- a/modules/book/book.admin.inc +++ b/modules/book/book.admin.inc @@ -174,10 +174,6 @@ function _book_admin_table($node, &$form) { * @see book_admin_edit() */ function _book_admin_table_tree($tree, &$form) { - // The delta must be big enough to give each node a distinct value. - $count = count($tree); - $delta = ($count < 30) ? 15 : intval($count / 2) + 1; - foreach ($tree as $data) { $form['book-admin-' . $data['link']['nid']] = array( '#item' => $data['link'], @@ -191,9 +187,8 @@ function _book_admin_table_tree($tree, &$form) { '#size' => 40, ), 'weight' => array( - '#type' => 'weight', + '#type' => 'textfield', '#default_value' => $data['link']['weight'], - '#delta' => max($delta, abs($data['link']['weight'])), '#title' => t('Weight for @title', array('@title' => $data['link']['title'])), '#title_display' => 'invisible', ), diff --git a/modules/book/book.module b/modules/book/book.module index 82d38f7..41a24c1 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -509,12 +509,10 @@ 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', + '#type' => 'textfield', '#title' => t('Weight'), '#default_value' => $node->book['weight'], - '#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.'), );