2012-11-10 15:25:19 +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
|
|
|
|
**/
|
2012-11-10 15:25:19 +00:00
|
|
|
|
2013-09-21 23:39:42 +00:00
|
|
|
(function ($, Drupal, drupalSettings) {
|
2014-01-27 21:41:32 +00:00
|
|
|
Drupal.behaviors.nodeDetailsSummaries = {
|
2017-05-19 22:12:53 +00:00
|
|
|
attach: function attach(context) {
|
2012-04-07 07:19:30 +00:00
|
|
|
var $context = $(context);
|
2014-01-27 21:41:32 +00:00
|
|
|
$context.find('.node-form-author').drupalSetSummary(function (context) {
|
2015-01-10 01:36:01 +00:00
|
|
|
var $authorContext = $(context);
|
Issue #2214241 by mortendk, mdrummond, lauriii, galooph, ShaunDychko, jjcarrion, b0unty, joelpittet, scor, amitgoyal, aboros, Manuel Garcia, hkirsman, BLadwin, hussainweb, sushilkr, emma.maria, nlisgo, yched, LewisNyman, davidhernandez, mikl, camoa, dman, dodorama: Field default markup - removing the divitis
2015-08-26 08:36:43 +00:00
|
|
|
var name = $authorContext.find('.field--name-uid input').val();
|
|
|
|
var date = $authorContext.find('.field--name-created input').val();
|
2015-12-10 14:56:01 +00:00
|
|
|
|
|
|
|
if (name && date) {
|
2018-08-09 15:49:18 +00:00
|
|
|
return Drupal.t('By @name on @date', {
|
|
|
|
'@name': name,
|
|
|
|
'@date': date
|
|
|
|
});
|
2018-07-05 15:50:52 +00:00
|
|
|
}
|
2020-01-30 09:08:38 +00:00
|
|
|
|
2018-07-05 15:50:52 +00:00
|
|
|
if (name) {
|
2020-01-30 09:08:38 +00:00
|
|
|
return Drupal.t('By @name', {
|
|
|
|
'@name': name
|
|
|
|
});
|
2018-07-05 15:50:52 +00:00
|
|
|
}
|
2020-01-30 09:08:38 +00:00
|
|
|
|
2018-07-05 15:50:52 +00:00
|
|
|
if (date) {
|
2020-01-30 09:08:38 +00:00
|
|
|
return Drupal.t('Authored on @date', {
|
|
|
|
'@date': date
|
|
|
|
});
|
2015-12-10 14:56:01 +00:00
|
|
|
}
|
2014-01-27 21:41:32 +00:00
|
|
|
});
|
|
|
|
$context.find('.node-form-options').drupalSetSummary(function (context) {
|
2015-01-10 01:36:01 +00:00
|
|
|
var $optionsContext = $(context);
|
2014-01-27 21:41:32 +00:00
|
|
|
var vals = [];
|
2009-04-11 22:19:46 +00:00
|
|
|
|
2015-01-10 01:36:01 +00:00
|
|
|
if ($optionsContext.find('input').is(':checked')) {
|
|
|
|
$optionsContext.find('input:checked').next('label').each(function () {
|
2021-10-12 19:17:13 +00:00
|
|
|
vals.push(Drupal.checkPlain($(this).text().trim()));
|
2014-01-27 21:41:32 +00:00
|
|
|
});
|
|
|
|
return vals.join(', ');
|
|
|
|
}
|
2017-07-06 06:21:40 +00:00
|
|
|
|
|
|
|
return Drupal.t('Not promoted');
|
2014-01-27 21:41:32 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2017-05-19 22:12:53 +00:00
|
|
|
})(jQuery, Drupal, drupalSettings);
|