Active
Project:
Ajax Load
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2012 at 11:58 UTC
Updated:
1 Mar 2012 at 14:17 UTC
We are using AJAX load in combination with editablefields module to allow quick editing of fields for our admins.
The AJAX load module adds the JS file (ajax_load.js) to the site regardless of usage. In our scenario AJAX Load is only ever required for logged in admins but anonymous users are also being served the ajax_load.js file which is unnecessary.
To reduce overhead on this site, I've modified the module to include the following check:
if (user_access('administer nodes')) {
drupal_add_js(drupal_get_path('module', 'ajax_load') .'/ajax_load.js');
}
It would be much better if we could either specify paths similar to the lightbox2 module or if AJAX Load had it's own user access permission.
Comments
Comment #1
karljohann commentedBrilliant. I also agree having its own permission is the way to go.