10376 Posts in 2191 Topics by 1708 members
| Go to End | ||
| Author | Topic: | 3460 Views |
-
Re: Universal Autocomplete Field

24 April 2010 at 3:59am
I installed this on a site build on SS 2.4.0 rc1, specifically in two instances on an object managed in ModelAdmin. One instance in the dataobject being managed, and one in a has_many relation managed through a DOM popup.
The one in the DOM popup works fine, but the one on the parent dataobject doesn't do a thing. It is the AutocompleteField input, just doesn't do any of the autocomplete javascript.
I added a console.log call to the autocomplete javascript (the one that mobius listed) and this only is called on the popup, not on the parent instance. Anyone have any ideas why this may be?
-
Re: Universal Autocomplete Field

3 June 2010 at 9:27am
Has anyone gotten this to work for SS 2.4
It's not working for me. I will try to debug what is going on.
John -
Re: Universal Autocomplete Field

30 June 2010 at 11:25pm Last edited: 30 June 2010 11:29pm
Hi all - and thanks anonimous user, whoever you are
I've got it working (as a test) in ModelAdmin 2.4. Using the download from the 3rd post in this thread, added Mobius' fix and two of my own:
1. in AutocompleteField, line 221 replace
$response = new HTTPResponse($body);
with:
$response = new SS_HTTPResponse($body);
2. When using the field in ModelAdmin: this works when editiong an existing record, but not when adding a new one. This is because the latter doesn't use EditForm, it uses AddForm. So in AutocompleteField.js, replacing:
AutocompleteField.applyTo('#Form_EditForm input.AutocompleteField');
with
AutocompleteField.applyTo('input.AutocompleteField');
will make that work as well (can't think of any horrible implications just yet).
Cheers, Martine
P.s.: I'm not using the DataObject Manager, so no idea about any problems there...
-
Re: Universal Autocomplete Field

2 July 2010 at 3:25am
Looks like loading the jQuery UI breaks the field. The only core object loading the UI seems to be the FileIframeField, and because that is used by the Image Field, you can't have an ImageField and the AutocompleteField on the same form. Since I can't see the UI being used (?) I just block it from the AutocompleteField::Field() method:
Requirements::block(THIRDPARTY_DIR . '/jquery-ui/jquery-ui-1.8rc3.custom.js');
A bit crude maybe, but eh... Maybe it's the Autocomplete plugin in the UI? Anyway, the only other object I saw using the UI is the DOM. Haven't tested it, since I don't use the DOM so much, but I thought I'd mention.
-
Re: Universal Autocomplete Field

9 November 2011 at 8:39am
In case somebody is still trying to use the AutocompleteField in the ModelAdmin - i got it working and posted my solution here: http://code.google.com/p/ss-module-formfields/issues/detail?id=1
| 3460 Views | ||
| Go to Top |



