X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fnode%2Fcontent_types.js;fp=web%2Fcore%2Fmodules%2Fnode%2Fcontent_types.js;h=9d2f24e66ce68400c84d8cba5a236f268df0f275;hp=eed93f01c92754e98dc17bca0ff270403da7c3ce;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/node/content_types.js b/web/core/modules/node/content_types.js index eed93f01c..9d2f24e66 100644 --- a/web/core/modules/node/content_types.js +++ b/web/core/modules/node/content_types.js @@ -1,24 +1,15 @@ /** - * @file - * Javascript for the node content editing form. - */ +* DO NOT EDIT THIS FILE. +* See the following change record for more information, +* https://www.drupal.org/node/2815083 +* @preserve +**/ (function ($, Drupal) { - - 'use strict'; - - /** - * Behaviors for setting summaries on content type form. - * - * @type {Drupal~behavior} - * - * @prop {Drupal~behaviorAttach} attach - * Attaches summary behaviors on content type edit forms. - */ Drupal.behaviors.contentTypes = { - attach: function (context) { + attach: function attach(context) { var $context = $(context); - // Provide the vertical tab summaries. + $context.find('#edit-submission').drupalSetSummary(function (context) { var vals = []; vals.push(Drupal.checkPlain($(context).find('#edit-title-label').val()) || Drupal.t('Requires a title')); @@ -26,7 +17,7 @@ }); $context.find('#edit-workflow').drupalSetSummary(function (context) { var vals = []; - $(context).find('input[name^="options"]:checked').parent().each(function () { + $(context).find('input[name^="options"]:checked').next('label').each(function () { vals.push(Drupal.checkPlain($(this).text())); }); if (!$(context).find('#edit-options-status').is(':checked')) { @@ -58,5 +49,4 @@ }); } }; - -})(jQuery, Drupal); +})(jQuery, Drupal); \ No newline at end of file