summaryrefslogtreecommitdiff
path: root/modules/book
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-11-05 19:47:20 +0000
committerDries Buytaert <dries@buytaert.net>2010-11-05 19:47:20 +0000
commitae85abb9833e0600afa0595a912be8065f8bccab (patch)
tree93940d8f28f7f5c63c07ecab9d94bdf20544fbbe /modules/book
parente920fe34ef16d30af0f4fb8e33b565e572ab30c8 (diff)
downloadbrdo-ae85abb9833e0600afa0595a912be8065f8bccab.tar.gz
brdo-ae85abb9833e0600afa0595a912be8065f8bccab.tar.bz2
- Patch #955610 by casey: impossible to have multiple node forms on one page due to fixed IDs.
Diffstat (limited to 'modules/book')
-rw-r--r--modules/book/book.js6
-rw-r--r--modules/book/book.module3
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/book/book.js b/modules/book/book.js
index 66bb39288..c529e5821 100644
--- a/modules/book/book.js
+++ b/modules/book/book.js
@@ -4,8 +4,8 @@
Drupal.behaviors.bookFieldsetSummaries = {
attach: function (context) {
- $('fieldset#edit-book', context).drupalSetSummary(function (context) {
- var val = $('#edit-book-bid').val();
+ $('fieldset.book-form', context).drupalSetSummary(function (context) {
+ var val = $('.form-item-book-bid select').val();
if (val === '0') {
return Drupal.t('Not in book');
@@ -14,7 +14,7 @@ Drupal.behaviors.bookFieldsetSummaries = {
return Drupal.t('New book');
}
else {
- return Drupal.checkPlain($('#edit-book-bid :selected').text());
+ return Drupal.checkPlain($('.form-item-book-bid select :selected').text());
}
});
}
diff --git a/modules/book/book.module b/modules/book/book.module
index 517d25ca0..fa59a1bd9 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -488,6 +488,9 @@ function _book_add_form_elements(&$form, &$form_state, $node) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
+ '#attributes' => array(
+ 'class' => array('book-form'),
+ ),
'#attached' => array(
'js' => array(drupal_get_path('module', 'book') . '/book.js'),
),