Skip to content
Snippets Groups Projects
Commit 2512565d authored by Chris Gross's avatar Chris Gross
Browse files

weekly build

parent 850de5ff
No related branches found
No related tags found
No related merge requests found
Showing
with 121 additions and 55 deletions
WCM Base 7.x-1.x, 2017-02-17
----------------------------
- WCM Base: Updated contrib modules fieldable_panels_panes, media, redis, smtp, token.
- WCM Media Gallery: Updated colorbox contrib module to 2.12.
- WMM Omega: Merged commits to fix search buttons, tile pane resizing, misc form fixes.
- WCM Search: Updated search_api_attachments contrib module to 1.10.
- WCM UUID Settings: Updated uuid_features contrib module to 1.0-rc1.
- OCIO Image Styles: Added JPG image quality variable, set to 90%.
- OCIO Site Information: Fixed front page variable being stored as path alias.
- OCIO WYSIWYG: Updated simplify contrib module to 3.4.
WCM Base 7.x-1.x, 2017-02-15
----------------------------
- WCM Workbench Settings: Added patch to Diff module that fixes HTML appearing in diff
......
......@@ -27,4 +27,6 @@
* use the file's name. i.e. __title_or_filename__.
*/
?>
<a href="<?php print $path; ?>" title="__title__" class="colorbox colorbox-insert-image" rel="<?php print $gallery_id; ?>"><img src="<?php print $url; ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php endif; ?>alt="__alt__" title="__title__" class="<?php print $class; ?>" /></a>
<a href="<?php print $path; ?>" title="__title__" class="colorbox colorbox-insert-image" data-colorbox-gallery="<?php print $gallery_id; ?>">
<img src="<?php print $url; ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php endif; ?>alt="__alt__" title="__title__" class="<?php print $class; ?>" />
</a>
......@@ -250,12 +250,19 @@ function colorbox_admin_settings() {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['colorbox_advanced_settings']['colorbox_unique_token'] = array(
'#type' => 'radios',
'#title' => t('Unique per-request gallery token'),
'#options' => array(1 => t('On'), 0 => t('Off')),
'#default_value' => variable_get('colorbox_unique_token', 1),
'#description' => t('If On (default), Colorbox will add a unique per-request token to the gallery id to avoid images being added manually to galleries. The token was added as a security fix but some see the old behavoiur as an feature and this settings makes it possible to remove the token.'),
);
$form['colorbox_advanced_settings']['colorbox_mobile_detect'] = array(
'#type' => 'radios',
'#title' => t('Mobile detection'),
'#options' => array(1 => t('On'), 0 => t('Off')),
'#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.'),
'#description' => t('If On (default), Colorbox will not be active for devices with the max width set below.'),
);
$form['colorbox_advanced_settings']['colorbox_mobile_device_width'] = array(
'#type' => 'textfield',
......
......@@ -10,11 +10,11 @@
*
* Implements hook_colorbox_settings_alter().
*
* @param $settings
* @param array $settings
* An associative array of Colorbox settings. See the
* @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink
* for the full list of supported parameters.
* @param $style
* @param string $style
* The name of the active style plugin. If $style is 'none', no Colorbox
* theme will be loaded.
*/
......@@ -29,9 +29,9 @@ function hook_colorbox_settings_alter(&$settings, &$style) {
}
/**
* Allows to override activation of Colobox for the current URL.
* Allows to override activation of Colorbox for the current URL.
*
* @param $active
* @param bool $active
* A boolean indicating whether colorbox should be active for the current
* URL or not.
*/
......
......@@ -6,9 +6,9 @@ configure = admin/config/media/colorbox
files[] = views/colorbox_handler_field_colorbox.inc
; Information added by Drupal.org packaging script on 2015-10-01
version = "7.x-2.10"
; Information added by Drupal.org packaging script on 2016-06-06
version = "7.x-2.12"
core = "7.x"
project = "colorbox"
datestamp = "1443691449"
datestamp = "1465255741"
......@@ -6,9 +6,9 @@
*/
/**
* The default path to the Colorbox directory.
* The minimum required version of the Colorbox plugin.
*/
define('COLORBOX_MIN_PLUGIN_VERSION', '1.3.21.1');
define('COLORBOX_MIN_PLUGIN_VERSION', '1.6.1');
/**
......@@ -56,8 +56,8 @@ function colorbox_theme() {
*/
function colorbox_init() {
// Do not load colorbox during the Drupal installation process, e.g. if part
// of installation profiles.
if (!drupal_installation_attempted()) {
// of installation profiles. Only add the JavaScript and CSS on specified paths.
if (!drupal_installation_attempted() && _colorbox_active()) {
_colorbox_doheader();
}
}
......@@ -132,7 +132,7 @@ function colorbox_menu() {
/**
* Check if Colorbox should be active for the current URL.
*
* @return
* @return bool
* TRUE if Colorbox should be active for the current page.
*/
function _colorbox_active() {
......@@ -166,9 +166,6 @@ function _colorbox_doheader() {
if ($already_added) {
return; // Don't add the JavaScript and CSS multiple times.
}
if (!_colorbox_active()) {
return; // Don't add the JavaScript and CSS on specified paths.
}
// Insert options and translated strings as javascript settings.
if (variable_get('colorbox_custom_settings_activate', 0)) {
......@@ -371,7 +368,7 @@ function colorbox_field_formatter_settings_form($field, $instance, $view_mode, $
'#type' => 'fieldset',
'#title' => t('Replacement patterns'),
'#theme' => 'token_tree',
'#token_types' => array($instance['entity_type'], 'file'),
'#token_types' => array_merge(array_keys($field['bundles']),array('file')),
'#recursion_limit' => $recursion_limit,
'#dialog' => TRUE,
'#states' => array(
......@@ -495,6 +492,8 @@ function colorbox_field_formatter_view($entity_type, $entity, $field, $instance,
/**
* Implements hook_insert_styles().
*
* @return array
*/
function colorbox_insert_styles() {
$insert_styles = array();
......@@ -517,7 +516,7 @@ function colorbox_insert_content($item, $style, $widget) {
/**
* Machine names normally need to be unique but that does not apply to galleries.
*
* @return
* @return false
* Always FALSE
*/
function colorbox_gallery_exists() {
......
......@@ -8,12 +8,15 @@
/**
* Returns HTML for an Colorbox image field formatter.
*
* @param $variables
* @param array $variables
* An associative array containing:
* - item: An array of image data.
* - image_style: An optional image style.
* - path: An array containing the link 'path' and link 'options'.
*
* @return string
* An HTML string representing the themed output.
*
* @ingroup themeable
*/
function theme_colorbox_image_formatter($variables) {
......@@ -125,8 +128,8 @@ function theme_colorbox_image_formatter($variables) {
}
// If gallery id is not empty add unique per-request token to avoid images being added manually to galleries.
if (!empty($gallery_id)) {
// Check if gallery token has alrady been set, we need to reuse the token for the whole request.
if (!empty($gallery_id) && variable_get('colorbox_unique_token', 1)) {
// Check if gallery token has already been set, we need to reuse the token for the whole request.
if (is_null($gallery_token)) {
// We use a short token since randomness is not critical.
$gallery_token = drupal_random_key(8);
......@@ -147,13 +150,16 @@ function theme_colorbox_image_formatter($variables) {
/**
* Returns HTML for an image using a specific Colorbox image style.
*
* @param $variables
* @param array $variables
* An associative array containing:
* - image: image item as array.
* - path: The path of the image that should be displayed in the Colorbox.
* - title: The title text that will be used as a caption in the Colorbox.
* - gid: Gallery id for Colorbox image grouping.
*
* @return string
* An HTML string containing a link to the given path.
*
* @ingroup themeable
*/
function theme_colorbox_imagefield($variables) {
......@@ -176,9 +182,8 @@ function theme_colorbox_imagefield($variables) {
'attributes' => array(
'title' => $variables['title'],
'class' => $class,
'rel' => $variables['gid'],
'data-colorbox-gallery' => $variables['gid'],
),
'language' => array('language' => NULL),
);
return l($image, $options['path'], $options);
......@@ -186,6 +191,8 @@ function theme_colorbox_imagefield($variables) {
/**
* Preprocess variables for the colorbox-insert-image.tpl.php file.
*
* @param array $variables
*/
function template_preprocess_colorbox_insert_image(&$variables) {
$item = $variables['item'];
......
......@@ -23,7 +23,7 @@ define('COLORBOX_DOWNLOAD_PREFIX', 'colorbox-');
*
* See `drush topic docs-commands` for a list of recognized keys.
*
* @return
* @return array
* An associative array describing your command(s).
*/
function colorbox_drush_command() {
......@@ -49,10 +49,10 @@ function colorbox_drush_command() {
* This function is called whenever a drush user calls
* 'drush help <name-of-your-command>'
*
* @param
* @param string $section
* A string with the help section (prepend with 'drush:')
*
* @return
* @return string
* A string with the help text for your command.
*/
function colorbox_drush_help($section) {
......@@ -63,14 +63,14 @@ function colorbox_drush_help($section) {
}
/**
* Implements drush_MODULE_post_pm_enable().
* Implements drush_MODULE_pre_pm_enable().
*/
// function drush_colorbox_post_pm_enable() {
// $modules = func_get_args();
// if (in_array('colorbox', $modules)) {
// drush_colorbox_plugin();
// }
// }
function drush_colorbox_pre_pm_enable() {
$modules = drush_get_context('PM_ENABLE_MODULES');
if (in_array('colorbox', $modules) && !drush_get_option('skip')) {
drush_colorbox_plugin();
}
}
/**
* Command to download the Colorbox plugin.
......
......@@ -14,6 +14,16 @@ Drupal.behaviors.initColorbox = {
}
}
// Use "data-colorbox-gallery" if set otherwise use "rel".
settings.colorbox.rel = function () {
if ($(this).data('colorbox-gallery')) {
return $(this).data('colorbox-gallery');
}
else {
return $(this).attr('rel');
}
};
$('.colorbox', context)
.once('init-colorbox')
.colorbox(settings.colorbox);
......
......@@ -5,6 +5,15 @@ Drupal.behaviors.initColorboxInline = {
if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
return;
}
if (settings.colorbox.mobiledetect && window.matchMedia) {
// Disable Colorbox for small screens.
var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
if (mq.matches) {
return;
}
}
$.urlParam = function(name, url){
if (name == 'fragment') {
var results = new RegExp('(#[^&#]*)').exec(url);
......
......@@ -5,6 +5,15 @@ Drupal.behaviors.initColorboxLoad = {
if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
return;
}
if (settings.colorbox.mobiledetect && window.matchMedia) {
// Disable Colorbox for small screens.
var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
if (mq.matches) {
return;
}
}
$.urlParams = function (url) {
var p = {},
e,
......
......@@ -6,9 +6,9 @@ package = Chaos tool suite
version = CTOOLS_MODULE_VERSION
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -19,6 +19,7 @@
.ctools-button-processed .ctools-content ul {
list-style-image: none;
list-style-type: none;
margin-left: 0;
}
.ctools-button-processed li {
......
......@@ -199,7 +199,10 @@ function hook_ctools_render_alter(&$info, &$page, &$context) {
* or categories or to rename content on specific sites.
*/
function hook_ctools_content_subtype_alter($subtype, $plugin) {
$subtype['render last'] = TRUE;
// Force a particular subtype of a particular plugin to render last.
if ($plugin['module'] == 'some_plugin_module' && $plugin['name'] == 'some_plugin_name' && $subtype['subtype_id'] == 'my_subtype_id') {
$subtype['render last'] = TRUE;
}
}
/**
......
......@@ -6,11 +6,19 @@ files[] = includes/context.inc
files[] = includes/css-cache.inc
files[] = includes/math-expr.inc
files[] = includes/stylizer.inc
; Tests.
files[] = tests/context.test
files[] = tests/css.test
files[] = tests/css_cache.test
files[] = tests/ctools.plugins.test
files[] = tests/math_expression.test
files[] = tests/math_expression_stack.test
files[] = tests/object_cache.test
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -5,9 +5,9 @@ package = Chaos tool suite
version = CTOOLS_MODULE_VERSION
dependencies[] = ctools
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -5,9 +5,9 @@ version = CTOOLS_MODULE_VERSION
dependencies[] = ctools
core = 7.x
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -5,9 +5,9 @@ package = Chaos tool suite
version = CTOOLS_MODULE_VERSION
dependencies[] = ctools
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -8,9 +8,9 @@ dependencies[] = page_manager
dependencies[] = advanced_help
core = 7.x
; Information added by Drupal.org packaging script on 2016-10-16
version = "7.x-1.11"
; Information added by Drupal.org packaging script on 2016-11-22
version = "7.x-1.12"
core = "7.x"
project = "ctools"
datestamp = "1476581654"
datestamp = "1479787162"
......@@ -64,7 +64,7 @@ function ctools_drush_command() {
'machine names' => 'Space separated list of exportables you want to view.',
),
'options' => array(
'indent' => 'The string to use for indentation when dispalying the exportable export code. Defaults to \'\'.',
'indent' => 'The string to use for indentation when displaying the exportable export code. Defaults to \'\'.',
'no-colour' => 'Remove any colour formatting from export string output. Ideal if you are sending the output of this command to a file.',
'module' => $module_text,
'all' => $all_text,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment