Closed (fixed)
Project:
IMCE
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 May 2011 at 20:21 UTC
Updated:
20 May 2011 at 01:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
ufku commentedWhen the textarea is loaded via AJAX, the required js file "imce/js/imce_set_inline.js" will not be present in the page and you won't be able to see the IMCE link.
A workaround is to include imce_set_inline.js in your theme (in every page or conditionally in views pages.). If you already have a script.js file in your theme, you can add the contents of imce_set_inline.js to it. It will load in every page.
Comment #2
firebus commentedthanks so much for your response!
i copied imce_set_inline.js to my theme directory and added it to scripts[] in my theme.info file
i confirm that imce_set_inline.js is being included in the page, and i've reconfirmed that
- the id of the textarea in question is edit-header
- edit-header is in the list of textarea ids in imce common settings
- imce is working on other pages (edit-body on the node edit form, for example)
but i'm still not seeing an edit link here. am i missing something? (i can work around it if imce won't work with the views edit form, but it would be nice!)
Comment #3
firebus commentedalso confirmed that imce is working with the edit-header textarea if i disable javascript in views_ui.
Comment #4
ufku commentedIn order to process a textarea loaded by ajax, we need to define a Drupal behavior.
Here is a patch that replaces the jquery-initiation-on-load with a Drupal behavior, which will also process textareas loaded by ajax.
Comment #5
firebus commentedwow! thanks for the patch, i will test it against 6.x-2.x-dev and report back
Comment #6
firebus commentedthis patch works as advertised.
first, i added imce_set_inline.js to every page in my theme in
_preprocess_page()
as ufku suggested above, you could add an if statement to only add js to the views edit page or wherever if you wanted ot.
then i applied the patch, and was able to see/use the imce add image link in the edit-header form on the views edit page.
Comment #7
ufku commentedcommitted. thanks