updated ctools, needed by panles
This commit is contained in:
@@ -36,9 +36,11 @@ Drupal.behaviors.CToolsAutoSubmit = {
|
||||
attach: function(context) {
|
||||
// 'this' references the form element
|
||||
function triggerSubmit (e) {
|
||||
var $this = $(this);
|
||||
if (!$this.hasClass('ctools-ajaxing')) {
|
||||
$this.find('.ctools-auto-submit-click').click();
|
||||
if ($.contains(document.body, this)) {
|
||||
var $this = $(this);
|
||||
if (!$this.hasClass('ctools-ajaxing')) {
|
||||
$this.find('.ctools-auto-submit-click').click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -97,7 +97,13 @@
|
||||
else {
|
||||
switch ($(trigger).attr('type')) {
|
||||
case 'checkbox':
|
||||
var val = $(trigger).attr('checked') ? true : false;
|
||||
// **This check determines if using a jQuery version 1.7 or newer which requires the use of the prop function instead of the attr function when not called on an attribute
|
||||
if ($().prop) {
|
||||
var val = $(trigger).prop('checked') ? true : false;
|
||||
}
|
||||
else {
|
||||
var val = $(trigger).attr('checked') ? true : false;
|
||||
}
|
||||
|
||||
if (val) {
|
||||
$(trigger).siblings('label').removeClass('hidden-options').addClass('expanded-options');
|
||||
@@ -148,34 +154,41 @@
|
||||
len++;
|
||||
}
|
||||
|
||||
var object = $('#' + id + '-wrapper');
|
||||
if (!object.size()) {
|
||||
// Some elements can't use the parent() method or they can
|
||||
// damage things. They are guaranteed to have wrappers but
|
||||
// only if dependent.inc provided them. This check prevents
|
||||
// problems when multiple AJAX calls cause settings to build
|
||||
// up.
|
||||
var $original = $('#' + id);
|
||||
if ($original.is('fieldset') || $original.is('textarea')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
object = $('#' + id).parent();
|
||||
var $original = $('#' + id);
|
||||
if ($original.is('fieldset') || $original.is('textarea')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var object = $original.parent();
|
||||
|
||||
if (Drupal.settings.CTools.dependent[id].type == 'disable') {
|
||||
if (Drupal.settings.CTools.dependent[id].num <= len) {
|
||||
// Show if the element if criteria is matched
|
||||
object.attr('disabled', false);
|
||||
object.addClass('dependent-options');
|
||||
object.children().attr('disabled', false);
|
||||
// **This check determines if using a jQuery version 1.7 or newer which requires the use of the prop function instead of the attr function when not called on an attribute
|
||||
if (typeof $().prop == 'function') {
|
||||
object.prop('disabled', false);
|
||||
object.addClass('dependent-options');
|
||||
object.children().prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
object.attr('disabled', false);
|
||||
object.addClass('dependent-options');
|
||||
object.children().attr('disabled', false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Otherwise hide. Use css rather than hide() because hide()
|
||||
// does not work if the item is already hidden, for example,
|
||||
// in a collapsed fieldset.
|
||||
object.attr('disabled', true);
|
||||
object.children().attr('disabled', true);
|
||||
// **This check determines if using a jQuery version 1.7 or newer which requires the use of the prop function instead of the attr function when not called on an attribute
|
||||
if (typeof $().prop == 'function') {
|
||||
object.prop('disabled', true);
|
||||
object.children().prop('disabled', true);
|
||||
}
|
||||
else {
|
||||
object.attr('disabled', true);
|
||||
object.children().attr('disabled', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -121,18 +121,18 @@
|
||||
*/
|
||||
Drupal.theme.prototype.CToolsModalDialog = function () {
|
||||
var html = ''
|
||||
html += ' <div id="ctools-modal">'
|
||||
html += ' <div class="ctools-modal-content">' // panels-modal-content
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <a class="close" href="#">';
|
||||
html += Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage;
|
||||
html += ' </a>';
|
||||
html += ' <span id="modal-title" class="modal-title"> </span>';
|
||||
html += ' </div>';
|
||||
html += ' <div id="modal-content" class="modal-content">';
|
||||
html += ' </div>';
|
||||
html += '<div id="ctools-modal">'
|
||||
html += ' <div class="ctools-modal-content">' // panels-modal-content
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <a class="close" href="#">';
|
||||
html += Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage;
|
||||
html += ' </a>';
|
||||
html += ' <span id="modal-title" class="modal-title"> </span>';
|
||||
html += ' </div>';
|
||||
html += ' <div id="modal-content" class="modal-content">';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
@@ -142,11 +142,11 @@
|
||||
*/
|
||||
Drupal.theme.prototype.CToolsModalThrobber = function () {
|
||||
var html = '';
|
||||
html += ' <div id="modal-throbber">';
|
||||
html += ' <div class="modal-throbber-wrapper">';
|
||||
html += Drupal.CTools.Modal.currentSettings.throbber;
|
||||
html += ' </div>';
|
||||
html += '<div id="modal-throbber">';
|
||||
html += ' <div class="modal-throbber-wrapper">';
|
||||
html += Drupal.CTools.Modal.currentSettings.throbber;
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
};
|
||||
@@ -265,7 +265,10 @@
|
||||
}
|
||||
// An empty event means we were triggered via .click() and
|
||||
// in jquery 1.4 this won't trigger a submit.
|
||||
if (event.bubbles == undefined) {
|
||||
// We also have to check jQuery version to prevent
|
||||
// IE8 + jQuery 1.4.4 to break on other events
|
||||
// bound to the submit button.
|
||||
if (jQuery.fn.jquery === '1.4' && typeof event.bubbles === "undefined") {
|
||||
$(this.form).trigger('submit');
|
||||
return false;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
Drupal.CTools.Stylizer.addFarbtastic = function(context) {
|
||||
// This behavior attaches by ID, so is only valid once on a page.
|
||||
if ($('ctools_stylizer_color_scheme_form .color-form.Stylizer-processed').size()) {
|
||||
if ($('#ctools_stylizer_color_scheme_form .color-form.Stylizer-processed').size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user