59081f09149277ac257f4ea4dd4957a32531d97e
[yaffs-website] / web / modules / contrib / simple_sitemap / js / simple_sitemap.fieldsetSummaries.js
1 /**
2  * @file
3  * Attaches simple_sitemap behaviors to the entity form.
4  */
5 (function($) {
6
7   "use strict";
8
9   Drupal.behaviors.simple_sitemapFieldsetSummaries = {
10     attach: function(context) {
11       $(context).find('#edit-simple-sitemap').drupalSetSummary(function(context) {
12         var vals = [];
13         if ($(context).find('#edit-simple-sitemap-index-content-1').is(':checked')) {
14           vals.push(Drupal.t('Included in sitemap'));
15           vals.push(Drupal.t('Priority') + ' ' + $('#edit-simple-sitemap-priority option:selected', context).text());
16         }
17         else {
18           vals.push(Drupal.t('Excluded from sitemap'));
19         }
20         return vals.join('<br />');
21       });
22     }
23   };
24 })(jQuery);