security update core+modules
This commit is contained in:
31
misc/ajax.js
31
misc/ajax.js
@@ -348,7 +348,7 @@ Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {
|
||||
// this is only needed for IFRAME submissions.
|
||||
var v = $.fieldValue(this.element);
|
||||
if (v !== null) {
|
||||
options.extraData[this.element.name] = v;
|
||||
options.extraData[this.element.name] = Drupal.checkPlain(v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ Drupal.ajax.prototype.success = function (response, status) {
|
||||
Drupal.freezeHeight();
|
||||
|
||||
for (var i in response) {
|
||||
if (response[i]['command'] && this.commands[response[i]['command']]) {
|
||||
if (response.hasOwnProperty(i) && response[i]['command'] && this.commands[response[i]['command']]) {
|
||||
this.commands[response[i]['command']](this, response[i], status);
|
||||
}
|
||||
}
|
||||
@@ -616,6 +616,33 @@ Drupal.ajax.prototype.commands = {
|
||||
.removeClass('odd even')
|
||||
.filter(':even').addClass('odd').end()
|
||||
.filter(':odd').addClass('even');
|
||||
},
|
||||
|
||||
/**
|
||||
* Command to add css.
|
||||
*
|
||||
* Uses the proprietary addImport method if available as browsers which
|
||||
* support that method ignore @import statements in dynamically added
|
||||
* stylesheets.
|
||||
*/
|
||||
add_css: function (ajax, response, status) {
|
||||
// Add the styles in the normal way.
|
||||
$('head').prepend(response.data);
|
||||
// Add imports in the styles using the addImport method if available.
|
||||
var match, importMatch = /^@import url\("(.*)"\);$/igm;
|
||||
if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
|
||||
importMatch.lastIndex = 0;
|
||||
while (match = importMatch.exec(response.data)) {
|
||||
document.styleSheets[0].addImport(match[1]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Command to update a form's build ID.
|
||||
*/
|
||||
updateBuildId: function(ajax, response, status) {
|
||||
$('input[name="form_build_id"][value="' + response['old'] + '"]').val(response['new']);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -114,6 +114,7 @@ Drupal.jsAC.prototype.onkeyup = function (input, e) {
|
||||
*/
|
||||
Drupal.jsAC.prototype.select = function (node) {
|
||||
this.input.value = $(node).data('autocompleteValue');
|
||||
$(this.input).trigger('autocompleteSelect', [node]);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -167,7 +168,7 @@ Drupal.jsAC.prototype.unhighlight = function (node) {
|
||||
Drupal.jsAC.prototype.hidePopup = function (keycode) {
|
||||
// Select item if the right key or mousebutton was pressed.
|
||||
if (this.selected && ((keycode && keycode != 46 && keycode != 8 && keycode != 27) || !keycode)) {
|
||||
this.input.value = $(this.selected).data('autocompleteValue');
|
||||
this.select(this.selected);
|
||||
}
|
||||
// Hide popup.
|
||||
var popup = this.popup;
|
||||
@@ -220,7 +221,7 @@ Drupal.jsAC.prototype.found = function (matches) {
|
||||
for (key in matches) {
|
||||
$('<li></li>')
|
||||
.html($('<div></div>').html(matches[key]))
|
||||
.mousedown(function () { ac.select(this); })
|
||||
.mousedown(function () { ac.hidePopup(this); })
|
||||
.mouseover(function () { ac.highlight(this); })
|
||||
.mouseout(function () { ac.unhighlight(this); })
|
||||
.data('autocompleteValue', key)
|
||||
|
BIN
misc/favicon.ico
BIN
misc/favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 5.3 KiB |
@@ -80,7 +80,7 @@ Drupal.behaviors.machineName = {
|
||||
// changes, but only if there is no machine name yet; i.e., only upon
|
||||
// initial creation, not when editing.
|
||||
if ($target.val() == '') {
|
||||
$source.bind('keyup.machineName change.machineName', function () {
|
||||
$source.bind('keyup.machineName change.machineName input.machineName', function () {
|
||||
machine = self.transliterate($(this).val(), options);
|
||||
// Set the machine name to the transliterated value.
|
||||
if (machine != '') {
|
||||
|
@@ -373,7 +373,7 @@ states.Trigger.states = {
|
||||
|
||||
checked: {
|
||||
'change': function () {
|
||||
return this.attr('checked');
|
||||
return this.is(':checked');
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -500,7 +500,7 @@ Drupal.tableDrag.prototype.dragRow = function (event, self) {
|
||||
if (self.indentEnabled) {
|
||||
var xDiff = self.currentMouseCoords.x - self.dragObject.indentMousePos.x;
|
||||
// Set the number of indentations the mouse has been moved left or right.
|
||||
var indentDiff = Math.round(xDiff / self.indentAmount * self.rtl);
|
||||
var indentDiff = Math.round(xDiff / self.indentAmount);
|
||||
// Indent the row with our estimated diff, which may be further
|
||||
// restricted according to the rows around this row.
|
||||
var indentChange = self.rowObject.indent(indentDiff);
|
||||
|
@@ -126,7 +126,7 @@ Drupal.tableHeader.prototype.eventhandlerRecalculateStickyHeader = function (eve
|
||||
$stickyCell.css('display', 'none');
|
||||
}
|
||||
}
|
||||
this.stickyTable.css('width', this.originalTable.css('width'));
|
||||
this.stickyTable.css('width', this.originalTable.outerWidth());
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -57,10 +57,14 @@ Drupal.tableSelect = function () {
|
||||
// Keep track of the last checked checkbox.
|
||||
lastChecked = e.target;
|
||||
});
|
||||
|
||||
// If all checkboxes are checked on page load, make sure the select-all one
|
||||
// is checked too, otherwise keep unchecked.
|
||||
updateSelectAll((checkboxes.length == $(checkboxes).filter(':checked').length));
|
||||
};
|
||||
|
||||
Drupal.tableSelectRange = function (from, to, state) {
|
||||
// We determine the looping mode based on the the order of from and to.
|
||||
// We determine the looping mode based on the order of from and to.
|
||||
var mode = from.rowIndex > to.rowIndex ? 'previousSibling' : 'nextSibling';
|
||||
|
||||
// Traverse through the sibling nodes.
|
||||
|
BIN
misc/throbber-active.gif
Normal file
BIN
misc/throbber-active.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
misc/throbber-inactive.png
Normal file
BIN
misc/throbber-inactive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 320 B |
@@ -134,6 +134,8 @@ Drupal.verticalTab.prototype = {
|
||||
tabShow: function () {
|
||||
// Display the tab.
|
||||
this.item.show();
|
||||
// Show the vertical tabs.
|
||||
this.item.closest('.vertical-tabs').show();
|
||||
// Update .first marker for items. We need recurse from parent to retain the
|
||||
// actual DOM element order as jQuery implements sortOrder, but not as public
|
||||
// method.
|
||||
@@ -164,6 +166,10 @@ Drupal.verticalTab.prototype = {
|
||||
if ($firstTab.length) {
|
||||
$firstTab.data('verticalTab').focus();
|
||||
}
|
||||
// Hide the vertical tabs (if no tabs remain).
|
||||
else {
|
||||
this.item.closest('.vertical-tabs').hide();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user