From e888f0061cb7ca2f07b38ad4ff09da99faa75580 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 11 Apr 2009 22:19:46 +0000 Subject: #323112 by dmitrig01, kkaefer, quicksketch, frando and many many more: Now presenting... Vertical Tabs. Fantastic new UI improvement for node forms and hopefully more in the future. --- modules/comment/comment-node-form.js | 13 +++++++++++++ modules/comment/comment.module | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 modules/comment/comment-node-form.js (limited to 'modules/comment') diff --git a/modules/comment/comment-node-form.js b/modules/comment/comment-node-form.js new file mode 100644 index 000000000..9c7dea7cc --- /dev/null +++ b/modules/comment/comment-node-form.js @@ -0,0 +1,13 @@ +// $Id$ + +(function($) { + +Drupal.behaviors.commentFieldsetSummaries = { + attach: function(context) { + $('fieldset#edit-comment-settings', context).setSummary(function(context) { + return Drupal.checkPlain($('input:checked', context).parent().text()); + }); + } +}; + +})(jQuery); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e00057506..6c7e582fa 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -580,6 +580,8 @@ function comment_form_alter(&$form, $form_state, $form_id) { '#title' => t('Comment settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, + '#group' => 'additional_settings', + '#attached_js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'), '#weight' => 30, ); $comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0; -- cgit v1.2.3