2012-10-11 17:01:49 +00:00
|
|
|
/**
|
2017-05-19 22:12:53 +00:00
|
|
|
* DO NOT EDIT THIS FILE.
|
|
|
|
* See the following change record for more information,
|
2017-05-23 14:30:14 +00:00
|
|
|
* https://www.drupal.org/node/2815083
|
2017-05-19 22:12:53 +00:00
|
|
|
* @preserve
|
|
|
|
**/
|
2012-10-11 17:01:49 +00:00
|
|
|
|
2016-02-29 03:25:57 +00:00
|
|
|
(function ($, Drupal) {
|
2014-01-27 21:41:32 +00:00
|
|
|
Drupal.behaviors.bookDetailsSummaries = {
|
2017-05-19 22:12:53 +00:00
|
|
|
attach: function attach(context) {
|
2014-01-27 21:41:32 +00:00
|
|
|
$(context).find('.book-outline-form').drupalSetSummary(function (context) {
|
|
|
|
var $select = $(context).find('.book-title-select');
|
|
|
|
var val = $select.val();
|
2009-04-11 22:19:46 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
if (val === '0') {
|
|
|
|
return Drupal.t('Not in book');
|
2018-07-05 15:50:52 +00:00
|
|
|
}
|
|
|
|
if (val === 'new') {
|
2014-01-27 21:41:32 +00:00
|
|
|
return Drupal.t('New book');
|
|
|
|
}
|
2017-07-06 06:21:40 +00:00
|
|
|
|
|
|
|
return Drupal.checkPlain($select.find(':selected').text());
|
2014-01-27 21:41:32 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2017-05-19 22:12:53 +00:00
|
|
|
})(jQuery, Drupal);
|