updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -9,8 +9,8 @@ dependencies:
|
||||
- file
|
||||
configure: filter.admin_overview
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
@@ -567,6 +567,7 @@
|
||||
// If any filter's current status forbids the editor feature, return
|
||||
// false.
|
||||
Drupal.filterConfiguration.update();
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const filterID in Drupal.filterConfiguration.statuses) {
|
||||
if (Drupal.filterConfiguration.statuses.hasOwnProperty(filterID)) {
|
||||
const filterStatus = Drupal.filterConfiguration.statuses[filterID];
|
||||
@@ -879,17 +880,15 @@
|
||||
* up-to-date.
|
||||
*/
|
||||
update() {
|
||||
for (const filterID in Drupal.filterConfiguration.statuses) {
|
||||
if (Drupal.filterConfiguration.statuses.hasOwnProperty(filterID)) {
|
||||
// Update status.
|
||||
Drupal.filterConfiguration.statuses[filterID].active = $(`[name="filters[${filterID}][status]"]`).is(':checked');
|
||||
Object.keys(Drupal.filterConfiguration.statuses || {}).forEach((filterID) => {
|
||||
// Update status.
|
||||
Drupal.filterConfiguration.statuses[filterID].active = $(`[name="filters[${filterID}][status]"]`).is(':checked');
|
||||
|
||||
// Update current rules.
|
||||
if (Drupal.filterConfiguration.liveSettingParsers[filterID]) {
|
||||
Drupal.filterConfiguration.statuses[filterID].rules = Drupal.filterConfiguration.liveSettingParsers[filterID].getRules();
|
||||
}
|
||||
// Update current rules.
|
||||
if (Drupal.filterConfiguration.liveSettingParsers[filterID]) {
|
||||
Drupal.filterConfiguration.statuses[filterID].rules = Drupal.filterConfiguration.liveSettingParsers[filterID].getRules();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -256,6 +256,7 @@
|
||||
}
|
||||
|
||||
Drupal.filterConfiguration.update();
|
||||
|
||||
for (var filterID in Drupal.filterConfiguration.statuses) {
|
||||
if (Drupal.filterConfiguration.statuses.hasOwnProperty(filterID)) {
|
||||
var filterStatus = Drupal.filterConfiguration.statuses[filterID];
|
||||
@@ -331,15 +332,13 @@
|
||||
liveSettingParsers: {},
|
||||
|
||||
update: function update() {
|
||||
for (var filterID in Drupal.filterConfiguration.statuses) {
|
||||
if (Drupal.filterConfiguration.statuses.hasOwnProperty(filterID)) {
|
||||
Drupal.filterConfiguration.statuses[filterID].active = $('[name="filters[' + filterID + '][status]"]').is(':checked');
|
||||
Object.keys(Drupal.filterConfiguration.statuses || {}).forEach(function (filterID) {
|
||||
Drupal.filterConfiguration.statuses[filterID].active = $('[name="filters[' + filterID + '][status]"]').is(':checked');
|
||||
|
||||
if (Drupal.filterConfiguration.liveSettingParsers[filterID]) {
|
||||
Drupal.filterConfiguration.statuses[filterID].rules = Drupal.filterConfiguration.liveSettingParsers[filterID].getRules();
|
||||
}
|
||||
if (Drupal.filterConfiguration.liveSettingParsers[filterID]) {
|
||||
Drupal.filterConfiguration.statuses[filterID].rules = Drupal.filterConfiguration.liveSettingParsers[filterID].getRules();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* The text area DOM element, if it was found.
|
||||
*/
|
||||
function findFieldForFormatSelector($formatSelector) {
|
||||
const field_id = $formatSelector.attr('data-editor-for');
|
||||
const fieldId = $formatSelector.attr('data-editor-for');
|
||||
// This selector will only find text areas in the top-level document. We do
|
||||
// not support attaching editors on text areas within iframes.
|
||||
return $(`#${field_id}`).get(0);
|
||||
return $(`#${fieldId}`).get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@
|
||||
const message = Drupal.t('Changing the text format to %text_format will permanently remove content that is not allowed in that text format.<br><br>Save your changes before switching the text format to avoid losing data.', {
|
||||
'%text_format': $select.find('option:selected').text(),
|
||||
});
|
||||
var confirmationDialog = Drupal.dialog(`<div>${message}</div>`, {
|
||||
const confirmationDialog = Drupal.dialog(`<div>${message}</div>`, {
|
||||
title: Drupal.t('Change text format?'),
|
||||
dialogClass: 'editor-change-text-format-modal',
|
||||
resizable: false,
|
||||
|
||||
@@ -140,9 +140,9 @@
|
||||
}
|
||||
break;
|
||||
|
||||
case 'active':
|
||||
var textElement = this.$textElement.get(0);
|
||||
var toolbarView = fieldModel.toolbarView;
|
||||
case 'active': {
|
||||
const textElement = this.$textElement.get(0);
|
||||
const toolbarView = fieldModel.toolbarView;
|
||||
this.textEditor.attachInlineEditor(
|
||||
textElement,
|
||||
this.textFormat,
|
||||
@@ -155,6 +155,7 @@
|
||||
fieldModel.set('state', 'changed');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case 'changed':
|
||||
break;
|
||||
|
||||
@@ -73,15 +73,17 @@
|
||||
break;
|
||||
|
||||
case 'active':
|
||||
var textElement = this.$textElement.get(0);
|
||||
var toolbarView = fieldModel.toolbarView;
|
||||
this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId());
|
||||
{
|
||||
var textElement = this.$textElement.get(0);
|
||||
var toolbarView = fieldModel.toolbarView;
|
||||
this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId());
|
||||
|
||||
this.textEditor.onChange(textElement, function (htmlText) {
|
||||
editorModel.set('currentValue', htmlText);
|
||||
fieldModel.set('state', 'changed');
|
||||
});
|
||||
break;
|
||||
this.textEditor.onChange(textElement, function (htmlText) {
|
||||
editorModel.set('currentValue', htmlText);
|
||||
fieldModel.set('state', 'changed');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case 'changed':
|
||||
break;
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
(function ($, Drupal, drupalSettings) {
|
||||
function findFieldForFormatSelector($formatSelector) {
|
||||
var field_id = $formatSelector.attr('data-editor-for');
|
||||
var fieldId = $formatSelector.attr('data-editor-for');
|
||||
|
||||
return $('#' + field_id).get(0);
|
||||
return $('#' + fieldId).get(0);
|
||||
}
|
||||
|
||||
function changeTextEditor(field, newFormatID) {
|
||||
|
||||
@@ -15,6 +15,8 @@ use Drupal\Core\Entity\EntityStorageInterface;
|
||||
|
||||
/**
|
||||
* Provides an image dialog for text editors.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class EditorImageDialog extends FormBase {
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ use Drupal\Core\Ajax\CloseModalDialogCommand;
|
||||
|
||||
/**
|
||||
* Provides a link dialog for text editors.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class EditorLinkDialog extends FormBase {
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ class EditorUploadImageScaleTest extends WebTestBase {
|
||||
*/
|
||||
protected function uploadImage($uri) {
|
||||
$edit = [
|
||||
'files[fid]' => drupal_realpath($uri),
|
||||
'files[fid]' => \Drupal::service('file_system')->realpath($uri),
|
||||
];
|
||||
$this->drupalGet('editor/dialog/image/basic_html');
|
||||
$this->drupalPostForm('editor/dialog/image/basic_html', $edit, t('Upload'));
|
||||
|
||||
@@ -8,8 +8,8 @@ dependencies:
|
||||
- filter
|
||||
- ckeditor
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
@@ -5,8 +5,8 @@ description: 'Support module for the Text Editor module tests.'
|
||||
package: Testing
|
||||
# version: VERSION
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace Drupal\Tests\editor\Unit;
|
||||
|
||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||
use Drupal\Core\Entity\EntityManager;
|
||||
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
use Drupal\editor\Entity\Editor;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
@@ -22,9 +24,9 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
|
||||
/**
|
||||
* The entity manager used for testing.
|
||||
*
|
||||
* @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
|
||||
* @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
protected $entityManager;
|
||||
protected $entityTypeManager;
|
||||
|
||||
/**
|
||||
* The ID of the type of the entity under test.
|
||||
@@ -66,8 +68,8 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
|
||||
->method('getProvider')
|
||||
->will($this->returnValue('editor'));
|
||||
|
||||
$this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
|
||||
$this->entityManager->expects($this->any())
|
||||
$this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
|
||||
$this->entityTypeManager->expects($this->any())
|
||||
->method('getDefinition')
|
||||
->with($this->entityTypeId)
|
||||
->will($this->returnValue($this->entityType));
|
||||
@@ -78,10 +80,16 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entity_manager = new EntityManager();
|
||||
|
||||
$container = new ContainerBuilder();
|
||||
$container->set('entity.manager', $this->entityManager);
|
||||
$container->set('entity.manager', $entity_manager);
|
||||
$container->set('entity_type.manager', $this->entityTypeManager);
|
||||
$container->set('uuid', $this->uuid);
|
||||
$container->set('plugin.manager.editor', $this->editorPluginManager);
|
||||
// Inject the container into entity.manager so it can defer to
|
||||
// entity_type.manager.
|
||||
$entity_manager->setContainer($container);
|
||||
\Drupal::setContainer($container);
|
||||
}
|
||||
|
||||
@@ -120,7 +128,7 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
|
||||
->with($format_id)
|
||||
->will($this->returnValue($filter_format));
|
||||
|
||||
$this->entityManager->expects($this->once())
|
||||
$this->entityTypeManager->expects($this->once())
|
||||
->method('getStorage')
|
||||
->with('filter_format')
|
||||
->will($this->returnValue($storage));
|
||||
|
||||
Reference in New Issue
Block a user