Skip to content

Commit

Permalink
Merge in Drupal 7.x-2.3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
herbdool committed May 13, 2022
2 parents 03a666b + 4e957ba commit 8c3b549
Show file tree
Hide file tree
Showing 20 changed files with 710 additions and 358 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,20 @@ settings" will lose the currently selected view if it doesn't have a
when displaying referenced nodes.
#1183300 by Pasqualle: Remove maxlength from noderef autocomplete widget.
#1236096 by Dave Reid: fix fatal error on prepare_view (followup to #1094406)
#1275096 by Scyther, dereine, and jenlampton: Fix column not found error for nid.
#1275096 by Scyther, dereine, and jenlampton: Fix column not found error for
nid.
#1275096 by jboese, dereine: Fix column not found error for nid (take 2).
#1341148 by plach: Fix Check views_access() when using Views to get the potential
references.
#1341148 by plach: Fix Check views_access() when using Views to get the
potential references.
#1085576 by henrrrik, stamina, yched: Added "raw ID" and "raw path" formatters.
#1051624 by Stalski: Added "rendered user in a given view mode" formatter for
user_reference fields.
#988856 by Nephele, johnv, rickmanelius, BlakeLucchesi ... : Added Feeds mapper
for node_reference and user_reference fields.
#1219224 by kunago, michaelfavia, yched: Added support for optgroups in select
widget (for referenceable nodes/users provided by a view).
#1194086 by Dave Reid, mariagwyn, yched: Display entity labels through entity_label()
(formatters only for now)
#1194086 by Dave Reid, mariagwyn, yched: Display entity labels through
entity_label() (formatters only for now)
#1288852 by yched: Fixed "Trying to get property of non-object" with fatal error
on user_reference fields using a view (when the view does not include the
user name as a field).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This module is based on the Drupal module References-7.x-2.x

Project page: http://drupal.org/project/references.

Drupal Maintainers:
Drupal Maintainers:
- Alex Andrascu (https://www.drupal.org/u/alex-andrascu)
- Yves Chedemois (https://www.drupal.org/u/yched)
- Karen Stevenson (https://www.drupal.org/u/karens)
Expand Down
36 changes: 0 additions & 36 deletions README.txt

This file was deleted.

22 changes: 22 additions & 0 deletions js/references.admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @file
* JavaScript for References Admin Pages.
*/

(function ($) {

'use strict';

Backdrop.behaviors.referencesAdmin = {
attach: function (context, settings) {

var config_check_uncheck_all_roles = jQuery('input:checkbox[value=user_reference_config_select_all_roles]', context);

var role_options = jQuery('#edit-field-settings-referenceable-roles', context).find('input[type=checkbox]', context);

jQuery(config_check_uncheck_all_roles).on('click', function () {
role_options.not(this).prop('checked', this.checked);
});
}
};
})(jQuery);
17 changes: 15 additions & 2 deletions node_reference/node_reference.devel_generate.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<?php
// $Id: nodereference.devel_generate.inc,v 1.1 2010/01/28 21:06:42 weitzman Exp $

/**
* @file
* File for devel generate.
*
* $Id: nodereference.devel_generate.inc,v 1.1 2010/01/28 21:06:42
* weitzman Exp $.
*/

/**
* Default function to generate.
*/
function node_reference_devel_generate($object, $field, $instance, $bundle) {
if (field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_CUSTOM) {
return devel_generate_multiple('_node_reference_devel_generate', $object, $field, $instance, $bundle);
Expand All @@ -10,10 +20,13 @@ function node_reference_devel_generate($object, $field, $instance, $bundle) {
}
}

/**
* Function to Devel Generate.
*/
function _node_reference_devel_generate($object, $field, $instance, $bundle) {
$object_field = array();
$allowed_values = node_reference_potential_references($field);
// unset($allowed_values[0]);
// unset($allowed_values[0]);.
if (!empty($allowed_values)) {
// Just pick one of the specified allowed values.
$object_field['nid'] = array_rand($allowed_values);
Expand Down
Loading

0 comments on commit 8c3b549

Please sign in to comment.