mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2024-11-25 23:43:27 +00:00
27 lines
589 B
JavaScript
27 lines
589 B
JavaScript
/**
|
|
* @file
|
|
* Javascript behaviors for the Book module.
|
|
*/
|
|
|
|
(function ($) {
|
|
|
|
Drupal.behaviors.bookFieldsetSummaries = {
|
|
attach: function (context) {
|
|
$('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');
|
|
}
|
|
else if (val === 'new') {
|
|
return Drupal.t('New book');
|
|
}
|
|
else {
|
|
return Drupal.checkPlain($select.find(':selected').text());
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
})(jQuery);
|