security update core+modules
This commit is contained in:
@@ -88,6 +88,11 @@ Drupal.behaviors.CToolsAutoSubmit = {
|
||||
if ($.inArray(e.keyCode, discardKeyCode) === -1) {
|
||||
timeoutID = setTimeout($.proxy(triggerSubmit, this.form), 500);
|
||||
}
|
||||
})
|
||||
.bind('change', function (e) {
|
||||
if ($.inArray(e.keyCode, discardKeyCode) === -1) {
|
||||
timeoutID = setTimeout($.proxy(triggerSubmit, this.form), 500);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@@ -212,6 +212,7 @@
|
||||
content.slideToggle(100, afterToggle);
|
||||
}
|
||||
|
||||
$container.toggleClass('ctools-collapsed');
|
||||
toggle.toggleClass('ctools-toggle-collapsed');
|
||||
|
||||
// If we're supposed to remember the state of this class, do so.
|
||||
|
@@ -40,7 +40,7 @@
|
||||
Drupal.CTools.dependent.autoAttach = function() {
|
||||
// Clear active bindings and triggers.
|
||||
for (i in Drupal.CTools.dependent.activeTriggers) {
|
||||
$(Drupal.CTools.dependent.activeTriggers[i]).unbind('change');
|
||||
$(Drupal.CTools.dependent.activeTriggers[i]).unbind('change.ctools-dependent');
|
||||
}
|
||||
Drupal.CTools.dependent.activeTriggers = [];
|
||||
Drupal.CTools.dependent.activeBindings = {};
|
||||
@@ -194,7 +194,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$(trigger_id).change(function() {
|
||||
$(trigger_id).bind('change.ctools-dependent', function() {
|
||||
// Trigger the internal change function
|
||||
// the attr('id') is used because closures are more confusing
|
||||
changeTrigger(trigger_id, bind_id);
|
||||
@@ -215,7 +215,7 @@
|
||||
// is a sort of hacked one that's faster but much less flexible.
|
||||
$("select.ctools-master-dependent")
|
||||
.once('ctools-dependent')
|
||||
.change(function() {
|
||||
.bind('change.ctools-dependent', function() {
|
||||
var val = $(this).val();
|
||||
if (val == 'all') {
|
||||
$('.ctools-dependent-all').show(0);
|
||||
@@ -225,7 +225,7 @@
|
||||
$('.ctools-dependent-' + val).show(0);
|
||||
}
|
||||
})
|
||||
.trigger('change');
|
||||
.trigger('change.ctools-dependent');
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
|
@@ -99,6 +99,11 @@
|
||||
$('span.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText);
|
||||
Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed);
|
||||
$('#modalContent .modal-content').html(Drupal.theme(settings.throbberTheme));
|
||||
|
||||
// Position autocomplete results based on the scroll position of the modal.
|
||||
$('#modalContent .modal-content').delegate('input.form-autocomplete', 'keyup', function() {
|
||||
$('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).offsetParent().filter('#modal-content').scrollTop());
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -222,7 +227,11 @@
|
||||
// AJAX submits specified in this manner automatically submit to the
|
||||
// normal form action.
|
||||
element_settings.url = Drupal.CTools.Modal.findURL(this);
|
||||
if (element_settings.url == '') {
|
||||
element_settings.url = $(this).closest('form').attr('action');
|
||||
}
|
||||
element_settings.event = 'click';
|
||||
element_settings.setClick = true;
|
||||
|
||||
var base = $this.attr('id');
|
||||
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
|
||||
@@ -249,6 +258,10 @@
|
||||
$('input[type=submit], button', this).click(function(event) {
|
||||
Drupal.ajax[base].element = this;
|
||||
this.form.clk = this;
|
||||
// Stop autocomplete from submitting.
|
||||
if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
|
||||
return false;
|
||||
}
|
||||
// An empty event means we were triggered via .click() and
|
||||
// in jquery 1.4 this won't trigger a submit.
|
||||
if (event.bubbles == undefined) {
|
||||
@@ -282,7 +295,10 @@
|
||||
// content. This is helpful for allowing users to see error messages at the
|
||||
// top of a form, etc.
|
||||
$('#modal-content').html(response.output).scrollTop(0);
|
||||
Drupal.attachBehaviors();
|
||||
|
||||
// Attach behaviors within a modal dialog.
|
||||
var settings = response.settings || ajax.settings || Drupal.settings;
|
||||
Drupal.attachBehaviors('#modalContent', settings);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,9 +379,9 @@
|
||||
css.filter = 'alpha(opacity=' + (100 * css.opacity) + ')';
|
||||
content.hide();
|
||||
|
||||
// if we already ahve a modalContent, remove it
|
||||
if ( $('#modalBackdrop')) $('#modalBackdrop').remove();
|
||||
if ( $('#modalContent')) $('#modalContent').remove();
|
||||
// If we already have modalContent, remove it.
|
||||
if ($('#modalBackdrop').length) $('#modalBackdrop').remove();
|
||||
if ($('#modalContent').length) $('#modalContent').remove();
|
||||
|
||||
// position code lifted from http://www.quirksmode.org/viewport/compatibility.html
|
||||
if (self.pageYOffset) { // all except Explorer
|
||||
@@ -405,12 +421,17 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if( $(target).filter('*:visible').parents('#modalContent').size()) {
|
||||
// allow the event only if target is a visible child node of #modalContent
|
||||
|
||||
if ($(target).is('#modalContent, body') || $(target).filter('*:visible').parents('#modalContent').length) {
|
||||
// Allow the event only if target is a visible child node
|
||||
// of #modalContent.
|
||||
return true;
|
||||
}
|
||||
if ( $('#modalContent')) $('#modalContent').get(0).focus();
|
||||
return false;
|
||||
else {
|
||||
$('#modalContent').focus();
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
$('body').bind( 'focus', modalEventHandler );
|
||||
$('body').bind( 'keypress', modalEventHandler );
|
||||
@@ -461,6 +482,16 @@
|
||||
|
||||
// Move and resize the modalBackdrop and modalContent on resize of the window
|
||||
modalContentResize = function(){
|
||||
|
||||
// position code lifted from http://www.quirksmode.org/viewport/compatibility.html
|
||||
if (self.pageYOffset) { // all except Explorer
|
||||
var wt = self.pageYOffset;
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
||||
var wt = document.documentElement.scrollTop;
|
||||
} else if (document.body) { // all other Explorers
|
||||
var wt = document.body.scrollTop;
|
||||
}
|
||||
|
||||
// Get our heights
|
||||
var docHeight = $(document).height();
|
||||
var docWidth = $(document).width();
|
||||
@@ -470,7 +501,7 @@
|
||||
|
||||
// Get where we should move content to
|
||||
var modalContent = $('#modalContent');
|
||||
var mdcTop = ( winHeight / 2 ) - ( modalContent.outerHeight() / 2);
|
||||
var mdcTop = wt + ( winHeight / 2 ) - ( modalContent.outerHeight() / 2);
|
||||
var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
|
||||
|
||||
// Apply the changes
|
||||
|
Reference in New Issue
Block a user