X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fbook%2Fbook.es6.js;fp=web%2Fcore%2Fmodules%2Fbook%2Fbook.es6.js;h=deb518ba9b3ab5050bfb7650ec82f664860ceab0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=c04929bf2041706f4822122221f78603d22a8327;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/book/book.es6.js b/web/core/modules/book/book.es6.js index c04929bf2..deb518ba9 100644 --- a/web/core/modules/book/book.es6.js +++ b/web/core/modules/book/book.es6.js @@ -3,7 +3,7 @@ * Javascript behaviors for the Book module. */ -(function ($, Drupal) { +(function($, Drupal) { /** * Adds summaries to the book outline form. * @@ -14,19 +14,21 @@ */ Drupal.behaviors.bookDetailsSummaries = { attach(context) { - $(context).find('.book-outline-form').drupalSetSummary((context) => { - const $select = $(context).find('.book-title-select'); - const val = $select.val(); + $(context) + .find('.book-outline-form') + .drupalSetSummary(context => { + const $select = $(context).find('.book-title-select'); + const val = $select.val(); - if (val === '0') { - return Drupal.t('Not in book'); - } - else if (val === 'new') { - return Drupal.t('New book'); - } + if (val === '0') { + return Drupal.t('Not in book'); + } + if (val === 'new') { + return Drupal.t('New book'); + } - return Drupal.checkPlain($select.find(':selected').text()); - }); + return Drupal.checkPlain($select.find(':selected').text()); + }); }, }; -}(jQuery, Drupal)); +})(jQuery, Drupal);