| 1 |
// $Id: content_types.js,v 1.6 2009/08/21 00:21:48 webchick Exp $
|
| 2 |
(function ($) {
|
| 3 |
|
| 4 |
Drupal.behaviors.contentTypes = {
|
| 5 |
attach: function (context) {
|
| 6 |
// Provide the vertical tab summaries.
|
| 7 |
$('fieldset#edit-submission', context).setSummary(function(context) {
|
| 8 |
var vals = [];
|
| 9 |
vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires a title'));
|
| 10 |
vals.push(Drupal.checkPlain($('#edit-body-label', context).val()) || Drupal.t('No body'));
|
| 11 |
return vals.join(', ');
|
| 12 |
});
|
| 13 |
$('fieldset#edit-workflow', context).setSummary(function(context) {
|
| 14 |
var vals = [];
|
| 15 |
$("input[name^='node_options']:checked", context).parent().each(function() {
|
| 16 |
vals.push(Drupal.checkPlain($(this).text()));
|
| 17 |
});
|
| 18 |
if (!$('#edit-node-options-status', context).is(':checked')) {
|
| 19 |
vals.unshift(Drupal.t('Not published'));
|
| 20 |
}
|
| 21 |
return vals.join(', ');
|
| 22 |
});
|
| 23 |
$('fieldset#edit-display', context).setSummary(function(context) {
|
| 24 |
var vals = [];
|
| 25 |
$('input:checked', context).parent().each(function() {
|
| 26 |
vals.push(Drupal.checkPlain($(this).text()));
|
| 27 |
});
|
| 28 |
if (!$('#edit-node-submitted', context).is(':checked')) {
|
| 29 |
vals.unshift(Drupal.t("Don't display post information"));
|
| 30 |
}
|
| 31 |
return vals.join(', ');
|
| 32 |
});
|
| 33 |
}
|
| 34 |
};
|
| 35 |
|
| 36 |
})(jQuery);
|