updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+14 -11
View File
@@ -1203,18 +1203,21 @@
var ajaxSettings = drupalSettings.ajax;
// Clean up drupalSettings.ajax.
Drupal.ajax.expired().forEach(function (instance) {
// If the Ajax object has been created through drupalSettings.ajax
// it will have a selector. When there is no selector the object
// has been initialized with a special class name picked up by the
// Ajax behavior.
if (instance.selector) {
var selector = instance.selector.replace('#', '');
if (ajaxSettings && selector in ajaxSettings) {
delete ajaxSettings[selector];
if (ajaxSettings) {
Drupal.ajax.expired().forEach(function (instance) {
// If the Ajax object has been created through drupalSettings.ajax
// it will have a selector. When there is no selector the object
// has been initialized with a special class name picked up by the
// Ajax behavior.
if (instance.selector) {
var selector = instance.selector.replace('#', '');
if (selector in ajaxSettings) {
delete ajaxSettings[selector];
}
}
}
});
});
}
if (response.merge) {
$.extend(true, drupalSettings, response.settings);
+18 -7
View File
@@ -77,6 +77,11 @@
*/
function searchHandler(event) {
var options = autocomplete.options;
if (options.isComposing) {
return false;
}
var term = autocomplete.extractLastTerm(event.target.value);
// Abort search if the first character is in firstCharacterBlacklist.
if (term.length > 0 && options.firstCharacterBlacklist.indexOf(term[0]) !== -1) {
@@ -172,12 +177,8 @@
// Remove the current input.
terms.pop();
// Add the selected item.
if (ui.item.value.search(',') > 0) {
terms.push('"' + ui.item.value + '"');
}
else {
terms.push(ui.item.value);
}
terms.push(ui.item.value);
event.target.value = terms.join(', ');
// Return false to tell jQuery UI that we've filled in the value already.
return false;
@@ -225,6 +226,14 @@
.each(function () {
$(this).data('ui-autocomplete')._renderItem = autocomplete.options.renderItem;
});
// Use CompositionEvent to handle IME inputs. It requests remote server on "compositionend" event only.
$autocomplete.on('compositionstart.autocomplete', function () {
autocomplete.options.isComposing = true;
});
$autocomplete.on('compositionend.autocomplete', function () {
autocomplete.options.isComposing = false;
});
}
},
detach: function (context, settings, trigger) {
@@ -261,7 +270,9 @@
renderItem: renderItem,
minLength: 1,
// Custom options, used by Drupal.autocomplete.
firstCharacterBlacklist: ''
firstCharacterBlacklist: '',
// Custom options, indicate IME usage status.
isComposing: false
},
ajax: {
dataType: 'json'
+12 -4
View File
@@ -62,7 +62,7 @@
*/
prepareDialogButtons: function ($dialog) {
var buttons = [];
var $buttons = $dialog.find('.form-actions input[type=submit]');
var $buttons = $dialog.find('.form-actions input[type=submit], .form-actions a.button');
$buttons.each(function () {
// Hidden form buttons need special attention. For browser consistency,
// the button needs to be "visible" in order to have the enter key fire
@@ -74,14 +74,22 @@
width: 0,
height: 0,
padding: 0,
border: 0
border: 0,
overflow: 'hidden'
});
buttons.push({
text: $originalButton.html() || $originalButton.attr('value'),
class: $originalButton.attr('class'),
click: function (e) {
$originalButton.trigger('mousedown').trigger('mouseup').trigger('click');
e.preventDefault();
// If the original button is an anchor tag, triggering the "click"
// event will not simulate a click. Use the click method instead.
if ($originalButton.is('a')) {
$originalButton[0].click();
}
else {
$originalButton.trigger('mousedown').trigger('mouseup').trigger('click');
e.preventDefault();
}
}
});
});
+2 -1
View File
@@ -100,11 +100,12 @@
$(window)
.on('resize.dialogResize scroll.dialogResize', eventData, autoResize)
.trigger('resize.dialogResize');
$(document).on('drupalViewportOffsetChange', eventData, autoResize);
$(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize);
}
},
'dialog:beforeclose': function (event, dialog, $element) {
$(window).off('.dialogResize');
$(document).off('.dialogResize');
}
});
+1 -1
View File
@@ -165,7 +165,7 @@
var placement = $el.offset()[horizontal ? 'left' : 'top'];
// Subtract scroll distance from placement to get the distance
// to the edge of the viewport.
placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal) ? 'Left' : 'Top'] || 0;
placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0;
// Find the displacement value according to the edge.
switch (edge) {
// Left and top elements displace as a sum of their own offset value
+19
View File
@@ -0,0 +1,19 @@
// Allow other JavaScript libraries to use $.
if (window.jQuery) {
jQuery.noConflict();
}
// Class indicating that JS is enabled; used for styling purpose.
document.documentElement.className += ' js';
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it in an anonymous closure.
(function (domready, Drupal, drupalSettings) {
'use strict';
// Attach all behaviors.
domready(function () { Drupal.attachBehaviors(document, drupalSettings); });
})(domready, Drupal, window.drupalSettings);
+2 -13
View File
@@ -40,17 +40,9 @@
*/
window.Drupal = {behaviors: {}, locale: {}};
// Class indicating that JavaScript is enabled; used for styling purpose.
document.documentElement.className += ' js';
// Allow other JavaScript libraries to use $.
if (window.jQuery) {
jQuery.noConflict();
}
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it in an anonymous closure.
(function (domready, Drupal, drupalSettings, drupalTranslations) {
(function (Drupal, drupalSettings, drupalTranslations) {
'use strict';
@@ -174,9 +166,6 @@ if (window.jQuery) {
}
};
// Attach all behaviors.
domready(function () { Drupal.attachBehaviors(document, drupalSettings); });
/**
* Detaches registered behaviors from a page element.
*
@@ -591,4 +580,4 @@ if (window.jQuery) {
return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
};
})(domready, Drupal, window.drupalSettings, window.drupalTranslations);
})(Drupal, window.drupalSettings, window.drupalTranslations);
+57
View File
@@ -0,0 +1,57 @@
/**
* @file
* Defines Javascript behaviors for the block_content module.
*/
(function ($, Drupal) {
'use strict';
/**
* Sets summaries about revision and translation of entities.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches summary behaviour entity form tabs.
*
* Specifically, it updates summaries to the revision information and the
* translation options.
*/
Drupal.behaviors.entityContentDetailsSummaries = {
attach: function (context) {
var $context = $(context);
$context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) {
var $revisionContext = $(context);
var revisionCheckbox = $revisionContext.find('.js-form-item-revision input');
// Return 'New revision' if the 'Create new revision' checkbox is checked,
// or if the checkbox doesn't exist, but the revision log does. For users
// without the "Administer content" permission the checkbox won't appear,
// but the revision log will if the content type is set to auto-revision.
if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $revisionContext.find('.js-form-item-revision-log textarea').length)) {
return Drupal.t('New revision');
}
return Drupal.t('No revision');
});
$context.find('details.entity-translation-options').drupalSetSummary(function (context) {
var $translationContext = $(context);
var translate;
var $checkbox = $translationContext.find('.js-form-item-translation-translate input');
if ($checkbox.length) {
translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated');
}
else {
$checkbox = $translationContext.find('.js-form-item-translation-retranslate input');
translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated');
}
return translate;
});
}
};
})(jQuery, Drupal);
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px"><path fill="#787878" d="M0.656,9.023c0,0.274,0.224,0.5,0.499,0.5l4.853,0.001c0.274-0.001,0.501,0.226,0.5,0.5l0.001,4.853 c-0.001,0.273,0.227,0.5,0.501,0.5l1.995-0.009c0.273-0.003,0.497-0.229,0.5-0.503l0.002-4.806c0-0.272,0.228-0.5,0.499-0.502 l4.831-0.021c0.271-0.005,0.497-0.23,0.501-0.502l0.008-1.998c0-0.276-0.225-0.5-0.499-0.5l-4.852,0c-0.275,0-0.502-0.228-0.501-0.5 L9.493,1.184c0-0.275-0.225-0.499-0.5-0.499L6.997,0.693C6.722,0.694,6.496,0.92,6.495,1.195L6.476,6.026 c-0.001,0.274-0.227,0.5-0.501,0.5L1.167,6.525C0.892,6.526,0.665,6.752,0.665,7.026L0.656,9.023z"/></svg>

