Commit 039e8a7f authored by frjo's avatar frjo
Browse files

Mobil is spelled mobile in English. At least I was consistent.

parent f9c56f95
......@@ -250,22 +250,22 @@ function colorbox_admin_settings() {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['colorbox_advanced_settings']['colorbox_mobil_detect'] = array(
$form['colorbox_advanced_settings']['colorbox_mobile_detect'] = array(
'#type' => 'radios',
'#title' => t('Mobil detection'),
'#title' => t('Mobile detection'),
'#options' => array(1 => t('On'), 0 => t('Off')),
'#default_value' => variable_get('colorbox_mobil_detect', 1),
'#default_value' => variable_get('colorbox_mobile_detect', 1),
'#description' => t('If on (default) Colorbox will not be active for devices with a the max width set below.'),
);
$form['colorbox_advanced_settings']['colorbox_mobil_device_width'] = array(
$form['colorbox_advanced_settings']['colorbox_mobile_device_width'] = array(
'#type' => 'textfield',
'#title' => t('Device with'),
'#default_value' => variable_get('colorbox_mobil_device_width', '480px'),
'#default_value' => variable_get('colorbox_mobile_device_width', '480px'),
'#size' => 30,
'#description' => t('Set the mobil device max with. Default: 480px.'),
'#description' => t('Set the mobile device max with. Default: 480px.'),
'#states' => array(
'visible' => array(
':input[name="colorbox_mobil_detect"]' => array('value' => '1'),
':input[name="colorbox_mobile_detect"]' => array('value' => '1'),
),
),
);
......
......@@ -187,8 +187,8 @@ function _colorbox_doheader() {
'initialHeight' => variable_get('colorbox_initialheight', '250'),
'fixed' => variable_get('colorbox_fixed', 1) ? TRUE : FALSE,
'scrolling' => variable_get('colorbox_scrolling', 1) ? TRUE : FALSE,
'mobildetect' => variable_get('colorbox_mobil_detect', 1) ? TRUE : FALSE,
'mobildevicewidth' => variable_get('colorbox_mobil_device_width', '480px'),
'mobiledetect' => variable_get('colorbox_mobile_detect', 1) ? TRUE : FALSE,
'mobiledevicewidth' => variable_get('colorbox_mobile_device_width', '480px'),
);
}
else {
......@@ -201,8 +201,8 @@ function _colorbox_doheader() {
'maxWidth' => '98%',
'maxHeight' => '98%',
'fixed' => TRUE,
'mobildetect' => variable_get('colorbox_mobil_detect', 1) ? TRUE : FALSE,
'mobildevicewidth' => variable_get('colorbox_mobil_device_width', '480px'),
'mobiledetect' => variable_get('colorbox_mobile_detect', 1) ? TRUE : FALSE,
'mobiledevicewidth' => variable_get('colorbox_mobile_device_width', '480px'),
);
}
......
......@@ -6,9 +6,9 @@ Drupal.behaviors.initColorbox = {
return;
}
if (settings.colorbox.mobildetect && window.matchMedia) {
if (settings.colorbox.mobiledetect && window.matchMedia) {
// Disable Colorbox for small screens.
mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobildevicewidth + ")");
mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
if (mq.matches) {
return;
}
......
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