Mercurial > hg > rr-repo
view modules/node/content_types.js @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
line wrap: on
line source
(function ($) { Drupal.behaviors.contentTypes = { attach: function (context) { // Provide the vertical tab summaries. $('fieldset#edit-submission', context).drupalSetSummary(function(context) { var vals = []; vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires a title')); return vals.join(', '); }); $('fieldset#edit-workflow', context).drupalSetSummary(function(context) { var vals = []; $("input[name^='node_options']:checked", context).parent().each(function() { vals.push(Drupal.checkPlain($(this).text())); }); if (!$('#edit-node-options-status', context).is(':checked')) { vals.unshift(Drupal.t('Not published')); } return vals.join(', '); }); $('fieldset#edit-display', context).drupalSetSummary(function(context) { var vals = []; $('input:checked', context).next('label').each(function() { vals.push(Drupal.checkPlain($(this).text())); }); if (!$('#edit-node-submitted', context).is(':checked')) { vals.unshift(Drupal.t("Don't display post information")); } return vals.join(', '); }); } }; })(jQuery);