Posted by Gurpartap Singh on July 20, 2007 at 2:33pm
| Project: | User titles |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | minor |
| Assigned: | Gurpartap Singh |
| Status: | closed (fixed) |
Issue Summary
drupal_add_js(array('UserTitlesImageURL' => base_path() ."$path/delete.gif"), 'setting');
To make the array keys more unique(per module), it can be good to use:
array('userTitles' => array('imageURL' => base_path() ."$path/delete.gif"))
and access it in JS as: Drupal.settings.userTitles.imageURL
Really minor but couldn't resist. :P
| Attachment | Size |
|---|---|
| user_titles5-task_js_array_structure.patch | 1.87 KB |
Comments
#1
Oops, the above patch included the other patch related to Delete image src path.
#2
Thanks!
#3