comparison core/modules/book/book.js @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 129ea1e6d783
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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);