Commit c07a4ea2 authored by frjo's avatar frjo
Browse files

Improvments to coding style. Removing -processed from once() in all js.

parent b8c67eac
......@@ -17,7 +17,7 @@ function colorbox_admin_settings() {
'#type' => 'fieldset',
'#title' => t('Colorbox plugin settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE
'#collapsed' => TRUE,
);
$form['colorbox_plugin_settings']['colorbox_path'] = array(
'#type' => 'textfield',
......@@ -61,7 +61,7 @@ function colorbox_admin_settings() {
$form['colorbox_login_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Login links settings')
'#title' => t('Login links settings'),
);
$form['colorbox_login_settings']['colorbox_login'] = array(
'#type' => 'checkbox',
......@@ -230,7 +230,7 @@ function colorbox_admin_settings() {
'#type' => 'fieldset',
'#title' => t('Slideshow settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE
'#collapsed' => TRUE,
);
$form['colorbox_custom_settings']['colorbox_slideshow_settings']['colorbox_slideshow'] = array(
'#type' => 'radios',
......@@ -294,7 +294,7 @@ function colorbox_admin_settings() {
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE
'#collapsed' => TRUE,
);
$form['colorbox_advanced_settings']['colorbox_caption_trim'] = array(
'#type' => 'radios',
......
......@@ -7,7 +7,7 @@ Drupal.behaviors.initColorbox = {
}
$('a, area, input', context)
.filter('.colorbox')
.once('init-colorbox-processed')
.once('init-colorbox')
.colorbox(settings.colorbox);
}
};
......
......@@ -3,7 +3,7 @@
Drupal.behaviors.initColorboxImageModule = {
attach: function (context, settings) {
// Image Attach Functionality
$('div.image-attach-body > a, ul.images a', context).once('init-colorbox-image-module-processed', function () {
$('div.image-attach-body > a, ul.images a', context).once('init-colorbox-image-module', function () {
var $img = $('.image', this);
if ($img.length === 0) {
return true;
......
......@@ -15,7 +15,7 @@ Drupal.behaviors.initColorboxInline = {
if (!results) { return ''; }
return results[1] || '';
};
$('a, area, input', context).filter('.colorbox-inline').once('init-colorbox-inline-processed').colorbox({
$('a, area, input', context).filter('.colorbox-inline').once('init-colorbox-inline').colorbox({
transition:settings.colorbox.transition,
speed:settings.colorbox.speed,
opacity:settings.colorbox.opacity,
......
......@@ -33,7 +33,7 @@ Drupal.behaviors.initColorboxLoad = {
};
$('a, area, input', context)
.filter('.colorbox-load')
.once('init-colorbox-load-processed', function () {
.once('init-colorbox-load', function () {
var params = $.urlParams($(this).attr('href'));
$(this).colorbox($.extend({}, settings.colorbox, params));
});
......
......@@ -5,7 +5,7 @@ Drupal.behaviors.initColorboxLogin = {
if (!$.isFunction($.colorbox)) {
return;
}
$("a[href*='/user/login'], a[href*='?q=user/login']", context).once('init-colorbox-login-processed', function () {
$("a[href*='/user/login'], a[href*='?q=user/login']", context).once('init-colorbox-login', function () {
var path = this.href;
var new_path = path.replace(/user\/login/,'user/login/colorbox')
var addquery = (path.indexOf('?') !=-1) ? '&' : '?';
......
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