[Grok-dev] megrok.yui released

Michael Haubenwallner michael at d2m.at
Tue Aug 12 13:17:13 EDT 2008


Jasper Spaans wrote:
> Hoi Martijn & list,
> 
> Op 7 aug 2008, om 19:08 heeft Martijn Faassen het volgende geschreven:
> 
>> Today I've wrapped up and released megrok.yui. This is a packaging  
>> of the YUI javascript and CSS library for easy installation into a  
>> Grok application. It uses megrok.resourcelibrary. To install  
>> megrok.yui, simply add this in the dependencies to your setup.py and  
>> rerun buildout.
> 
> I'm trying to use megrok.yui, but can't get it to work in my grok-0.13  
> application: I added megrok.yui as a dependency, ran buildout and then  
> modified the page templates like this:
> 
> -    <script type="text/javascript" tal:attributes="src static/yui/ 
> build/yahoo/yahoo.js"></script>
> +    <script type="text/javascript" tal:attributes="src context/@@/YUI/ 
> yahoo/yahoo.js"></script>
> 
> This somehow makes my pages disappear; is something wrong with that  
> path or should I do something else to make this work?
> 

I had a similar problem with megrok.tinymce.
I'm now using
	<script type="text/javascript" tal:attributes="src
		string:${view/application_url}/@@/TinyMCE/tiny_mce.js">
as a workaround to get the the js loaded.

I am still not sure why
	TinyMCE.need()
does not work as expected or why
	<tal:block replace="resource_library:TinyMCE"/>
throws an error
  	<class 'zope.tal.taldefs.TALError'>: Unrecognized expression type 
"resource_library". in expression u'resource_library:TinyMCE', at line ...

Regards,
Michael

--
http://blog.d2m.at
http://planetzope.org





More information about the Grok-dev mailing list