[Plone-UI] Plone 3: Overriding default javascript files

David Glick dglick at gmail.com
Mon Nov 28 13:20:56 UTC 2011

This list is for discussion to create the future of Plone UI. You want 
the plone-users list or Stack Overflow instead.

On 11/28/11 5:01 AM, fraogongi wrote:
> I am using Plone 3 and currently trying to override one of the default
> javascript files i.e. table_sorter.js.
> Under the browser directory of my product, I created a directory
> "javascripts" (just to keep things organized), then registered the directory
> as a ressource, in configure.zcml:
> <browser:resourceDirectory
>      name="myproduct.javascripts"
>      directory="javascripts"
>      layer=".interfaces.IThemeSpecific" />
> Where "myproduct" is self explanatory. Then in jssregistry.xml, I registered
> and ordered the javascript files:
> <javascript id="++resource++myproduct.javascripts/table_sorter.js"
>      enabled="True"
>      cookable="False"
>      inline="False"
>      insert-after="jquery.js" />
> Where table_sorter.js is the name of the javascript file that I need to
> override.
> The reason I need to override the file is because the default has no way of
> telling the user whether a table is sortable or not until it is clicked on.
> I need to include icons on the table header by default.
> I have followed the above steps but it does not seem to work. I have no idea
> where I'm going wrong. Any help will be highly appreciated.
> P.S. I've also heard that I may need to override the file in the skins
> folder, I have no idea on how to accomplish this.

More information about the UI mailing list