Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -8,8 +8,12 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Set a summary on the menu link form.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Find the form and call `drupalSetSummary` on it.
|
||||
*/
|
||||
Drupal.behaviors.menuUiDetailsSummaries = {
|
||||
attach: function (context) {
|
||||
|
@ -29,14 +33,19 @@
|
|||
* Automatically fill in a menu link title, if possible.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches change and keyup behavior for automatically filling out menu
|
||||
* link titles.
|
||||
*/
|
||||
Drupal.behaviors.menuUiLinkAutomaticTitle = {
|
||||
attach: function (context) {
|
||||
var $context = $(context);
|
||||
$context.find('.menu-link-form').each(function () {
|
||||
var $this = $(this);
|
||||
// Try to find menu settings widget elements as well as a 'title' field in
|
||||
// the form, but play nicely with user permissions and form alterations.
|
||||
// Try to find menu settings widget elements as well as a 'title' field
|
||||
// in the form, but play nicely with user permissions and form
|
||||
// alterations.
|
||||
var $checkbox = $this.find('.form-item-menu-enabled input');
|
||||
var $link_title = $context.find('.form-item-menu-title input');
|
||||
var $title = $this.closest('form').find('.form-item-title-0-value input');
|
||||
|
@ -44,8 +53,9 @@
|
|||
if (!($checkbox.length && $link_title.length && $title.length)) {
|
||||
return;
|
||||
}
|
||||
// If there is a link title already, mark it as overridden. The user expects
|
||||
// that toggling the checkbox twice will take over the node's title.
|
||||
// If there is a link title already, mark it as overridden. The user
|
||||
// expects that toggling the checkbox twice will take over the node's
|
||||
// title.
|
||||
if ($checkbox.is(':checked') && $link_title.val().length) {
|
||||
$link_title.data('menuLinkAutomaticTitleOverridden', true);
|
||||
}
|
||||
|
|
Reference in a new issue