Sometimes it's convenient to break the callbacks into other include files so as not to muddy the main .module file. hook_menu() encourages this by allowing a 'file' parameter to point at a relative path where the callback is located.

I've made a patch that allows the file parameter to hook_js() exactly like hook_menu() (but no file_path support).

Comments

michielnugter’s picture

I included this patch in the Drupal 7 release of js_callback, I attributed you in the commit.

http://drupal.org/project/js_callback

michielnugter’s picture

Assigned: Unassigned » michielnugter
Status: Needs review » Patch (to be ported)

The 7.x branch contains the fix, it still needs to be included in the 6.x branch. I'll apply the patch here soon.

michielnugter’s picture

Status: Patch (to be ported) » Closed (fixed)
neilnz’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Closed (fixed) » Patch (to be ported)
StatusFileSize
new1.26 KB

Hi,

Looking through git, I can't find that this was ever backported to 6.x-1.x (and it appears the 6.x-2.x branch has been deleted).

I found this in commit b75d6187 for 7.x-1.x but don't think it's backported.

I've attached a rough backport in case you don't have one.

doitDave’s picture

Status: Patch (to be ported) » Needs review

Fixing issue status, should soon be tested and integrated, as there are still some 100 6.x installs. This would require more attention than I can pay at this late hour. Maybe s.o. else is faster. Thanks anyway for your efforts!

michielnugter’s picture

@neilz Sorry it took so long. I commited it to the dev branch of the 6.x version. I'll create a new release soon that includes this fix.

michielnugter’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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