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
|
@ -127,6 +127,7 @@
|
|||
* The fieldModel to which this change applies.
|
||||
*
|
||||
* @return {bool}
|
||||
* Whether the editor change was accepted or rejected.
|
||||
*/
|
||||
acceptEditorStateChange: function (from, to, context, fieldModel) {
|
||||
var accept = true;
|
||||
|
@ -328,6 +329,7 @@
|
|||
* Asks the user to confirm whether he wants to stop editing via a modal.
|
||||
*
|
||||
* @param {Drupal.quickedit.EntityModel} entityModel
|
||||
* An instance of the EntityModel class.
|
||||
*
|
||||
* @see Drupal.quickedit.AppView#acceptEditorStateChange
|
||||
*/
|
||||
|
@ -402,6 +404,7 @@
|
|||
* Reacts to field state changes; tracks global state.
|
||||
*
|
||||
* @param {Drupal.quickedit.FieldModel} fieldModel
|
||||
* The `fieldModel` holding the state.
|
||||
* @param {string} state
|
||||
* The state of the associated field. One of
|
||||
* {@link Drupal.quickedit.FieldModel.states}.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Define all events to listen to.
|
||||
*
|
||||
* @return {object}
|
||||
* A map of events.
|
||||
*/
|
||||
events: function () {
|
||||
// Prevents delay and simulated mouse events.
|
||||
|
@ -31,6 +32,8 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Create a new contextual link view.
|
||||
*
|
||||
* @constructs
|
||||
*
|
||||
* @augments Backbone.View
|
||||
|
@ -54,11 +57,15 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Render function for the contextual link view.
|
||||
*
|
||||
* @param {Drupal.quickedit.EntityModel} entityModel
|
||||
* The associated `EntityModel`.
|
||||
* @param {bool} isActive
|
||||
* Whether the in-place editor is active or not.
|
||||
*
|
||||
* @return {Drupal.quickedit.ContextualLinkView}
|
||||
* The `ContextualLinkView` in question.
|
||||
*/
|
||||
render: function (entityModel, isActive) {
|
||||
this.$el.find('a').attr('aria-pressed', isActive);
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
* Determines the actions to take given a change of state.
|
||||
*
|
||||
* @param {Drupal.quickedit.FieldModel} fieldModel
|
||||
* The quickedit `FieldModel` that holds the state.
|
||||
* @param {string} state
|
||||
* The state of the associated field. One of
|
||||
* {@link Drupal.quickedit.FieldModel.states}.
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
/**
|
||||
* @return {object}
|
||||
* A map of events.
|
||||
*/
|
||||
events: function () {
|
||||
var map = {
|
||||
|
@ -32,7 +33,9 @@
|
|||
* @augments Backbone.View
|
||||
*
|
||||
* @param {object} options
|
||||
* Options to construct the view.
|
||||
* @param {Drupal.quickedit.AppModel} options.appModel
|
||||
* A quickedit `AppModel` to use in the view.
|
||||
*/
|
||||
initialize: function (options) {
|
||||
var that = this;
|
||||
|
@ -71,6 +74,7 @@
|
|||
* @inheritdoc
|
||||
*
|
||||
* @return {Drupal.quickedit.EntityToolbarView}
|
||||
* The entity toolbar view.
|
||||
*/
|
||||
render: function () {
|
||||
if (this.model.get('isActive')) {
|
||||
|
@ -147,6 +151,7 @@
|
|||
* Repositions the entity toolbar on window scroll and resize.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The scroll or resize event.
|
||||
*/
|
||||
windowChangeHandler: function (event) {
|
||||
this.position();
|
||||
|
@ -156,6 +161,7 @@
|
|||
* Determines the actions to take given a change of state.
|
||||
*
|
||||
* @param {Drupal.quickedit.FieldModel} model
|
||||
* The `FieldModel` model.
|
||||
* @param {string} state
|
||||
* The state of the associated field. One of
|
||||
* {@link Drupal.quickedit.FieldModel.states}.
|
||||
|
@ -254,6 +260,7 @@
|
|||
* positionToolbar().
|
||||
*
|
||||
* @param {*} view
|
||||
* The view the positions will be calculated from.
|
||||
* @param {object} suggested
|
||||
* A hash of top and left values for the position that should be set. It
|
||||
* can be forwarded to .css() or .animate().
|
||||
|
@ -345,6 +352,7 @@
|
|||
* Set the model state to 'saving' when the save button is clicked.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The click event.
|
||||
*/
|
||||
onClickSave: function (event) {
|
||||
event.stopPropagation();
|
||||
|
@ -357,6 +365,7 @@
|
|||
* Sets the model state to candidate when the cancel button is clicked.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The click event.
|
||||
*/
|
||||
onClickCancel: function (event) {
|
||||
event.preventDefault();
|
||||
|
@ -369,6 +378,7 @@
|
|||
* Without this, it may reposition itself, away from the user's cursor!
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The mouse event.
|
||||
*/
|
||||
onMouseenter: function (event) {
|
||||
clearTimeout(this.timer);
|
||||
|
@ -378,6 +388,7 @@
|
|||
* Builds the entity toolbar HTML; attaches to DOM; sets starting position.
|
||||
*
|
||||
* @return {jQuery}
|
||||
* The toolbar element.
|
||||
*/
|
||||
buildToolbarEl: function () {
|
||||
var $toolbar = $(Drupal.theme('quickeditEntityToolbar', {
|
||||
|
@ -454,7 +465,8 @@
|
|||
});
|
||||
}
|
||||
else {
|
||||
label = entityLabel;
|
||||
// @todo Add XSS regression test coverage in https://www.drupal.org/node/2547437
|
||||
label = Drupal.checkPlain(entityLabel);
|
||||
}
|
||||
|
||||
this.$el
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
* Determines the actions to take given a change of state.
|
||||
*
|
||||
* @param {Drupal.quickedit.FieldModel} model
|
||||
* The `FieldModel` model.
|
||||
* @param {string} state
|
||||
* The state of the associated field. One of
|
||||
* {@link Drupal.quickedit.FieldModel.states}.
|
||||
|
@ -128,6 +129,7 @@
|
|||
* Starts hover; transitions to 'highlight' state.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The mouse event.
|
||||
*/
|
||||
onMouseEnter: function (event) {
|
||||
var that = this;
|
||||
|
@ -139,6 +141,7 @@
|
|||
* Stops hover; transitions to 'candidate' state.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The mouse event.
|
||||
*/
|
||||
onMouseLeave: function (event) {
|
||||
var that = this;
|
||||
|
@ -150,6 +153,7 @@
|
|||
* Transition to 'activating' stage.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The click event.
|
||||
*/
|
||||
onClick: function (event) {
|
||||
this.model.set('state', 'activating');
|
||||
|
@ -313,8 +317,10 @@
|
|||
* subtraction.
|
||||
*
|
||||
* @param {jQuery} $e
|
||||
* The element to get position properties from.
|
||||
*
|
||||
* @return {object}
|
||||
* An object containing css values for the needed properties.
|
||||
*/
|
||||
_getPositionProperties: function ($e) {
|
||||
var p;
|
||||
|
@ -340,6 +346,7 @@
|
|||
* The value for a CSS position declaration.
|
||||
*
|
||||
* @return {string}
|
||||
* A CSS value that is valid for `position`.
|
||||
*/
|
||||
_replaceBlankPosition: function (pos) {
|
||||
if (pos === 'auto' || !pos) {
|
||||
|
|
|
@ -34,15 +34,17 @@
|
|||
* @augments Backbone.View
|
||||
*
|
||||
* @param {object} options
|
||||
* Options object to construct the field toolbar.
|
||||
* @param {jQuery} options.$editedElement
|
||||
* The element being edited.
|
||||
* @param {Drupal.quickedit.EditorView} options.editorView
|
||||
* The EditorView the toolbar belongs to.
|
||||
*/
|
||||
initialize: function (options) {
|
||||
this.$editedElement = options.$editedElement;
|
||||
this.editorView = options.editorView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {jQuery}
|
||||
*/
|
||||
this.$root = this.$el;
|
||||
|
@ -57,6 +59,7 @@
|
|||
* @inheritdoc
|
||||
*
|
||||
* @return {Drupal.quickedit.FieldToolbarView}
|
||||
* The current FieldToolbarView.
|
||||
*/
|
||||
render: function () {
|
||||
// Render toolbar and set it as the view's element.
|
||||
|
@ -74,6 +77,7 @@
|
|||
* Determines the actions to take given a change of state.
|
||||
*
|
||||
* @param {Drupal.quickedit.FieldModel} model
|
||||
* The quickedit FieldModel
|
||||
* @param {string} state
|
||||
* The state of the associated field. One of
|
||||
* {@link Drupal.quickedit.FieldModel.states}.
|
||||
|
@ -191,6 +195,7 @@
|
|||
* A toolgroup name.
|
||||
*
|
||||
* @return {jQuery}
|
||||
* The toolgroup element.
|
||||
*/
|
||||
_find: function (toolgroup) {
|
||||
return this.$el.find('.quickedit-toolgroup.' + toolgroup);
|
||||
|
@ -204,8 +209,8 @@
|
|||
*/
|
||||
show: function (toolgroup) {
|
||||
var $group = this._find(toolgroup);
|
||||
// Attach a transitionEnd event handler to the toolbar group so that update
|
||||
// events can be triggered after the animations have ended.
|
||||
// Attach a transitionEnd event handler to the toolbar group so that
|
||||
// update events can be triggered after the animations have ended.
|
||||
$group.on(Drupal.quickedit.util.constants.transitionEnd, function (event) {
|
||||
$group.off(Drupal.quickedit.util.constants.transitionEnd);
|
||||
});
|
||||
|
|
Reference in a new issue