/[drupal]/drupal/modules/node/content_types.js
ViewVC logotype

Contents of /drupal/modules/node/content_types.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (show annotations) (download) (as text)
Sat Aug 22 23:18:28 2009 UTC (3 months ago) by webchick
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-9, HEAD
Changes since 1.6: +1 -23 lines
File MIME type: text/javascript
#471018 by clemens.tolboom, sun, stBorchert, and mverbaar: Added generic pattern/js for hiding machine readable names (applied to menu and content types).
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);

  ViewVC Help
Powered by ViewVC 1.1.2