Commit d30c1404 authored by frjo's avatar frjo
Browse files

#772500: Patch by TR, Wrap jQuery to prevent conflict with other JavaScript libraries.

parent e69329bd
// $Id$
(function ($) {
Drupal.behaviors.initColorbox = function (context) {
var settings = Drupal.settings.colorbox;
$('.colorbox', context).filter(':not(.initColorbox-processed)').addClass('initColorbox-processed').colorbox({
......@@ -18,3 +20,5 @@ Drupal.behaviors.initColorbox = function (context) {
close:settings.close
});
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.initColorboxAdminSettings = function (context) {
$('div.colorbox-custom-settings-activate input.form-radio', context).click(function () {
if (this.value == 1) {
......@@ -8,4 +10,6 @@ Drupal.behaviors.initColorboxAdminSettings = function (context) {
$('div.colorbox-custom-settings').hide();
}
});
};
\ No newline at end of file
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.initColorboxDefaultStyle = function (context) {
$(document).bind('cbox_complete', function(){
setTimeout(function(){ $('#cboxTitle').slideUp() }, 1500);
......@@ -9,4 +11,6 @@ Drupal.behaviors.initColorboxDefaultStyle = function (context) {
$('#cboxTitle').slideUp();
});
});
};
\ No newline at end of file
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.initColorboxForm = function (context) {
var settings = Drupal.settings.colorbox;
$.urlParam = function(name, url){
......@@ -22,3 +24,5 @@ Drupal.behaviors.initColorboxForm = function (context) {
close:settings.close
});
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.initColorboxImageModule = function (context) {
var settings = Drupal.settings.colorbox;
......@@ -30,3 +32,5 @@ Drupal.behaviors.initColorboxImageModule = function (context) {
$(this).addClass('colorbox');
});
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.initColorboxLogin = function (context) {
$("a[href*='/user/login'], a[href*='?q=user/login']", context).colorbox({iframe:true, innerWidth:250, innerHeight:230}).each(function() {
this.href = this.href.replace(/user\/login/,"user/login/colorbox");
});
};
})(jQuery);
......@@ -19,4 +19,4 @@ Drupal.behaviors.initColorboxDefaultStyle = function (context) {
});
};
})(jQuery);
\ No newline at end of file
})(jQuery);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment