current_search.js 681 B

12345678910111213141516171819202122
  1. (function ($) {
  2. /**
  3. * Provide the summary information for the block settings vertical tabs.
  4. */
  5. Drupal.behaviors.currentSearch = {
  6. attach: function (context) {
  7. // The drupalSetSummary method required for this behavior is not available
  8. // on the Blocks administration page, so we need to make sure this
  9. // behavior is processed only if drupalSetSummary is defined.
  10. if (typeof jQuery.fn.drupalSetSummary == 'undefined') {
  11. return;
  12. }
  13. $('fieldset#edit-current-search', context).drupalSetSummary(function (context) {
  14. var $radio = $('input[name="searcher"]:checked', context);
  15. return $radio.next('label').text();
  16. });
  17. }
  18. };
  19. })(jQuery);