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,7 +8,15 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Sets summaries about revision and translation of block content.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches summary behaviour block content form tabs.
|
||||
*
|
||||
* Specifically, it updates summaries to the revision information and the
|
||||
* translation options.
|
||||
*/
|
||||
Drupal.behaviors.blockContentDetailsSummaries = {
|
||||
attach: function (context) {
|
||||
|
@ -17,10 +25,11 @@
|
|||
var $revisionContext = $(context);
|
||||
var revisionCheckbox = $revisionContext.find('.form-item-revision input');
|
||||
|
||||
// Return 'New revision' if the 'Create new revision' checkbox is checked,
|
||||
// or if the checkbox doesn't exist, but the revision log does. For users
|
||||
// without the "Administer content" permission the checkbox won't appear,
|
||||
// but the revision log will if the content type is set to auto-revision.
|
||||
// Return 'New revision' if the 'Create new revision' checkbox is
|
||||
// checked, or if the checkbox doesn't exist, but the revision log does.
|
||||
// For users without the "Administer content" permission the checkbox
|
||||
// won't appear, but the revision log will if the content type is set
|
||||
// to auto-revision.
|
||||
if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $revisionContext.find('.form-item-revision-log textarea').length)) {
|
||||
return Drupal.t('New revision');
|
||||
}
|
||||
|
|
Reference in a new issue