Closed (works as designed)
Project:
IMCE
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2009 at 04:59 UTC
Updated:
13 Mar 2011 at 02:03 UTC
When I upgraded to 1.2 my custom integration script failed. Reverting back to 1.1 fixed the problem.
I've got this script:
drupal_add_js('
function openFileBrowser(field) {
window.open("/imce&app=CMI|name@"+field, "imce", "width=960,height=760,resizable=1");
}
', 'inline');
Being called by this element:
$form['asset']['button'] = array(
'#attributes' => array('onclick' => "openFileBrowser('edit-file'); return false;"),
'#type' => 'button',
'#title' => t('Attach file'),
'#value' => 'Browse',
);
Comments
Comment #1
rimian commentedOh, and this element:
$form['asset']['file'] = array(
'#type' => 'textfield',
'#title' => t('Attach file'),
);
Comment #2
ufku commentedI had made a small change where file url is the key field for triggering automatic filling. It seems i should also add name property for that.
A workaround for you is to add url property to IMCE URL, e.g.
window.open("/imce&app=CMI|url@"+ field +"|name@"+field, "imce", "width=960,height=760,resizable=1");This will insert url first and then name into the field.
You can also set your sendto Funtion by URL
/imce?app=CMI|sendto@mySendTowhere you should haveComment #3
ufku commented