Index: modules/node/node.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.css,v
retrieving revision 1.7
diff -u -p -r1.7 node.css
--- modules/node/node.css 30 Mar 2009 03:15:40 -0000 1.7
+++ modules/node/node.css 22 Jun 2009 17:59:48 -0000
@@ -43,3 +43,11 @@ td.revision-current {
display: inline;
}
+#horizontal-tab-section-meta fieldset.collapsible legend {
+ font-weight: bold;
+}
+
+#horizontal-tab-section-meta fieldset.collapsible div.summary {
+ padding-left: 3em;
+ padding-bottom: 5px;
+}
Index: modules/node/node.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.js,v
retrieving revision 1.4
diff -u -p -r1.4 node.js
--- modules/node/node.js 27 Apr 2009 20:19:37 -0000 1.4
+++ modules/node/node.js 22 Jun 2009 18:00:19 -0000
@@ -32,4 +32,40 @@ Drupal.behaviors.nodeFieldsetSummaries =
}
};
+Drupal.behaviors.nodeMetaFieldsets = {
+ attach: function (context) {
+ $('#horizontal-tab-section-meta fieldset.collapsible legend', context)
+ .addClass('collapse-processed')
+ .parent().removeClass('collapsed')
+ .children(':not(legend)').hide()
+ .parent().append('
'
+ + Drupal.t('
more', {'@link': '#', '@title': 'More options'})
+ + '
')
+ .find('> div.more-link:last-child a', context).click(function() {
+ $(this).parent().parent().children(':not(legend, div.more-link, div.summary)').toggle();
+ var change_link = $(this).parent().parent().find('> div.summary a').get(0);
+ change_link.innerHTML = change_link.innerHTML == Drupal.t('change') ? Drupal.t('done') : Drupal.t('change');
+ this.innerHTML = this.innerHTML == Drupal.t('more') ? Drupal.t('less') : Drupal.t('more');
+ return false;
+ }).parent().parent().each(function() {
+ var summary = $('');
+ $(this).
+ bind('summaryUpdated', function () {
+ var text = $.trim($(this).getSummary());
+ summary.html((text ? text : Drupal.t('none')) + ' (' + ($(this).children(':not(legend, div.more-link, div.summary):visible').size() ? Drupal.t('done') : Drupal.t('change')) + ')');
+ summary.find('> a').click(function() {
+ this.innerHTML = this.innerHTML == Drupal.t('change') ? Drupal.t('done') : Drupal.t('change');
+ var fieldset = $(this).parent().parent();
+ fieldset.children(':not(legend, div.more-link, div.summary)').toggle();
+ var more_link = fieldset.find('> div.more-link:last-child a').get(0);
+ more_link.innerHTML = more_link.innerHTML == Drupal.t('more') ? Drupal.t('less') : Drupal.t('more');
+ return false;
+ });
+ })
+ .trigger('summaryUpdated');
+ $(this).find('> legend').after(summary);
+ });
+ }
+};
+
})(jQuery);
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.70
diff -u -p -r1.70 node.pages.inc
--- modules/node/node.pages.inc 22 Jun 2009 09:10:05 -0000 1.70
+++ modules/node/node.pages.inc 22 Jun 2009 17:59:48 -0000
@@ -167,8 +167,8 @@ function node_form(&$form_state, $node)
'#collapsible' => TRUE,
// Collapsed by default when "Create new revision" is unchecked
'#collapsed' => !$node->revision,
- '#group' => 'additional_settings',
- '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'),
+ '#group' => 'meta',
+ '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js' => array('weight' => -10)),
'#weight' => 20,
);
$form['revision_information']['revision'] = array(
@@ -193,8 +193,8 @@ function node_form(&$form_state, $node)
'#title' => t('Authoring information'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
- '#group' => 'additional_settings',
- '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'),
+ '#group' => 'meta',
+ '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js' => array('weight' => -10)),
'#weight' => 90,
);
$form['author']['name'] = array(
@@ -224,8 +224,8 @@ function node_form(&$form_state, $node)
'#title' => t('Publishing options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
- '#group' => 'additional_settings',
- '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'),
+ '#group' => 'meta',
+ '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js' => array('weight' => -10)),
'#weight' => 95,
);
$form['options']['status'] = array(