2015-08-18 00:00:26 +00:00
|
|
|
/**
|
2018-11-23 12:29:20 +00:00
|
|
|
* DO NOT EDIT THIS FILE.
|
|
|
|
* See the following change record for more information,
|
|
|
|
* https://www.drupal.org/node/2815083
|
|
|
|
* @preserve
|
|
|
|
**/
|
2015-08-18 00:00:26 +00:00
|
|
|
|
2016-04-20 16:56:34 +00:00
|
|
|
(function ($, Drupal) {
|
2017-04-13 14:53:35 +00:00
|
|
|
Drupal.behaviors.entityContentDetailsSummaries = {
|
2018-11-23 12:29:20 +00:00
|
|
|
attach: function attach(context) {
|
2015-08-18 00:00:26 +00:00
|
|
|
var $context = $(context);
|
2017-04-13 14:53:35 +00:00
|
|
|
$context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) {
|
2015-08-18 00:00:26 +00:00
|
|
|
var $revisionContext = $(context);
|
2015-10-08 18:40:12 +00:00
|
|
|
var revisionCheckbox = $revisionContext.find('.js-form-item-revision input');
|
|
|
|
|
2018-11-23 12:29:20 +00:00
|
|
|
if (revisionCheckbox.is(':checked') || !revisionCheckbox.length && $revisionContext.find('.js-form-item-revision-log textarea').length) {
|
2015-08-18 00:00:26 +00:00
|
|
|
return Drupal.t('New revision');
|
|
|
|
}
|
|
|
|
|
|
|
|
return Drupal.t('No revision');
|
|
|
|
});
|
|
|
|
|
2017-04-13 14:53:35 +00:00
|
|
|
$context.find('details.entity-translation-options').drupalSetSummary(function (context) {
|
2015-08-18 00:00:26 +00:00
|
|
|
var $translationContext = $(context);
|
2018-11-23 12:29:20 +00:00
|
|
|
var translate = void 0;
|
2015-10-08 18:40:12 +00:00
|
|
|
var $checkbox = $translationContext.find('.js-form-item-translation-translate input');
|
2015-08-18 00:00:26 +00:00
|
|
|
|
2017-04-13 14:53:35 +00:00
|
|
|
if ($checkbox.length) {
|
2015-08-18 00:00:26 +00:00
|
|
|
translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated');
|
2018-11-23 12:29:20 +00:00
|
|
|
} else {
|
2015-10-08 18:40:12 +00:00
|
|
|
$checkbox = $translationContext.find('.js-form-item-translation-retranslate input');
|
2015-08-18 00:00:26 +00:00
|
|
|
translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated');
|
|
|
|
}
|
|
|
|
|
|
|
|
return translate;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2018-11-23 12:29:20 +00:00
|
|
|
})(jQuery, Drupal);
|