contrib modules security updates
This commit is contained in:
@@ -80,7 +80,7 @@ Drupal.Panels.Draggable = {
|
||||
regionId: 'panel-region-',
|
||||
|
||||
// What to add to the front of a the id to get the form id for a panel
|
||||
formId: 'input#edit-',
|
||||
formId: '#edit-',
|
||||
|
||||
maxWidth: 250,
|
||||
|
||||
@@ -492,8 +492,8 @@ Drupal.behaviors.PanelsDisplayEditor = {
|
||||
Drupal.Panels.Draggable.savePositions();
|
||||
|
||||
// Bind buttons.
|
||||
$('input#panels-hide-all', context).click(Drupal.Panels.clickHideAll);
|
||||
$('input#panels-show-all', context).click(Drupal.Panels.clickShowAll);
|
||||
$('#panels-hide-all', context).click(Drupal.Panels.clickHideAll);
|
||||
$('#panels-show-all', context).click(Drupal.Panels.clickShowAll);
|
||||
|
||||
Drupal.Panels.bindClickDelete(context);
|
||||
|
||||
@@ -513,6 +513,11 @@ Drupal.behaviors.PanelsDisplayEditor = {
|
||||
$('#panels-preview').html(html);
|
||||
});
|
||||
|
||||
// Bind modal detach behaviors to cancel current form.
|
||||
$(document).bind('CToolsDetachBehaviors', function(event, context) {
|
||||
$('#edit-cancel-style', context).trigger('click');
|
||||
});
|
||||
|
||||
var setTitleClass = function () {
|
||||
if ($('#edit-display-title-hide-title').val() == 2) {
|
||||
$('#panels-dnd-main').removeClass('panels-set-title-hide');
|
||||
|
@@ -13,6 +13,45 @@
|
||||
}
|
||||
};
|
||||
|
||||
Drupal.Panels.AddContentModalQuickFilter = function() {
|
||||
var input_field = $('.panels-add-content-modal input[name=quickfilter]');
|
||||
input_field.data.panelsAddContentModalQuickFilter = {
|
||||
keyupTimeout: false,
|
||||
filter: function(e) {
|
||||
if (this.val().length) {
|
||||
var search_expression = this.val().toLowerCase();
|
||||
$('.panels-add-content-modal .panels-section-columns .content-type-button').each(function(i, elem) {
|
||||
if ($(elem).text().toLowerCase().search(search_expression) > -1) {
|
||||
$(elem).show();
|
||||
}
|
||||
else {
|
||||
$(elem).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('.panels-add-content-modal .panels-section-columns .content-type-button').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
// Use timeout to reduce the iteration over the DOM tree.
|
||||
input_field.bind('keyup.AddContentModalQuickFilter', jQuery.proxy(function(e){
|
||||
var filter = $(this).data.panelsAddContentModalQuickFilter;
|
||||
if (filter.keyupTimeout) {
|
||||
window.clearTimeout(filter.timeout);
|
||||
filter.keyupTimeout = false;
|
||||
}
|
||||
// If there's only one item left and enter is hit select it right away.
|
||||
if (e.keyCode == 13 && $('.panels-add-content-modal .panels-section-columns .content-type-button:visible').length == 1) {
|
||||
$('.panels-add-content-modal .panels-section-columns .content-type-button:visible a').trigger('click');
|
||||
}
|
||||
else {
|
||||
filter.keyupTimeout = window.setTimeout(jQuery.proxy(filter.filter, this), 200);
|
||||
}
|
||||
}, input_field));
|
||||
input_field.focus();
|
||||
};
|
||||
|
||||
Drupal.Panels.restripeTable = function(table) {
|
||||
// :even and :odd are reversed because jquery counts from 0 and
|
||||
// we count from 1, so we're out of sync.
|
||||
|
@@ -1,28 +0,0 @@
|
||||
|
||||
(function ($) {
|
||||
Drupal.Panels = Drupal.Panels || {};
|
||||
|
||||
Drupal.Panels.autoAttach = function() {
|
||||
if ($.browser.msie) {
|
||||
// If IE, attach a hover event so we can see our admin links.
|
||||
$("div.panel-pane").hover(
|
||||
function() {
|
||||
$('div.panel-hide', this).addClass("panel-hide-hover"); return true;
|
||||
},
|
||||
function() {
|
||||
$('div.panel-hide', this).removeClass("panel-hide-hover"); return true;
|
||||
}
|
||||
);
|
||||
$("div.admin-links").hover(
|
||||
function() {
|
||||
$(this).addClass("admin-links-hover"); return true;
|
||||
},
|
||||
function(){
|
||||
$(this).removeClass("admin-links-hover"); return true;
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
$(Drupal.Panels.autoAttach);
|
||||
})(jQuery);
|
Reference in New Issue
Block a user