Comments

barrett’s picture

Status: Active » Needs review

Here's an initial patch based on Coder upgrade guidance. I have verified the forms are working as expected, but don't have a site using USASearch against which I can test that it actually works.

barrett’s picture

And now I'll actually attach the patch file ;)

timwood’s picture

Barrett,
Thanks for the patch and creating an issue for D7 upgrade. I know adam_at_mobomo had some D7 code he was going to commit. Not sure if it's ready or not. If he doesn't respond her in a day or two I'll ping him.

I don't have any D7 sites yet, but when I have some time I'll try and test your patch.

barrett’s picture

I talked the kind folks over at USASearch into letting me hook up my dev site to their service for purposes of getting this tested out. Testing is on-going, but here's a revised patch that makes use of drupal_add_js and ..._css to put the js/css for typeahead into the page, rather than trying to directly write html.

On a side note, is it still necessary to have jquery_update as a dependency or does the new jquery version in D7 handle that without the extra module?

timwood’s picture

Barrett,
Thanks again for your work and contribution to the D7 version! I still haven't had time to test your patch on a D7 site. Thanks for the additional improvements.

As for the jQuery version, I believe the type-ahead feature only requires at least jQuery 1.3.2. It looks like D7 comes with 1.4.4 (http://drupalcode.org/project/drupal.git/blob/4d4080b17681ae674e10c077b7...) so that should be new enough without needing the jQuery Update module. It should be tested though to make sure. We can update the project page later and readme.txt.

timwood’s picture

Assigned: Unassigned » timwood

I've started work on this and hope to have at least a Dev version out this week.

barrett’s picture

Looks like we need a re-roll of the latest patch to incorporate the the new updates in the 6.x trunk. I'm seeing errors about $variables['head'] being undefined on line 102 of usasearch.module when the patch is applied to the latest 6.x dev version.

I'll see if I can get that done this afternoon.

barrett’s picture

Re-roll attached.

Would you be willing to cut a d7 branch so we can work on this independent of modifications to the d6 branch?

rocket777’s picture

Hi
I did not see this patch in time.
So I used the 6x version and created a 7x version for my project's use with just the admin settings page and the form alter to change the action and unset the drupal specific form fields. The code is working fine for now.
It will be good to have a real 7x version with the discovery tag and other features.

timwood’s picture

I've applied Barrett's last patch, manually incorporated my changes from #1578256: Disable type-ahead by default and don't output javascript and created/pushed a 7.x-2.x branch. Once the release system here on D.O. lists this branch as available for release, I'll create a -dev release. Not sure how best to roll a new patch now, or if it's even necessary at this point.

Since I manually added some changes from the 6.x code, please test this thoroughly!

One item which needs attention is whether we need to return the empty array in the hook_update in .install file. Since http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct... says the return value is optional, where in D6 it would throw an error if it was missing.

timwood’s picture

timwood’s picture

Dev/snapshot release is now available for D7.

timwood’s picture

Any chance someone else can review this? I'd like to get out a new released version soon and would like a second opinion/tester.

rocket777 or Barrett?

timwood’s picture

Status: Needs review » Fixed

Creating first D7 release!

Status: Fixed » Closed (fixed)

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

  • Commit 68d150d on 7.x-2.x, 7.x-3.x, 7.x-4.x by timwood:
    Issue #1683862 by timwood: Changed externally referenced JS/CSS and the...