Closed (won't fix)
Project:
Libraries API
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2011 at 21:51 UTC
Updated:
16 Jul 2011 at 15:02 UTC
The attached patch extends Drupal.settings with the paths of all installed libraries. To get the path of the codemirror library for example, use:
Drupal.settings.libraries['codemirrorPath']
| Comment | File | Size | Author |
|---|---|---|---|
| libraries-js-settings.patch | 540 bytes | davidtrainer |
Comments
Comment #1
tstoecklerThis should be:
foreach ($libraries as $library => $path) {to abide by Drupal coding standards
I don't really like that string concatenation. I would like it better, if you could access the paths as
Drupal.settings.libraries[paths][codemirror]or something like that.Most importantly, though, what is the use-case for this?
In the 7.x-2.x branch we have a lot more information on the libraries than their path, and we definitely don't want store all of that information in JavaScript, so I would really like to know what you are doing with this information.
Comment #2
sunI don't think we want to do this. There's no point to have the path to the PHPMailer library in Drupal.settings.