The functionality on "Select parents automatically" does not work if JQUERT > 1.6
need to change .attr to .prop:

current:

      if(checkbox.attr('checked')) {
        checkbox.parents('ul.term-reference-tree-level li').children('div.form-item').children('input[type=checkbox]').each(function() {
          $(this).attr('checked', checkbox.attr('checked'));

should be:

     if(checkbox.prop('checked')) {
        checkbox.parents('ul.term-reference-tree-level li').children('div.form-item').children('input[type=checkbox]').each(function() {
             $(this).prop('checked', checkbox.prop('checked'));

see http://forum.jquery.com/topic/please-explain-attr-vs-prop-change-in-1-6

CommentFileSizeAuthor
#2 term_reference_select_parents.patch1018 bytestomhollevoet

Comments

fatfish created an issue. See original summary.

tomhollevoet’s picture

StatusFileSize
new1018 bytes

See patch file (This patch file includes https://www.drupal.org/node/1940936).

tomhollevoet’s picture

Status: Needs work » Needs review
halmsx’s picture

hi.

yep. the patch file doesnt work.

i manually replaced all occurrences of ".attr" with ".prop" and both select parent and cascading work as it should both for new content and updates

jquery update is set at 1.10.

fluidstack’s picture

It works.

alex_optim’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
Status: Needs review » Needs work

Module works correctly with jQuery 1.10.2 but doesn't work with >1.6 and <1.10
The patch doesn't help.

vladimiraus’s picture

Status: Needs work » Closed (outdated)

Thank you everyone for your contribution.
Drupal 7 is no longer supported but we always need support for Drupal 11 version.
Closing as outdated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.