Active
Project:
Related links
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2012 at 12:29 UTC
Updated:
29 Jun 2012 at 12:29 UTC
The javascript doesn't use the context variable and thus I run into problems when i have the node level blocks module enabled as every time i drag a block an extra relatedlink field is added.
I solved it by changing the js into this:
(function ($) {
Drupal.behaviors.relatedlinks = {
attach: function(context, settings) {
var autocomplete_path = Drupal.settings.relatedlinks_autocomplete[0];
// Strip relatedlinks/autocomplete from the path.
var path_prefix = autocomplete_path.substring(0, autocomplete_path.length - 25);
// Trigger Drupal's autocomplete.
Drupal.behaviors.autocomplete;
var ta = $('#edit-relatedlinks-fieldset-relatedlinks', context);
So now it properly uses context