| author | ymh <ymh.work@gmail.com> |
| Wed, 13 Sep 2017 22:19:57 +0200 | |
| changeset 545 | 82cec9b2fcc9 |
| parent 541 | e756a8c72c3d |
| permissions | -rw-r--r-- |
/** * @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);