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

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

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


Revision 1.4 - (show annotations) (download) (as text)
Mon Apr 27 20:19:37 2009 UTC (6 months, 4 weeks ago) by webchick
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-8, DRUPAL-7-0-UNSTABLE-9, DRUPAL-7-0-UNSTABLE-7, HEAD
Changes since 1.3: +7 -7 lines
File MIME type: text/javascript
#444402 follow-up by kkaefer: Fix autocomplete, enforce code style for anonymous JS functions.
1 // $Id: node.js,v 1.3 2009/04/11 22:19:45 webchick Exp $
2
3 (function ($) {
4
5 Drupal.behaviors.nodeFieldsetSummaries = {
6 attach: function (context) {
7 $('fieldset#edit-revision-information', context).setSummary(function (context) {
8 return $('#edit-revision', context).is(':checked') ?
9 Drupal.t('New revision') :
10 Drupal.t('No revision');
11 });
12
13 $('fieldset#edit-author', context).setSummary(function (context) {
14 var name = $('#edit-name').val(), date = $('#edit-date').val();
15 return date ?
16 Drupal.t('By @name on @date', { '@name': name, '@date': date }) :
17 Drupal.t('By @name', { '@name': name });
18 });
19
20 $('fieldset#edit-options', context).setSummary(function (context) {
21 var vals = [];
22
23 $('input:checked', context).parent().each(function () {
24 vals.push(Drupal.checkPlain($.trim($(this).text())));
25 });
26
27 if (!$('#edit-status', context).is(':checked')) {
28 vals.unshift(Drupal.t('Not published'));
29 }
30 return vals.join(', ');
31 });
32 }
33 };
34
35 })(jQuery);

  ViewVC Help
Powered by ViewVC 1.1.2