Mercurial > hg > rr-repo
view modules/book/book.js @ 2:b74b41bb73f0
-- Google analytics module
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 22 Aug 2013 17:22:54 +0100 |
parents | ff03f76ab3fe |
children |
line wrap: on
line source
/** * @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);