references-dialog.js needs various bugfixes and performance improvements:
- variable caching instead of writing the same jQuery statement $(...) multiple times
- missing line endings (;)
- wrong "undefined" comparisons
- context bugfix for $('.' + key + ' a.references-dialog-activate')

Surprisingly, the context bugfix was no problem for jQuery 1.5 (?), even though it's wrong.
But I noticed it was if you're using a higher jQuery version (with for example the jQuery Update module).

Comments

jover’s picture

Patch will follow...

jover’s picture

Patched

jover’s picture

Assigned: jover » Unassigned
Priority: Normal » Major
Status: Active » Needs review

Needs review...

Issue #1850808: jQuery 1.7.1 incompatability became obsolete with this patch...

rogical’s picture

Nice patch, If we can have a test through different versions of jquery, I'll commit this.

jaydub’s picture

Using jQuery Update here to run with jQuery 1.7 and w/o this patch the add/edit links did not open a dialog. Applied patch and dialogs work again.

rogical’s picture

issue can be solved here together
#1800806: Wrong arguments for .click()

rwilson0429’s picture

Patch in #2 works well for me.

Prior to patching, when using jQuery Update to run jQuery 1.7, could not select a reference from a View's Reference Dialog Display by clicking on it. Switching back to jQuery 1.5, clicking a reference from a View Reference Dialog display worked fine.

After applying the patch in #2, I reverted back to jQuery 1.7 and clicking on a reference from a View Reeference Dialog Display worked as expected (the clicked reference was placed on the input form). I also tested with jQuery 1.5 using this patch and it continued to function as expected.

Thanks for the patch.

mxt’s picture

I can confirm that patch in #2 resolve issues with jQuery 1.7.

Thank you!

bennos’s picture

Status: Needs review » Reviewed & tested by the community

Works with jquery 1.7.

2 confirmations. think we can set it "RTBC"

mxt’s picture

Can this be committed please?

rogical’s picture

Status: Reviewed & tested by the community » Fixed

done.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.