Block Display + JS + Paste From Scrapbook
PermalinkA block requires some JS to be loaded in the document head in order to render properly. No problem, just use...
$this->addHeaderItem()
...from the on_page_view() method in the block's controller. Everything's peachy. The block displays as it should on any page- even the dashboard's global scrapbook page.
However, it DOES NOT display properly in the "Paste From Scrapbook" dialog. Why? Because the on_page_view() method is not invoked in that context, so the JS file never gets loaded into the document head.
So my question is, what's the proper way to get a block to render within the "Paste From Scrapbook" dialog if it relies on an external JS file???
Since that dialog's contents are retrieved via AJAX, it seems to me that perhaps ccm_addHeaderItem() should be invoked somewhere in the process. Is this a bug, or am I just overlooking something?
Thanks for the help!
-Steve

I've distilled my issue down to the following...
JS added via addHeaderItem() from a block's controller is not output when the block is displayed in the "Paste From Scrapbook" dialog.
-Steve