Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / book / book.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function ($, Drupal) {
9   Drupal.behaviors.bookDetailsSummaries = {
10     attach: function attach(context) {
11       $(context).find('.book-outline-form').drupalSetSummary(function (context) {
12         var $select = $(context).find('.book-title-select');
13         var val = $select.val();
14
15         if (val === '0') {
16           return Drupal.t('Not in book');
17         } else if (val === 'new') {
18           return Drupal.t('New book');
19         }
20
21         return Drupal.checkPlain($select.find(':selected').text());
22       });
23     }
24   };
25 })(jQuery, Drupal);