1 |
85ad3d82
|
Assos Assos
|
(function ($) {
|
2 |
|
|
|
3 |
|
|
Drupal.behaviors.contentTypes = {
|
4 |
|
|
attach: function (context) {
|
5 |
|
|
|
6 |
|
|
$('fieldset#edit-submission', context).drupalSetSummary(function(context) {
|
7 |
|
|
var vals = [];
|
8 |
|
|
vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires a title'));
|
9 |
|
|
return vals.join(', ');
|
10 |
|
|
});
|
11 |
|
|
$('fieldset#edit-workflow', context).drupalSetSummary(function(context) {
|
12 |
|
|
var vals = [];
|
13 |
|
|
$("input[name^='node_options']:checked", context).parent().each(function() {
|
14 |
|
|
vals.push(Drupal.checkPlain($(this).text()));
|
15 |
|
|
});
|
16 |
|
|
if (!$('#edit-node-options-status', context).is(':checked')) {
|
17 |
|
|
vals.unshift(Drupal.t('Not published'));
|
18 |
|
|
}
|
19 |
|
|
return vals.join(', ');
|
20 |
|
|
});
|
21 |
|
|
$('fieldset#edit-display', context).drupalSetSummary(function(context) {
|
22 |
|
|
var vals = [];
|
23 |
|
|
$('input:checked', context).next('label').each(function() {
|
24 |
|
|
vals.push(Drupal.checkPlain($(this).text()));
|
25 |
|
|
});
|
26 |
|
|
if (!$('#edit-node-submitted', context).is(':checked')) {
|
27 |
|
|
vals.unshift(Drupal.t("Don't display post information"));
|
28 |
|
|
}
|
29 |
|
|
return vals.join(', ');
|
30 |
|
|
});
|
31 |
|
|
}
|
32 |
|
|
};
|
33 |
|
|
|
34 |
|
|
})(jQuery); |