I want to copy a js file in my theme folder instead of hacking the module. This is my code:
/*update js files */
$scripts = drupal_add_js();
unset($scripts['module']['sites/all/modules/imagefield_crop/imagefield_crop.js']);
$scripts['module']['sites/all/themes/zen/zen/js/imagefield_crop.js'] = array('preprocess' => 1, 'cache' => 1);
$vars['scripts'] = drupal_get_js('header', $scripts);
IT works for lightbox2 but it doesn't work for imagefield_crop.js
I've cleaned all Drupal caches and browser cache but my browser continues to load the original js in the module directory.
thanks
Update: This is the array $scripts
['module']
...
[sites/all/modules/imagefield_crop/Jcrop/js/jquery.Jcrop.js] => Array
(
[cache] => 1
[defer] =>
[preprocess] => 1
)