Drupal.verticalTabs.options currently uses hard-coded element IDs to find publishing option checkboxes.

Some modules might provide additional publishing options (e.g. Custom Publishing Options), but these options will not have summaries unless they provide their own javascript.

Refactoring the code to avoid hard-coded IDs will provide support for other modules' options, with no additional effort by module authors.

Comments

andrewmacpherson’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB
new22.58 KB

Here comes the patch, and a screenshot demonstrating custom_pub.module working with it.

D7 core vertical tabs already does something very similar.

dave reid’s picture

Status: Needs review » Fixed

I used a slight modification:

  var vals = [];
  $('fieldset.vertical-tabs-options input:checked').parent().each(function () {
    vals.push(Drupal.checkPlain($.trim($(this).text())));
  });
  if (!$('#edit-status').is(':checked')) {
    vals.unshift(Drupal.t('Not published'));
  }
  return vals.join(', ');

Committed to CVS! http://drupal.org/cvs?commit=328630

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.