Version 1
[yaffs-website] / web / modules / contrib / simple_sitemap / js / simple_sitemap.fieldsetSummaries.js
diff --git a/web/modules/contrib/simple_sitemap/js/simple_sitemap.fieldsetSummaries.js b/web/modules/contrib/simple_sitemap/js/simple_sitemap.fieldsetSummaries.js
new file mode 100644 (file)
index 0000000..59081f0
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * @file
+ * Attaches simple_sitemap behaviors to the entity form.
+ */
+(function($) {
+
+  "use strict";
+
+  Drupal.behaviors.simple_sitemapFieldsetSummaries = {
+    attach: function(context) {
+      $(context).find('#edit-simple-sitemap').drupalSetSummary(function(context) {
+        var vals = [];
+        if ($(context).find('#edit-simple-sitemap-index-content-1').is(':checked')) {
+          vals.push(Drupal.t('Included in sitemap'));
+          vals.push(Drupal.t('Priority') + ' ' + $('#edit-simple-sitemap-priority option:selected', context).text());
+        }
+        else {
+          vals.push(Drupal.t('Excluded from sitemap'));
+        }
+        return vals.join('<br />');
+      });
+    }
+  };
+})(jQuery);