Mercurial > hg > cmmr2012-drupal-site
comparison core/misc/entity-form.js @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 /** | |
2 * DO NOT EDIT THIS FILE. | |
3 * See the following change record for more information, | |
4 * https://www.drupal.org/node/2815083 | |
5 * @preserve | |
6 **/ | |
7 | |
8 (function ($, Drupal) { | |
9 Drupal.behaviors.entityContentDetailsSummaries = { | |
10 attach: function attach(context) { | |
11 var $context = $(context); | |
12 $context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) { | |
13 var $revisionContext = $(context); | |
14 var revisionCheckbox = $revisionContext.find('.js-form-item-revision input'); | |
15 | |
16 if (revisionCheckbox.is(':checked') || !revisionCheckbox.length && $revisionContext.find('.js-form-item-revision-log textarea').length) { | |
17 return Drupal.t('New revision'); | |
18 } | |
19 | |
20 return Drupal.t('No revision'); | |
21 }); | |
22 | |
23 $context.find('details.entity-translation-options').drupalSetSummary(function (context) { | |
24 var $translationContext = $(context); | |
25 var translate = void 0; | |
26 var $checkbox = $translationContext.find('.js-form-item-translation-translate input'); | |
27 | |
28 if ($checkbox.length) { | |
29 translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated'); | |
30 } else { | |
31 $checkbox = $translationContext.find('.js-form-item-translation-retranslate input'); | |
32 translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated'); | |
33 } | |
34 | |
35 return translate; | |
36 }); | |
37 } | |
38 }; | |
39 })(jQuery, Drupal); |