Mercurial > hg > isophonics-drupal-site
annotate core/modules/book/book.js @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
rev | line source |
---|---|
Chris@0 | 1 /** |
Chris@0 | 2 * DO NOT EDIT THIS FILE. |
Chris@0 | 3 * See the following change record for more information, |
Chris@0 | 4 * https://www.drupal.org/node/2815083 |
Chris@0 | 5 * @preserve |
Chris@0 | 6 **/ |
Chris@0 | 7 |
Chris@0 | 8 (function ($, Drupal) { |
Chris@0 | 9 Drupal.behaviors.bookDetailsSummaries = { |
Chris@0 | 10 attach: function attach(context) { |
Chris@0 | 11 $(context).find('.book-outline-form').drupalSetSummary(function (context) { |
Chris@0 | 12 var $select = $(context).find('.book-title-select'); |
Chris@0 | 13 var val = $select.val(); |
Chris@0 | 14 |
Chris@0 | 15 if (val === '0') { |
Chris@0 | 16 return Drupal.t('Not in book'); |
Chris@0 | 17 } else if (val === 'new') { |
Chris@0 | 18 return Drupal.t('New book'); |
Chris@0 | 19 } |
Chris@0 | 20 |
Chris@0 | 21 return Drupal.checkPlain($select.find(':selected').text()); |
Chris@0 | 22 }); |
Chris@0 | 23 } |
Chris@0 | 24 }; |
Chris@0 | 25 })(jQuery, Drupal); |