Modify

Opened 13 years ago

Closed 4 years ago

Last modified 4 years ago

#9599 closed task (fixed)

Switch to using jQuery UI 1.8.21

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: AutocompleteUsersPlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann, memartin, Mitar, Albert, Jun Omae, Massimo Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Switch to using jQuery UI 1.8.21, which is currently used for the DateFieldPlugin and the KeywordSuggestPlugin.

Attachments (0)

Change History (36)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Switch to using jQuery 1.7.3Switch to using jQuery UI 1.8.16

We'll have to use 1.8.16 since 1.7.3 doesn't have the Autocomplete widget.

comment:2 Changed 13 years ago by Ryan J Ollos

Cc: Steffen Hoffmann added; anonymous removed
Description: modified (diff)

On my Trac 0.12.2 installation, I'm finding that the latest version of the KeywordSuggestPlugin (r11027) works fine with the latest version of the DateFieldPlugin (r11026), but I get an error when the AutocompleteUsersPlugin (r10974) is enabled. The error is found in the Error Console on FF8, and appears when editing the CC field. The keywords field just behaves as if the KeywordSuggestPlugin is disabled.

Error: $(this).data("autocomplete") is undefined
Source File: <Link removed>/ticket/640
Line: 82

The conflict appears to be because AutocompleteUsersPlugin is using an old version of jQuery autocomplete (1.0.2), while KeywordSuggestPlugin has been ported to using jQuery UI 1.8.16.

comment:3 Changed 12 years ago by Ryan J Ollos

Cc: memartin added

#10097 closed as a duplicated.

comment:4 in reply to:  2 Changed 12 years ago by Ryan J Ollos

Cc: Mitar added

Replying to rjollos:

The conflict appears to be because AutocompleteUsersPlugin is using an old version of jQuery autocomplete

Which in fact has been deprecated in favor of jQuery UI 1.8 Autocomplete: http://docs.jquery.com/Plugins/Autocomplete.

comment:5 Changed 12 years ago by Mitar

Yes. jQuery autocomplete works nicely othewise, been using it in some other project.

comment:6 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Switch to using jQuery UI 1.8.16Switch to using jQuery UI 1.8.21

Latest stable is jQuery UI 1.8.21.

comment:7 Changed 12 years ago by Albert

Cc: Albert added

Hi,

I have the same problem with Trac1.0. Any sugestion or workaround to solve the problem?

Thanks!

comment:8 Changed 12 years ago by Ryan J Ollos

Not as far as I'm aware, but I'm in the process of upgrading my Trac instance to 1.0, and may get this plugin upgraded along the way.

comment:9 Changed 12 years ago by Mario

Hi,

I've migrated the plugin to work with the ui.autocomplete widget.
It is now compatible with TracKeywordSuggest,..... and other jQuery based plugins.
Feel free to test it download site
Tested on Trac 1.x

Mario

comment:10 Changed 12 years ago by Ryan J Ollos

Thanks, I will take a look and see about getting the changes applied to the repository.

comment:11 in reply to:  9 Changed 12 years ago by Albert

Thanks Mario!

Feel free to test it download site
Tested on Trac 1.x

Ooops, I got the error:

You don't have permission to access /wehr/ on this server.

I can't wait for the commit in the repo! ;-)

Thanks!

Albert

comment:12 in reply to:  9 Changed 12 years ago by Mario

Replying to mwehr:

Hi,

I've migrated the plugin to work with the ui.autocomplete widget.
It is now compatible with TracKeywordSuggest,..... and other jQuery based plugins.
Feel free to test it download site
Tested on Trac 1.x

Mario

Sorry there seems to be a problem with the http(s) stuff in my link :-)
Please use this download site

comment:13 Changed 12 years ago by Albert

Hi!

I've just tested and now it doesn't break the TracKeywordSuggest, great!

But:

  • it puts the user's mail in the cc field instead of the username
    • or is it a configuration option?
  • it only works for the first user you try to add
    • it seems to me that it is not parsing the cc field (names betweeb ",") and it's using the whole cc field as a single string to match a username, o something similar?

Thanks Mario!

Albert

comment:14 Changed 12 years ago by Mario

Hi Albert,

lol, I forget that it is also possible to add only the user name and trac searches for the mail addresses :-) I will change that asap. Up To now, if you choose a user for CC the mail addresses will get added with ";" as seperator. I'll change also ";" -> ","

Mario

comment:15 Changed 12 years ago by Mario

Hi Albert,

New version is online.

  • Mail-addresses are separated with ",".
  • Multiple mail receiver with auto-completion should work now.
  • Mail selections now uses the user-name.
  • Mail auto-completion items got a custom item layout.

Mario

comment:16 Changed 12 years ago by Albert

Hi Mario!

It seems that we are close!

Everything seems fine but when you add a second user to the cc field, the first one is just removed...