After

Width:  |  Height:  |  Size: 644 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px"><path fill="#bebebe" d="M0.656,9.023c0,0.274,0.224,0.5,0.499,0.5l4.853,0.001c0.274-0.001,0.501,0.226,0.5,0.5l0.001,4.853 c-0.001,0.273,0.227,0.5,0.501,0.5l1.995-0.009c0.273-0.003,0.497-0.229,0.5-0.503l0.002-4.806c0-0.272,0.228-0.5,0.499-0.502 l4.831-0.021c0.271-0.005,0.497-0.23,0.501-0.502l0.008-1.998c0-0.276-0.225-0.5-0.499-0.5l-4.852,0c-0.275,0-0.502-0.228-0.501-0.5 L9.493,1.184c0-0.275-0.225-0.499-0.5-0.499L6.997,0.693C6.722,0.694,6.496,0.92,6.495,1.195L6.476,6.026 c-0.001,0.274-0.227,0.5-0.501,0.5L1.167,6.525C0.892,6.526,0.665,6.752,0.665,7.026L0.656,9.023z"/></svg>

After

Width:  |  Height:  |  Size: 644 B

+12 -9
View File
@@ -71,22 +71,22 @@
xhr = null;
}
// Wait 300 milliseconds since the last event to update the machine name
// i.e., after the user has stopped typing.
// Wait 300 milliseconds for Ajax request since the last event to update
// the machine name i.e., after the user has stopped typing.
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
timeout = setTimeout(function () {
if (baseValue.toLowerCase() !== expected) {
if (baseValue.toLowerCase() !== expected) {
timeout = setTimeout(function () {
xhr = self.transliterate(baseValue, options).done(function (machine) {
self.showMachineName(machine.substr(0, options.maxlength), data);
});
}
else {
self.showMachineName(expected, data);
}
}, 300);
}, 300);
}
else {
self.showMachineName(expected, data);
}
}
Object.keys(settings.machineName).forEach(function (source_id) {
@@ -186,6 +186,8 @@
* @param {string} settings.replace_pattern
* A regular expression (without modifiers) matching disallowed characters
* in the machine name; e.g., '[^a-z0-9]+'.
* @param {string} settings.replace_token
* A token to validate the regular expression.
* @param {string} settings.replace
* A character to replace disallowed characters with; e.g., '_' or '-'.
* @param {number} settings.maxlength
@@ -199,6 +201,7 @@
text: source,
langcode: drupalSettings.langcode,
replace_pattern: settings.replace_pattern,
replace_token: settings.replace_token,
replace: settings.replace,
lowercase: true
});
+15 -4
View File
@@ -498,6 +498,9 @@
var keyChange = false;
var groupHeight;
/* eslint-disable no-fallthrough */
switch (event.keyCode) {
// Left arrow.
case 37:
@@ -601,6 +604,8 @@
break;
}
/* eslint-enable no-fallthrough */
if (self.rowObject && self.rowObject.changed === true) {
$(item).addClass('drag');
if (self.oldRowElement) {
@@ -624,6 +629,9 @@
// other browsers need to return false on keypress.
// http://www.quirksmode.org/js/keys.html
handle.on('keypress', function (event) {
/* eslint-disable no-fallthrough */
switch (event.keyCode) {
// Left arrow.
case 37:
@@ -635,6 +643,9 @@
case 40:
return false;
}
/* eslint-enable no-fallthrough */
});
};
@@ -1151,10 +1162,10 @@
// :even and :odd are reversed because jQuery counts from 0 and
// we count from 1, so we're out of sync.
// Match immediate children of the parent element to allow nesting.
$(this.table).find('> tbody > tr.draggable:visible, > tr.draggable:visible')
.removeClass('odd even')
.filter(':odd').addClass('even').end()
.filter(':even').addClass('odd');
$(this.table).find('> tbody > tr.draggable, > tr.draggable')
.filter(':visible')
.filter(':odd').removeClass('odd').addClass('even').end()
.filter(':even').removeClass('even').addClass('odd');
};
/**