--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cms/drupal/modules/book/book.js Fri Sep 08 12:04:06 2017 +0200
@@ -0,0 +1,27 @@
+/**
+ * @file
+ * Javascript behaviors for the Book module.
+ */
+
+(function ($) {
+
+Drupal.behaviors.bookFieldsetSummaries = {
+ attach: function (context) {
+ $('fieldset.book-outline-form', context).drupalSetSummary(function (context) {
+ var $select = $('.form-item-book-bid 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);