Chris@0: /** Chris@0: * DO NOT EDIT THIS FILE. Chris@0: * See the following change record for more information, Chris@0: * https://www.drupal.org/node/2815083 Chris@0: * @preserve Chris@0: **/ Chris@0: Chris@0: (function ($, Drupal) { Chris@0: Drupal.behaviors.bookDetailsSummaries = { Chris@0: attach: function attach(context) { Chris@0: $(context).find('.book-outline-form').drupalSetSummary(function (context) { Chris@0: var $select = $(context).find('.book-title-select'); Chris@0: var val = $select.val(); Chris@0: Chris@0: if (val === '0') { Chris@0: return Drupal.t('Not in book'); Chris@17: } Chris@17: if (val === 'new') { Chris@0: return Drupal.t('New book'); Chris@0: } Chris@0: Chris@0: return Drupal.checkPlain($select.find(':selected').text()); Chris@0: }); Chris@0: } Chris@0: }; Chris@0: })(jQuery, Drupal);