When using jquery version 1.7.1 (updated via jquery_update) the widget select stays disabled, even though different widget types is available.

Steps to reproduce:
Install the jquery_update module, and select jquery version 1.7.1
Go to "manage fields" for any content type
Select any field type in the "add field" section
the widget type selector has the attribute 'disabled' = 'disabled'

After applying the provided patch it is possible to click on the widget type selector
the fix is backward compatible with query 1.4.4.

CommentFileSizeAuthor
#3 field_ui.js_.patch545 bytesrunand
#1 field_ui.js_.patch577 bytesrunand
field-ui.js_.patch695 bytesrunand

Comments

runand’s picture

Status: Active » Needs review
StatusFileSize
new577 bytes

I have added a new patch, the first patch removed an empty line, that should not have been removed

Status: Needs review » Needs work

The last submitted patch, field_ui.js_.patch, failed testing.

runand’s picture

Status: Needs work » Needs review
StatusFileSize
new545 bytes

Fixed wrong paths in the diff

bschilt’s picture

I had the same issue. This patch did not work for me but upgrading to jquery_update 2.2 worked.

runand’s picture

jquery_update 2.2 only upgrades jQuery to version 1.5.2, when using jquery_update verison 7.x-2.x-dev, it is possible to select jQuery 1.7 as version.
I have retested the patch locally, on a fresh checkup of the 7.x branch, and it works as I have previously described. I am not sure that your issue is the same as mine.

Dave Sandilands’s picture

Apologies if this the wrong place for this. I think it's related enough. And thanks to runand for showing me the way.

I had the same issue in Drupal 6 with JQuery 1.61. I amended all/modules/cck/content.js in the same manner ie

At line 78 replace

    $(this)
      .html(html)
      .attr('disabled', disabled ? 'disabled' : "");

with this

    $(this)
      .html(html)
      .attr('disabled', disabled ? 'disabled' : false);

Worked a treat.

nod_’s picture

Issue tags: +jQuery
JamesK’s picture

Title: field widget selector always disabled when using jquery 1.7.1 » Empty 'disabled' attribute is not forwards-compatible with newer jQuery versions
Version: 7.12 » 8.x-dev
Component: field system » javascript
Issue tags: -jQuery

There are probably other areas of core with this same problem. The patch should update all of them.
Need to update 8.x first.

JamesK’s picture

Status: Needs review » Closed (duplicate)
gagarine’s picture

Status: Closed (duplicate) » Needs review

Actually for property on jQuery 1.7 you should use prop().

Should we close this one as a duplicate of #1480568: use $.attr with false instead of empty string?

gagarine’s picture

Status: Needs review » Closed (duplicate)

Oups JamesK you are to fast..