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 = {
|
2017-05-19 22:12:53 +00:00
|
|
|
attach: function attach(context) {
|
2013-02-18 22:17:49 +00:00
|
|
|
var $context = $(context);
|
2016-12-13 15:45:12 +00:00
|
|
|
$context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) {
|
2015-01-10 01:36:01 +00:00
|
|
|
var $revisionContext = $(context);
|
2015-09-20 16:57:36 +00:00
|
|
|
var revisionCheckbox = $revisionContext.find('.js-form-item-revision input');
|
|
|
|
|
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');
|
|
|
|
});
|
2016-12-13 15:45:12 +00:00
|
|
|
$context.find('details.entity-translation-options').drupalSetSummary(function (context) {
|
2015-01-10 01:36:01 +00:00
|
|
|
var $translationContext = $(context);
|
2020-01-30 09:08:38 +00:00
|
|
|
var translate;
|
2015-09-20 16:57:36 +00:00
|
|
|
var $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;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2017-05-19 22:12:53 +00:00
|
|
|
})(jQuery, Drupal);
|