updated core from 8.4 to 8.5 : bug with login_destination

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 14:01:21 +01:00
parent 0d78da249b
commit e668535a4e
3486 changed files with 89604 additions and 33283 deletions
+3 -3
View File
@@ -7,8 +7,8 @@ package: Core
dependencies:
- editor
# 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: 1520457826
+5 -5
View File
@@ -16,9 +16,9 @@
margin: 5px 0;
/* Disallow any user selections in the drag-and-drop toolbar config UI. */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.ckeditor-toolbar-active {
margin-top: 0.25em;
@@ -180,7 +180,7 @@
padding: 4px 6px;
position: relative;
text-decoration: none;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
white-space: nowrap;
}
.ckeditor-toolbar-dividers {
@@ -296,7 +296,7 @@ ul.ckeditor-buttons li.ckeditor-button-separator a {
height: 18px;
width: 1px;
display: block;
box-shadow: 1px 0 1px rgba(255, 255, 255, 0.5)
box-shadow: 1px 0 1px rgba(255, 255, 255, 0.5);
}
.ckeditor-button-arrow {
width: 0;
+1 -1
View File
@@ -7,7 +7,7 @@
.ckeditor-dialog-loading-link {
border-radius: 0 0 5px 5px;
border: 1px solid #B6B6B6;
border: 1px solid #b6b6b6;
border-top: none;
background: white;
padding: 3px 10px;
@@ -34,7 +34,7 @@
$configurationForm.append(drupalSettings.ckeditor.toolbarAdmin);
// Create a configuration model.
const model = Drupal.ckeditor.models.Model = new Drupal.ckeditor.Model({
Drupal.ckeditor.models.Model = new Drupal.ckeditor.Model({
$textarea,
activeEditorConfig: JSON.parse($textarea.val()),
hiddenEditorConfig: drupalSettings.ckeditor.hiddenCKEditorConfig,
@@ -42,7 +42,7 @@
// Create the configuration Views.
const viewDefaults = {
model,
model: Drupal.ckeditor.models.Model,
el: $('.ckeditor-toolbar-configuration'),
};
Drupal.ckeditor.views = {
@@ -194,7 +194,7 @@
.find('input')
.addClass('error')
.attr('aria-invalid', 'true');
$(`<div class=\"description\" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]);
$(`<div class="description" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]);
}
return true;
}
@@ -290,7 +290,7 @@
// Create a Drupal dialog that will get a button group name from the user.
const $ckeditorButtonGroupNameForm = $(Drupal.theme('ckeditorButtonGroupNameForm'));
var dialog = Drupal.dialog($ckeditorButtonGroupNameForm.get(0), {
const dialog = Drupal.dialog($ckeditorButtonGroupNameForm.get(0), {
title: Drupal.t('Button group name'),
dialogClass: 'ckeditor-name-toolbar-group',
resizable: false,
+2 -2
View File
@@ -16,14 +16,14 @@
$configurationForm.append(drupalSettings.ckeditor.toolbarAdmin);
var model = Drupal.ckeditor.models.Model = new Drupal.ckeditor.Model({
Drupal.ckeditor.models.Model = new Drupal.ckeditor.Model({
$textarea: $textarea,
activeEditorConfig: JSON.parse($textarea.val()),
hiddenEditorConfig: drupalSettings.ckeditor.hiddenCKEditorConfig
});
var viewDefaults = {
model: model,
model: Drupal.ckeditor.models.Model,
el: $('.ckeditor-toolbar-configuration')
};
Drupal.ckeditor.views = {
+3 -5
View File
@@ -182,11 +182,9 @@
const externalPlugins = format.editorSettings.drupalExternalPlugins;
// Register and load additional CKEditor plugins as necessary.
if (externalPlugins) {
for (const pluginName in externalPlugins) {
if (externalPlugins.hasOwnProperty(pluginName)) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
}
}
Object.keys(externalPlugins || {}).forEach((pluginName) => {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
});
delete format.editorSettings.drupalExternalPlugins;
}
},
+3 -5
View File
@@ -102,11 +102,9 @@
var externalPlugins = format.editorSettings.drupalExternalPlugins;
if (externalPlugins) {
for (var pluginName in externalPlugins) {
if (externalPlugins.hasOwnProperty(pluginName)) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
}
}
Object.keys(externalPlugins || {}).forEach(function (pluginName) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
});
delete format.editorSettings.drupalExternalPlugins;
}
}
@@ -34,11 +34,9 @@
function getAttributes(editor, data) {
const set = {};
for (const attributeName in data) {
if (data.hasOwnProperty(attributeName)) {
set[attributeName] = data[attributeName];
}
}
Object.keys(data || {}).forEach((attributeName) => {
set[attributeName] = data[attributeName];
});
// CKEditor tracks the *actual* saved href in a data-cke-saved-* attribute
// to work around browser quirks. We need to update it.
@@ -46,11 +44,9 @@
// Remove all attributes which are not currently set.
const removed = {};
for (const s in set) {
if (set.hasOwnProperty(s)) {
delete removed[s];
}
}
Object.keys(set).forEach((s) => {
delete removed[s];
});
return {
set,
@@ -133,20 +129,18 @@
}
// Update the link properties.
else if (linkElement) {
for (const attrName in returnValues.attributes) {
if (returnValues.attributes.hasOwnProperty(attrName)) {
// Update the property if a value is specified.
if (returnValues.attributes[attrName].length > 0) {
const value = returnValues.attributes[attrName];
linkElement.data(`cke-saved-${attrName}`, value);
linkElement.setAttribute(attrName, value);
}
// Delete the property if set to an empty string.
else {
linkElement.removeAttribute(attrName);
}
Object.keys(returnValues.attributes || {}).forEach((attrName) => {
// Update the property if a value is specified.
if (returnValues.attributes[attrName].length > 0) {
const value = returnValues.attributes[attrName];
linkElement.data(`cke-saved-${attrName}`, value);
linkElement.setAttribute(attrName, value);
}
}
// Delete the property if set to an empty string.
else {
linkElement.removeAttribute(attrName);
}
});
}
// Save snapshot for undo support.
@@ -32,20 +32,16 @@
function getAttributes(editor, data) {
var set = {};
for (var attributeName in data) {
if (data.hasOwnProperty(attributeName)) {
set[attributeName] = data[attributeName];
}
}
Object.keys(data || {}).forEach(function (attributeName) {
set[attributeName] = data[attributeName];
});
set['data-cke-saved-href'] = set.href;
var removed = {};
for (var s in set) {
if (set.hasOwnProperty(s)) {
delete removed[s];
}
}
Object.keys(set).forEach(function (s) {
delete removed[s];
});
return {
set: set,
@@ -113,17 +109,15 @@
linkElement = getSelectedLink(editor);
} else if (linkElement) {
for (var attrName in returnValues.attributes) {
if (returnValues.attributes.hasOwnProperty(attrName)) {
if (returnValues.attributes[attrName].length > 0) {
var value = returnValues.attributes[attrName];
linkElement.data('cke-saved-' + attrName, value);
linkElement.setAttribute(attrName, value);
} else {
linkElement.removeAttribute(attrName);
}
}
}
Object.keys(returnValues.attributes || {}).forEach(function (attrName) {
if (returnValues.attributes[attrName].length > 0) {
var value = returnValues.attributes[attrName];
linkElement.data('cke-saved-' + attrName, value);
linkElement.setAttribute(attrName, value);
} else {
linkElement.removeAttribute(attrName);
}
});
}
editor.fire('saveSnapshot');
@@ -150,11 +150,9 @@
const hiddenEditorConfig = this.model.get('hiddenEditorConfig');
if (hiddenEditorConfig.drupalExternalPlugins) {
const externalPlugins = hiddenEditorConfig.drupalExternalPlugins;
for (const pluginName in externalPlugins) {
if (externalPlugins.hasOwnProperty(pluginName)) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
}
}
Object.keys(externalPlugins || {}).forEach((pluginName) => {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
});
}
CKEDITOR.inline($(`#${hiddenCKEditorID}`).get(0), CKEditorConfig);
@@ -181,17 +179,15 @@
// @see getFeatureForButton()
const features = {};
const buttonsToFeatures = {};
for (const featureName in CKEFeatureRulesMap) {
if (CKEFeatureRulesMap.hasOwnProperty(featureName)) {
const feature = new Drupal.EditorFeature(featureName);
convertCKERulesToEditorFeature(feature, CKEFeatureRulesMap[featureName]);
features[featureName] = feature;
const command = e.editor.getCommand(featureName);
if (command) {
buttonsToFeatures[command.uiItems[0].name] = featureName;
}
Object.keys(CKEFeatureRulesMap).forEach((featureName) => {
const feature = new Drupal.EditorFeature(featureName);
convertCKERulesToEditorFeature(feature, CKEFeatureRulesMap[featureName]);
features[featureName] = feature;
const command = e.editor.getCommand(featureName);
if (command) {
buttonsToFeatures[command.uiItems[0].name] = featureName;
}
}
});
callback(features, buttonsToFeatures);
}
@@ -326,25 +322,21 @@
// changed, rebuild the CKEditor features metadata.
.on('CKEditorPluginSettingsChanged.ckeditorAdmin', (event, settingsChanges) => {
// Update hidden CKEditor configuration.
for (const key in settingsChanges) {
if (settingsChanges.hasOwnProperty(key)) {
hiddenEditorConfig[key] = settingsChanges[key];
}
}
Object.keys(settingsChanges || {}).forEach((key) => {
hiddenEditorConfig[key] = settingsChanges[key];
});
// Retrieve features for the updated hidden CKEditor configuration.
getCKEditorFeatures(hiddenEditorConfig, (features) => {
// Trigger a standardized text editor configuration event for each
// feature that was modified by the configuration changes.
const featuresMetadata = view.model.get('featuresMetadata');
for (const name in features) {
if (features.hasOwnProperty(name)) {
const feature = features[name];
if (featuresMetadata.hasOwnProperty(name) && !_.isEqual(featuresMetadata[name], feature)) {
Drupal.editorConfiguration.modifiedFeature(feature);
}
Object.keys(features || {}).forEach((name) => {
const feature = features[name];
if (featuresMetadata.hasOwnProperty(name) && !_.isEqual(featuresMetadata[name], feature)) {
Drupal.editorConfiguration.modifiedFeature(feature);
}
}
});
// Update the CKEditor features metadata.
view.model.set('featuresMetadata', features);
});
@@ -91,11 +91,9 @@
var hiddenEditorConfig = this.model.get('hiddenEditorConfig');
if (hiddenEditorConfig.drupalExternalPlugins) {
var externalPlugins = hiddenEditorConfig.drupalExternalPlugins;
for (var pluginName in externalPlugins) {
if (externalPlugins.hasOwnProperty(pluginName)) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
}
}
Object.keys(externalPlugins || {}).forEach(function (pluginName) {
CKEDITOR.plugins.addExternal(pluginName, externalPlugins[pluginName], '');
});
}
CKEDITOR.inline($('#' + hiddenCKEditorID).get(0), CKEditorConfig);
@@ -116,17 +114,15 @@
var features = {};
var buttonsToFeatures = {};
for (var featureName in CKEFeatureRulesMap) {
if (CKEFeatureRulesMap.hasOwnProperty(featureName)) {
var feature = new Drupal.EditorFeature(featureName);
convertCKERulesToEditorFeature(feature, CKEFeatureRulesMap[featureName]);
features[featureName] = feature;
var command = e.editor.getCommand(featureName);
if (command) {
buttonsToFeatures[command.uiItems[0].name] = featureName;
}
Object.keys(CKEFeatureRulesMap).forEach(function (featureName) {
var feature = new Drupal.EditorFeature(featureName);
convertCKERulesToEditorFeature(feature, CKEFeatureRulesMap[featureName]);
features[featureName] = feature;
var command = e.editor.getCommand(featureName);
if (command) {
buttonsToFeatures[command.uiItems[0].name] = featureName;
}
}
});
callback(features, buttonsToFeatures);
}
@@ -200,22 +196,18 @@
var configEvent = action === 'added' ? 'addedFeature' : 'removedFeature';
Drupal.editorConfiguration[configEvent](feature);
}).on('CKEditorPluginSettingsChanged.ckeditorAdmin', function (event, settingsChanges) {
for (var key in settingsChanges) {
if (settingsChanges.hasOwnProperty(key)) {
hiddenEditorConfig[key] = settingsChanges[key];
}
}
Object.keys(settingsChanges || {}).forEach(function (key) {
hiddenEditorConfig[key] = settingsChanges[key];
});
getCKEditorFeatures(hiddenEditorConfig, function (features) {
var featuresMetadata = view.model.get('featuresMetadata');
for (var name in features) {
if (features.hasOwnProperty(name)) {
var feature = features[name];
if (featuresMetadata.hasOwnProperty(name) && !_.isEqual(featuresMetadata[name], feature)) {
Drupal.editorConfiguration.modifiedFeature(feature);
}
Object.keys(features || {}).forEach(function (name) {
var feature = features[name];
if (featuresMetadata.hasOwnProperty(name) && !_.isEqual(featuresMetadata[name], feature)) {
Drupal.editorConfiguration.modifiedFeature(feature);
}
}
});
view.model.set('featuresMetadata', features);
});
@@ -98,7 +98,14 @@
}
// Wrap between rows.
else {
$container.closest('.ckeditor-row').prev().find('.ckeditor-toolbar-group').not('.placeholder').find('.ckeditor-toolbar-group-buttons').eq(-1).append($button);
$container
.closest('.ckeditor-row')
.prev()
.find('.ckeditor-toolbar-group')
.not('.placeholder')
.find('.ckeditor-toolbar-group-buttons')
.eq(-1)
.append($button);
}
}
}
@@ -127,7 +134,13 @@
.off()
.remove();
// Focus on the first button in the active toolbar.
$activeButtons.find('.ckeditor-toolbar-group-buttons').eq(0).children().eq(0).children().trigger('focus');
$activeButtons
.find('.ckeditor-toolbar-group-buttons')
.eq(0)
.children()
.eq(0)
.children()
.trigger('focus');
}
// Otherwise, move it.
else {
@@ -229,7 +242,13 @@
// Wrap between rows. Insert the group before the placeholder group
// at the end of the previous row.
else {
$group.insertBefore($container.closest('.ckeditor-row').prev().find('.ckeditor-toolbar-groups').children().eq(-1));
const $rowChildElement = $container
.closest('.ckeditor-row')
.prev()
.find('.ckeditor-toolbar-groups')
.children()
.eq(-1);
$group.insertBefore($rowChildElement);
}
}
// Move right between sibling groups.
@@ -247,7 +266,11 @@
// Move groups between rows.
else if (_.indexOf(upDownKeys, event.keyCode) > -1) {
dir = (_.indexOf([38, 63232], event.keyCode) > -1) ? 'prev' : 'next';
$group.closest('.ckeditor-row')[dir]().find('.ckeditor-toolbar-groups').eq(0).prepend($group);
$group
.closest('.ckeditor-row')[dir]()
.find('.ckeditor-toolbar-groups')
.eq(0)
.prepend($group);
}
Drupal.ckeditor.registerGroupMove(this, $group);
@@ -128,7 +128,8 @@
if (index > 0) {
$group.insertBefore($siblings.eq(index - 1));
} else {
$group.insertBefore($container.closest('.ckeditor-row').prev().find('.ckeditor-toolbar-groups').children().eq(-1));
var $rowChildElement = $container.closest('.ckeditor-row').prev().find('.ckeditor-toolbar-groups').children().eq(-1);
$group.insertBefore($rowChildElement);
}
} else if (_.indexOf([39, 63235], event.keyCode) > -1) {
if (!$siblings.eq(index + 1).hasClass('placeholder')) {
@@ -5,8 +5,8 @@ description: Support module for the CKEditor 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: 1520457826
@@ -9,6 +9,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* A form for testing delivery of CSS to CKEditor via AJAX.
*
* @internal
*/
class AjaxCssForm extends FormBase {