Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -821,17 +821,32 @@
* @see Drupal.FilterStatus
*/
Drupal.FilterHTMLRule = function () {
return {
// Allow or forbid tags.
// Allow or forbid tags.
this.tags = [];
this.allow = null;
// Apply restrictions to properties set on tags.
this.restrictedTags = {
tags: [],
allow: null,
// Apply restrictions to properties set on tags.
restrictedTags: {
tags: [],
allowed: {attributes: [], styles: [], classes: []},
forbidden: {attributes: [], styles: [], classes: []}
}
allowed: {attributes: [], styles: [], classes: []},
forbidden: {attributes: [], styles: [], classes: []}
};
return this;
};
Drupal.FilterHTMLRule.prototype.clone = function () {
var clone = new Drupal.FilterHTMLRule();
clone.tags = this.tags.slice(0);
clone.allow = this.allow;
clone.restrictedTags.tags = this.restrictedTags.tags.slice(0);
clone.restrictedTags.allowed.attributes = this.restrictedTags.allowed.attributes.slice(0);
clone.restrictedTags.allowed.styles = this.restrictedTags.allowed.styles.slice(0);
clone.restrictedTags.allowed.classes = this.restrictedTags.allowed.classes.slice(0);
clone.restrictedTags.forbidden.attributes = this.restrictedTags.forbidden.attributes.slice(0);
clone.restrictedTags.forbidden.styles = this.restrictedTags.forbidden.styles.slice(0);
clone.restrictedTags.forbidden.classes = this.restrictedTags.forbidden.classes.slice(0);
return clone;
};
/**

View file

@ -63,7 +63,7 @@
// Store the actual value of this field. We'll need this to restore the
// original value when the user discards his modifications.
var $fieldItems = this.$el.find('.field__item');
var $fieldItems = this.$el.find('.quickedit-field');
if ($fieldItems.length) {
this.$textElement = $fieldItems.eq(0);
}

View file

@ -238,15 +238,6 @@
*/
Drupal.editorAttach = function (field, format) {
if (format.editor) {
// HTML5 validation cannot ever work for WYSIWYG editors, because WYSIWYG
// editors always hide the underlying textarea element, which prevents
// browsers from putting the error message bubble in the right location.
// Hence: disable HTML5 validation for this element.
if ('required' in field.attributes) {
field.setAttribute('data-editor-required', true);
field.removeAttribute('required');
}
// Attach the text editor.
Drupal.editors[format.editor].attach(field, format);
@ -275,13 +266,6 @@
*/
Drupal.editorDetach = function (field, format, trigger) {
if (format.editor) {
// Restore the HTML5 validation "required" attribute if it was removed in
// Drupal.editorAttach().
if ('data-editor-required' in field.attributes) {
field.setAttribute('required', 'required');
field.removeAttribute('data-editor-required');
}
Drupal.editors[format.editor].detach(field, format, trigger);
// Restore the original value if the user didn't make any changes yet.