Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
32
core/modules/book/book.js
Normal file
32
core/modules/book/book.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* @file
|
||||
* Javascript behaviors for the Book module.
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @type {Drupal~behavior}
|
||||
*/
|
||||
Drupal.behaviors.bookDetailsSummaries = {
|
||||
attach: function (context) {
|
||||
$(context).find('.book-outline-form').drupalSetSummary(function (context) {
|
||||
var $select = $(context).find('.book-title-select');
|
||||
var val = $select.val();
|
||||
|
||||
if (val === '0') {
|
||||
return Drupal.t('Not in book');
|
||||
}
|
||||
else if (val === 'new') {
|
||||
return Drupal.t('New book');
|
||||
}
|
||||
else {
|
||||
return Drupal.checkPlain($select.find(':selected').text());
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
Reference in a new issue