How To Override Share Client Side JS in SDK3.0

cancel
Showing results for 
Search instead for 
Did you mean: 
pedwards99
Active Member II

How To Override Share Client Side JS in SDK3.0

Jump to solution

Hi there,

I'm trying to figure out how to override/replace client-side Javascript using SDK 3.

For example on the document-details.ftl page it uses:

<@script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/>

If I wanted to replace doclib-actions.js with my own script, where do I place it in the SDK 3.0 project and what would I replace  

src="${url.context}/res/modules/documentlibrary/doclib-actions.js"

with?

Thanks

Paul

1 Solution

Accepted Solutions
pedwards99
Active Member II

Re: How To Override Share Client Side JS in SDK3.0

Jump to solution

Ok, found the solution...

Place your custom client-side JS in the SDK project in the folder:

META-INF/resources/<your_module_name>/<whatever path you like>

(there is already an example in META-INF/resources/<module_name>/js/tutorials)

Then, in the FTL that you need to include your script the path will be something like:

<@script type="text/javascript" src="${url.context}/res/<your_module_name>/<whatever path you like>/my-doclib-actions.js" group="document-details"/>

View solution in original post

2 Replies
pedwards99
Active Member II

Re: How To Override Share Client Side JS in SDK3.0

Jump to solution

Ok, found the solution...

Place your custom client-side JS in the SDK project in the folder:

META-INF/resources/<your_module_name>/<whatever path you like>

(there is already an example in META-INF/resources/<module_name>/js/tutorials)

Then, in the FTL that you need to include your script the path will be something like:

<@script type="text/javascript" src="${url.context}/res/<your_module_name>/<whatever path you like>/my-doclib-actions.js" group="document-details"/>

View solution in original post

binary_101
Member II

Re: How To Override Share Client Side JS in SDK3.0

Jump to solution

have you found out how to actually override existing JS files? your solution is to make custom files and use them, but how can I override existing alfresco files (e.g. in {share.war}/components/...)?