Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / path / path.js
1 /**
2  * @file
3  * Attaches behaviors for the Path module.
4  */
5 (function ($, Drupal) {
6
7   'use strict';
8
9   /**
10    * Behaviors for settings summaries on path edit forms.
11    *
12    * @type {Drupal~behavior}
13    *
14    * @prop {Drupal~behaviorAttach} attach
15    *   Attaches summary behavior on path edit forms.
16    */
17   Drupal.behaviors.pathDetailsSummaries = {
18     attach: function (context) {
19       $(context).find('.path-form').drupalSetSummary(function (context) {
20         var path = $('.js-form-item-path-0-alias input').val();
21
22         return path ?
23           Drupal.t('Alias: @alias', {'@alias': path}) :
24           Drupal.t('No alias');
25       });
26     }
27   };
28
29 })(jQuery, Drupal);