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

fraogongi fraogongi at gmail.com
Mon Nov 28 10:01:43 UTC 2011


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.

--
View this message in context: http://plone.293351.n2.nabble.com/Plone-3-Overriding-default-javascript-files-tp7038172p7038172.html
Sent from the User Interface & Design mailing list archive at Nabble.com.


More information about the UI mailing list