Handle teaser splitter, separate JS/CSS
smk-ka - April 14, 2008 - 09:35
| Project: | Image Assist |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | sun |
| Status: | closed |
Description
This patch separates the CSS and JavaScript required for the popup and regular pages. The button injection has been moved to JavaScript code, which seems to be the only way to make it work with the new teaser feature in D6.
| Attachment | Size |
|---|---|
| img_assist.patch | 21.8 KB |

#1
Nevermind. I see the original code was the reason for my previous comment.
#2
I applied the patch and did some testing. All basic functionality seems ok, including the split teaser textareas!
I also reviewed the code, and this is my "log":
All in all, everything looks great! The only question is if someone with more JS experience should take a look at img_assist.js before we commit? sun?
@smk-ka: thanks for your efforts with this awesome patch!
#3
The button injection part of this patch is critical IMO (when using IA without Wysiwyg). The textarea splitter feature in D6 requires it. Let's get this in before releasing 2.0.
Note: These patches touch the same files so the patch may need to be re-rolled:
#282184: Views integration
#4
Updated the patch to the current state of 6.x-2.x (hope I didn't miss anything). Let's get this in!
#5
Forget that patch, it's broken...
#6
This time it should work.
#7
I fixed some JavaScript errors, obsolete logic, and re-rolled this patch once again (some of the latest changes were unfortunately removed by this patch) - and committed that thing.
btw: I like that teaser splitter handling and will definitely try to add a similar method to Wysiwyg Editor (doesn't look that hard actually).
#8
Just looking over the code again I saw that you moved the JavaScript include
drupal_add_js($path .'/img_assist.js');back from img_assist_textarea() (where it would be loaded only if required) to img_assist_init() (where it is loaded on every page request). Was there a specific reason to do that?#9
Yes, as already mentioned privately, the launch_popup() function needs to be available on all pages. Since img_assist_popup.js is already taken now and there is not much code left in img_assist.js, I decided to move that function over there.
#10
Automatically closed -- issue fixed for two weeks with no activity.