Mercurial > hg > cmmr2012-drupal-site
view core/modules/path/path.es6.js @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | c75dbcec494b |
children | a9cd425dd02b |
line wrap: on
line source
/** * @file * Attaches behaviors for the Path module. */ (function ($, Drupal) { /** * Behaviors for settings summaries on path edit forms. * * @type {Drupal~behavior} * * @prop {Drupal~behaviorAttach} attach * Attaches summary behavior on path edit forms. */ Drupal.behaviors.pathDetailsSummaries = { attach(context) { $(context).find('.path-form').drupalSetSummary((context) => { const path = $('.js-form-item-path-0-alias input').val(); return path ? Drupal.t('Alias: @alias', { '@alias': path }) : Drupal.t('No alias'); }); }, }; }(jQuery, Drupal));