It hapens if you already have any number of users in the cc and you try to add a new one; all existing users are removed.

Thanks!

Albert

comment:17 Changed 12 years ago by anonymous

Hi Albert,

I can add multiple users into the CC Field without problems. Also if I open a ticket with multiple users in the CC. Tested on Firefox and IE. Maybe you might need to clear your browser cache in case of old .js scripts?

Mario

comment:18 in reply to:  17 ; Changed 12 years ago by Albert

Replying to anonymous:

I can add multiple users into the CC Field without problems. Also if I open a ticket with multiple users in the CC. Tested on Firefox and IE. Maybe you might need to clear your browser cache in case of old .js scripts?

That's strange... I re-deploied the trac installation, and tried with chrome and firefox. And the problem persist... Maybe is a problem with other plugins like KeywordsSuggest...?

Albert

comment:19 Changed 12 years ago by Mario

Albert,

Which version of Trac do you use?

comment:20 in reply to:  19 Changed 12 years ago by Albert

Replying to mwehr:

Which version of Trac do you use?

1.0

comment:21 in reply to:  18 Changed 12 years ago by Albert

Replying to agil:

Maybe is a problem with other plugins like KeywordsSuggest...?

I've done a simple test that maybe helps. I note that it works different if you are also using the KeywordSuggestPlugin or not.

If I disable the KeywordSuggestPlugin, then the AutocompleteUsersPlugin seems that it's not working at all: no suggested users appear, the "waiting cursor/icon" doesn't apear...

But if I enable the KeywordSuggestPlugin, then the sugested users appear (also the sugested keywords), but the selected user is always removing the previous users in the cc field.

Does it help?

Thanks!

Albert

comment:22 Changed 12 years ago by Ryan J Ollos

Cc: Jun Omae added

I've started to take a look at the code by mwehr, but I probably won't get anything committed to the repository until at least this weekend. I'm attaching a diff of the changes.

comment:23 Changed 12 years ago by Ryan J Ollos

I've had no luck getting the patch to render properly after upload (known issue on t-h.o), so I've pasted it here: http://pastebin.com/RxweA4Lt.

comment:24 Changed 12 years ago by Ryan J Ollos

There is a lot of nearly identical code in the patch. Minor mutations on this function are common:

$.ajax({
    url: "../subjects",
    type: "GET",
    dataType: "text",
    data: 'q=' + extractLast( request.term ) ,
    success: function( data ) {
        response( $.map( data.split("\n"), formatItem ));
    }
});

Sometimes request.term is wrapped in a call to extractLast, and sometimes not. I haven't looked closely why that is. However, that difference aside, we could make a function with the url as the argument, and eliminate a lot of the code. Thoughts?

comment:25 Changed 11 years ago by Ryan J Ollos

#10417 closed as a duplicate.

comment:26 Changed 8 years ago by anonymous

Is any changes for this ticket?

comment:27 Changed 5 years ago by Ryan J Ollos

Status: newaccepted

comment:28 Changed 5 years ago by Massimo

Cc: Massimo added

comment:29 Changed 5 years ago by Massimo

As discussed in #13591, could you provide a patch for AutocompleteUsersPlugin as well?

comment:30 Changed 4 years ago by mgs1994@…

Has this problem been solved yet? (related #13591)

Please let me know if there is a replacement for the AutocompleteUsers plug-in or any changes related to this ticket.

I use AutocompleteUsers 0.4.7.dev0 and TracTags 0.12.dev0 in Trac 1.4.2.

thanks :)

comment:31 Changed 4 years ago by Jun Omae

Proposed changes in https://github.com/jun66j5/autocompleteusersplugin/compare/trunk...t9599 (diff).

You may use zip archive to try the changes.

$ pip install https://github.com/jun66j5/autocompleteusersplugin/archive/t9599.zip

comment:32 in reply to:  31 ; Changed 4 years ago by mgs1994@…

Replying to Jun Omae:

Proposed changes in https://github.com/jun66j5/autocompleteusersplugin/compare/trunk...t9599 (diff).

You may use zip archive to try the changes.

$ pip install https://github.com/jun66j5/autocompleteusersplugin/archive/t9599.zip

It works well.

I downloaded the file from the link and created the egg file for trac.

Thx! :)

comment:33 Changed 4 years ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

In 18000:

TracAutocompleteUsersPlugin: switch to using jQuery UI bundled in Trac (close #9599)

comment:34 in reply to:  32 Changed 4 years ago by Jun Omae

It works well.

Thanks for the feedback!

I noticed I'm one of maintainers of this plugin. I just pushed the changes with revised tests.

comment:35 Changed 4 years ago by Ryan J Ollos

In 18001:

TracAutocompleteUsersPlugin: Tag release 0.4.7

Refs #9599.

comment:36 Changed 4 years ago by Ryan J Ollos

Thanks, I published the latest pypi:TracAutocompleteUsersPlugin/0.4.7.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.