2013-02-18 22:17:49 +00:00
|
|
|
/**
|
2017-05-19 22:12:53 +00:00
|
|
|
* DO NOT EDIT THIS FILE.
|
|
|
|
* See the following change record for more information,
|
2017-05-23 14:30:14 +00:00
|
|
|
* https://www.drupal.org/node/2815083
|
2017-05-19 22:12:53 +00:00
|
|
|
* @preserve
|
|
|
|
**/
|
2013-02-18 22:17:49 +00:00
|
|
|
|
2016-02-29 03:25:57 +00:00
|
|
|
(function ($, Drupal) {
|
2016-12-13 15:45:12 +00:00
|
|
|
Drupal.behaviors.entityContentDetailsSummaries = {
|
2021-12-18 06:12:16 +00:00
|
|
|
attach(context) {
|
|
|
|
const $context = $(context);
|
|
|
|
$context.find('.entity-content-form-revision-information').drupalSetSummary(context => {
|
|
|
|
const $revisionContext = $(context);
|
|
|
|
const revisionCheckbox = $revisionContext.find('.js-form-item-revision input');
|
2015-09-20 16:57:36 +00:00
|
|
|
|
2017-05-19 22:12:53 +00:00
|
|
|
if (revisionCheckbox.is(':checked') || !revisionCheckbox.length && $revisionContext.find('.js-form-item-revision-log textarea').length) {
|
2014-01-27 21:41:32 +00:00
|
|
|
return Drupal.t('New revision');
|
|
|
|
}
|
|
|
|
|
|
|
|
return Drupal.t('No revision');
|
|
|
|
});
|
2021-12-18 06:12:16 +00:00
|
|
|
$context.find('details.entity-translation-options').drupalSetSummary(context => {
|
|
|
|
const $translationContext = $(context);
|
|
|
|
let translate;
|
|
|
|
let $checkbox = $translationContext.find('.js-form-item-translation-translate input');
|
2014-01-27 21:41:32 +00:00
|
|
|
|
2017-01-25 13:14:14 +00:00
|
|
|
if ($checkbox.length) {
|
2014-01-27 21:41:32 +00:00
|
|
|
translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated');
|
2017-05-19 22:12:53 +00:00
|
|
|
} else {
|
2015-09-20 16:57:36 +00:00
|
|
|
$checkbox = $translationContext.find('.js-form-item-translation-retranslate input');
|
2014-01-27 21:41:32 +00:00
|
|
|
translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated');
|
|
|
|
}
|
|
|
|
|
|
|
|
return translate;
|
|
|
|
});
|
|
|
|
}
|
2021-12-18 06:12:16 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
};
|
2017-05-19 22:12:53 +00:00
|
|
|
})(jQuery, Drupal);
|