Commit 4f6c4013 authored by Dries's avatar Dries
Browse files

- Patch #1426698 by droplet: Fixed book.js: fix vertical tabs summary & clean up.

parent 7500befb
(function ($) {
Drupal.behaviors.bookFieldsetSummaries = {
attach: function (context) {
$('fieldset.book-form', context).drupalSetSummary(function (context) {
var val = $('.form-item-book-bid select').val();
$('fieldset.book-outline-form', context).drupalSetSummary(function (context) {
var $select = $('.form-item-book-bid select');
var val = $select.val();
if (val === '0') {
return Drupal.t('Not in book');
......@@ -13,7 +13,7 @@ Drupal.behaviors.bookFieldsetSummaries = {
return Drupal.t('New book');
}
else {
return Drupal.checkPlain($('.form-item-book-bid select :selected').text());
return Drupal.checkPlain($select.find(':selected').text());
}
});
}
......
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