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
|
@ -93,14 +93,14 @@
|
|||
* @prop {function} Number
|
||||
*/
|
||||
states.Dependent.comparisons = {
|
||||
'RegExp': function (reference, value) {
|
||||
RegExp: function (reference, value) {
|
||||
return reference.test(value);
|
||||
},
|
||||
'Function': function (reference, value) {
|
||||
Function: function (reference, value) {
|
||||
// The "reference" variable is a comparison function.
|
||||
return reference(value);
|
||||
},
|
||||
'Number': function (reference, value) {
|
||||
Number: function (reference, value) {
|
||||
// If "reference" is a number and "value" is a string, then cast
|
||||
// reference as a string before applying the strict comparison in
|
||||
// compare().
|
||||
|
@ -441,15 +441,15 @@
|
|||
// 'empty' describes the state to be monitored.
|
||||
empty: {
|
||||
// 'keyup' is the (native DOM) event that we watch for.
|
||||
'keyup': function () {
|
||||
// The function associated to that trigger returns the new value for the
|
||||
// state.
|
||||
keyup: function () {
|
||||
// The function associated with that trigger returns the new value for
|
||||
// the state.
|
||||
return this.val() === '';
|
||||
}
|
||||
},
|
||||
|
||||
checked: {
|
||||
'change': function () {
|
||||
change: function () {
|
||||
// prop() and attr() only takes the first element into account. To
|
||||
// support selectors matching multiple checkboxes, iterate over all and
|
||||
// return whether any is checked.
|
||||
|
@ -467,7 +467,7 @@
|
|||
|
||||
// For radio buttons, only return the value if the radio button is selected.
|
||||
value: {
|
||||
'keyup': function () {
|
||||
keyup: function () {
|
||||
// Radio buttons share the same :input[name="key"] selector.
|
||||
if (this.length > 1) {
|
||||
// Initial checked value of radios is undefined, so we return false.
|
||||
|
@ -475,7 +475,7 @@
|
|||
}
|
||||
return this.val();
|
||||
},
|
||||
'change': function () {
|
||||
change: function () {
|
||||
// Radio buttons share the same :input[name="key"] selector.
|
||||
if (this.length > 1) {
|
||||
// Initial checked value of radios is undefined, so we return false.
|
||||
|
@ -486,7 +486,7 @@
|
|||
},
|
||||
|
||||
collapsed: {
|
||||
'collapsed': function (e) {
|
||||
collapsed: function (e) {
|
||||
return (typeof e !== 'undefined' && 'value' in e) ? e.value : !this.is('[open]');
|
||||
}
|
||||
}
|
||||
|
@ -550,18 +550,18 @@
|
|||
* @name Drupal.states.State.aliases
|
||||
*/
|
||||
states.State.aliases = {
|
||||
'enabled': '!disabled',
|
||||
'invisible': '!visible',
|
||||
'invalid': '!valid',
|
||||
'untouched': '!touched',
|
||||
'optional': '!required',
|
||||
'filled': '!empty',
|
||||
'unchecked': '!checked',
|
||||
'irrelevant': '!relevant',
|
||||
'expanded': '!collapsed',
|
||||
'open': '!collapsed',
|
||||
'closed': 'collapsed',
|
||||
'readwrite': '!readonly'
|
||||
enabled: '!disabled',
|
||||
invisible: '!visible',
|
||||
invalid: '!valid',
|
||||
untouched: '!touched',
|
||||
optional: '!required',
|
||||
filled: '!empty',
|
||||
unchecked: '!checked',
|
||||
irrelevant: '!relevant',
|
||||
expanded: '!collapsed',
|
||||
open: '!collapsed',
|
||||
closed: 'collapsed',
|
||||
readwrite: '!readonly'
|
||||
};
|
||||
|
||||
states.State.prototype = {
|
||||
|
@ -609,12 +609,12 @@
|
|||
if (e.value) {
|
||||
var $label = $(e.target).attr({'required': 'required', 'aria-required': 'aria-required'}).closest('.form-item, .js-form-wrapper').find('label');
|
||||
// Avoids duplicate required markers on initialization.
|
||||
if (!$label.hasClass('form-required').length) {
|
||||
$label.addClass('form-required');
|
||||
if (!$label.hasClass('js-form-required').length) {
|
||||
$label.addClass('js-form-required form-required');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$(e.target).removeAttr('required aria-required').closest('.form-item, .js-form-wrapper').find('label.form-required').removeClass('form-required');
|
||||
$(e.target).removeAttr('required aria-required').closest('.form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue