updated i18n, views, imagestyleflush, field_group

patch views_rss_media
This commit is contained in:
2019-05-14 10:14:51 +02:00
parent 9adc940a67
commit c97e0f8ba1
142 changed files with 4489 additions and 786 deletions

View File

@@ -1,6 +1,37 @@
/* $Id*/
CHANGELOG for field_group for Drupal 7
Field Group origin/7.x-1.x, 2017-11-04
--------------------------------------
- Tests fail after new 'administer fields' permission.
- Update CHANGELOG.txt to 7.x-1.5 Release.
- Revert "Issue #2646106 by jribeiro: Update CHANGELOG.txt to 7.x-1.5 Release".
- Update CHANGELOG.txt to 7.x-1.5 Release.
- Fix whitespace between "&" and parameters for some functions.
- Avoid bad code pattern (that is picked up by security scanners) when getting hash.
- Should #array_parents be updated in field_group_fields_nest()?.
- "Show" appears in horizontal tab title if node form submitted through ajax.
- CSS breaks i18n string translation interface.
- "uncaught exception: Syntax error, unrecognized expression: #" after 7.x-1.4 update.
- PHP7 - Uniform Variable Syntax updates are causing exported field_groups to not have names.
Field_group 7.x-1.5
o Added extra formatting on html element attributes.
o Fixed bug on automatic ID generation in javascript.
o Issue #2511960 by rrfegade: spelling errors in D7.
o Issue #2194279 by Georgique: Export translatables (label and descriptions) in Features.
o Issue #2386335 by Dubs: Integer Group Array Keys can create empty node forms.
o Issue #2269133 by sammuell: Accordion is always closed when using jQuery update module.
o Issue #2258939 by Snipon: Fixed Change to preventDefault on multipage controls.
o Issue #2173937 by jantoine, omerida | Bernieman: Fixed Accordion Element has fixed height in HTML.
o Issue #2311789 by eelkeblok: Fixed Group is incorrectly determined to be empty with nested form elements.
o Issue #2272003 by karolrybak | Kwb: Fixed Fieldgroup no longer renders after using more than one 'HTML Element' on the same level.
o Issue #2309219 by czigor: Fixed Proper CTools exportable loading.
o Issue #2283245 by stefan.r | jrb: Fixed New id functionality breaks tests and CSS on existing field groups.
o Issue #2295133 by boyan.borisov, interX: Fixed field_group_update_7007 error.
o Remove field_group.css, the css is not needed anymore.
o Fix horiziontal tabs when used as standalone element.
Field_group 7.x-1.4
o Issue #2129805 by RaF: Incorrect markup when open div & custom classes provided.
o Issue #2037731 by maximpodorov, Zach Harkey: Remove id attribute from HTML elements.

View File

@@ -220,7 +220,7 @@ function hook_field_group_format_settings($group) {
* @param Array $elements by address.
* @param Object $group The Field group info.
*/
function hook_field_group_pre_render(& $element, $group, & $form) {
function hook_field_group_pre_render(&$element, $group, &$form) {
// You can prepare some variables to use in the logic.
$view_mode = isset($form['#view_mode']) ? $form['#view_mode'] : 'form';
@@ -268,7 +268,7 @@ function hook_field_group_pre_render(& $element, $group, & $form) {
*
* Function that fungates as last resort to alter the pre_render build.
*/
function hook_field_group_pre_render_alter(&$element, $group, & $form) {
function hook_field_group_pre_render_alter(&$element, $group, &$form) {
if ($group->format_type == 'htab') {
$element['#theme_wrappers'] = array('my_horizontal_tab');
@@ -285,7 +285,7 @@ function hook_field_group_pre_render_alter(&$element, $group, & $form) {
*
* @param Array $elements by address.
*/
function hook_field_group_build_pre_render_alter(& $element) {
function hook_field_group_build_pre_render_alter(&$element) {
// Prepare variables.
$display = isset($element['#view_mode']);

View File

@@ -99,10 +99,10 @@ function field_group_field_ui_overview_form_alter(&$form, &$form_state, $display
// Play around with form_state so we only need to hold things
// between requests, until the save button was hit.
if (isset($form_state['field_group'][$name])) {
$group = & $form_state['field_group'][$name];
$group = &$form_state['field_group'][$name];
}
else {
$group = & $params->groups[$name];
$group = &$params->groups[$name];
}
// Check the currently selected formatter, and merge persisted values for
@@ -456,7 +456,7 @@ function field_group_format_settings_label_validate($element, &$form_state) {
* @param Object $group
* @param array $settings
*/
function field_group_formatter_row_update(& $group, $settings) {
function field_group_formatter_row_update(&$group, $settings) {
// if the row has changed formatter type, update the group object
if (!empty($settings['format']['type']) && $settings['format']['type'] != $group->format_type) {
$group->format_type = $settings['format']['type'];
@@ -469,7 +469,7 @@ function field_group_formatter_row_update(& $group, $settings) {
* @param Object $group The group object
* @param Array $settings Configuration settings
*/
function field_group_formatter_settings_update(& $group, $settings) {
function field_group_formatter_settings_update(&$group, $settings) {
// for format changes we load the defaults.
if (empty($settings['format_settings']['settings'])) {

View File

@@ -6,9 +6,9 @@ dependencies[] = ctools
core = 7.x
files[] = tests/field_group.ui.test
files[] = tests/field_group.display.test
; Information added by Drupal.org packaging script on 2016-02-28
version = "7.x-1.5+2-dev"
; Information added by Drupal.org packaging script on 2017-11-03
version = "7.x-1.6"
core = "7.x"
project = "field_group"
datestamp = "1456658044"
datestamp = "1509751991"

View File

@@ -258,8 +258,6 @@ function field_group_field_attach_delete_bundle($entity_type, $bundle) {
* Implements hook_field_attach_form().
*/
function field_group_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
$form['#attached']['css'][] = drupal_get_path('module', 'field_group') . '/field_group.field_ui.css';
field_group_attach_groups($form, 'form', $form_state);
$form['#pre_render'][] = 'field_group_form_pre_render';
}
@@ -1110,7 +1108,7 @@ function field_group_pre_render_tab(&$element, $group, &$form) {
* Implements hook_field_group_build_pre_render_alter().
* @param Array $elements by address.
*/
function field_group_field_group_build_pre_render_alter(& $element) {
function field_group_field_group_build_pre_render_alter(&$element) {
// Someone is doing a node view, in a node view. Reset content.
// TODO Check if this breaks something else.
@@ -2027,6 +2025,19 @@ function field_group_fields_nest(&$element, &$vars = NULL) {
// Construct own weight, as some fields (for example preprocess fields) don't have weight set.
$element[$group_name] = array();
$group_references[$group_name] = &$element[$group_name];
// Get group parents
$parents = array();
$current_group = $group;
while (!empty($current_group)) {
array_unshift($parents, $current_group->group_name);
$current_group = isset($element['#fieldgroups'][$current_group->parent_name]) ?
$element['#fieldgroups'][$current_group->parent_name] : NULL;
}
$group_references[$group_name]['#array_parents'] = $parents;
$element['#fieldgroups'][$group_name]->array_parents = $parents;
// Remove self from parents and set #field_parents
array_pop($parents);
$group_references[$group_name]['#field_parents'] = $parents;
}
}
@@ -2077,6 +2088,19 @@ function field_group_fields_nest(&$element, &$vars = NULL) {
// list intact (but if it is a field we don't mind).
$group_references[$parent_name][$child_name] = &$element[$child_name];
$group_references[$parent_name]['#weight'] = $element['#fieldgroups'][$parent_name]->weight;
// Prepend #array_parents & #field_parents of group child element & its element_children
// if those keys are set, and don't already include the group parents
$group_child = &$group_references[$parent_name][$child_name];
$group_parents = $group_references[$parent_name]['#array_parents'];
$process_elements = array_merge(array(&$group_child), _field_group_element_children_recursive_ref($group_child));
foreach ($process_elements as $key => $current_element) {
if (isset($current_element['#array_parents']) && !in_array($group_parents[0], $current_element['#array_parents'])) {
$process_elements[$key]['#array_parents'] = array_merge($group_parents, $current_element['#array_parents']);
}
if (isset($current_element['#field_parents']) && !in_array($group_parents[0], $current_element['#field_parents'])) {
$process_elements[$key]['#field_parents'] = array_merge($group_parents, $current_element['#field_parents']);
}
}
}
// The child has been copied to its parent: remove it from the root element.
@@ -2093,6 +2117,23 @@ function field_group_fields_nest(&$element, &$vars = NULL) {
}
/**
* Recursive element_children, returns children by reference
*/
function _field_group_element_children_recursive_ref(&$element) {
$results = array();
$children = element_children($element);
foreach ($children as $key) {
$child = &$element[$key];
if (is_array($child)) {
$results[] = &$child;
$results = array_merge($results, _field_group_element_children_recursive_ref($child));
}
unset($child);
}
return $results;
}
/**
* Function to pre render the field group element.
*

View File

@@ -29,8 +29,10 @@ Drupal.behaviors.horizontalTabs = {
// Transform each fieldset into a tab.
$fieldsets.each(function (i) {
var $legend = $('> legend', this);
$('.element-invisible', $legend).remove();
var horizontal_tab = new Drupal.horizontalTab({
title: $('> legend', this).text(),
title: $legend.text(),
fieldset: $(this)
});
horizontal_tab.item.addClass('horizontal-tab-button-' + i);
@@ -52,7 +54,7 @@ Drupal.behaviors.horizontalTabs = {
// element that matches the URL fragment, activate that tab.
var hash = window.location.hash.replace(/[=%;,\/]/g, "");
if (hash !== '#' && $(hash, this).length) {
tab_focus = $(window.location.hash, this).closest('.horizontal-tabs-pane');
tab_focus = $(hash, this).closest('.horizontal-tabs-pane');
}
else {
tab_focus = $('> .horizontal-tabs-pane:first', this);

View File

@@ -22,7 +22,7 @@ class GroupUITestCase extends DrupalWebTestCase {
parent::setUp('field_test', 'field_group', 'field_group_test');
// Create test user.
$admin_user = $this->drupalCreateUser(array('administer content types', 'administer nodes', 'access administration pages', 'bypass node access'));
$admin_user = $this->drupalCreateUser(array('administer content types', 'administer nodes', 'access administration pages', 'bypass node access', 'administer fields'));
$this->drupalLogin($admin_user);
}

View File

@@ -5,9 +5,9 @@ package = Fields
hidden = TRUE
; Information added by Drupal.org packaging script on 2016-02-28
version = "7.x-1.5+2-dev"
; Information added by Drupal.org packaging script on 2017-11-03
version = "7.x-1.6"
core = "7.x"
project = "field_group"
datestamp = "1456658044"
datestamp = "1509751991"