/[drupal]/drupal/modules/comment/comment-node-form.js
ViewVC logotype

Contents of /drupal/modules/comment/comment-node-form.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Fri Aug 21 00:21:48 2009 UTC (3 months ago) by webchick
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-9, DRUPAL-7-0-UNSTABLE-10, HEAD
Changes since 1.2: +20 -1 lines
File MIME type: text/javascript
#439798 by Rob Loach: Added Vertical Tabs to the Node Type Form.
1 // $Id: comment-node-form.js,v 1.2 2009/04/27 20:19:36 webchick Exp $
2
3 (function ($) {
4
5 Drupal.behaviors.commentFieldsetSummaries = {
6 attach: function (context) {
7 $('fieldset#edit-comment-settings', context).setSummary(function (context) {
8 return Drupal.checkPlain($('input:checked', context).parent().text());
9 });
10 // Provide the summary for the node type form.
11 $('fieldset#edit-comment', context).setSummary(function(context) {
12 var vals = [];
13
14 // Default comment setting.
15 vals.push($("select[name='comment'] option:selected", context).text());
16
17 // Threading.
18 var threading = $("input[name='comment_default_mode']:checked", context).parent().text();
19 if (threading) {
20 vals.push(threading);
21 }
22
23 // Comments per page.
24 var number = $("select[name='comment_default_per_page'] option:selected", context).val();
25 vals.push(Drupal.t('@number comments per page', {'@number': number}));
26
27 return Drupal.checkPlain(vals.join(', '));
28 });
29 }
30 };
31
32 })(jQuery);

  ViewVC Help
Powered by ViewVC 1.1.2