Jquery-ui and Jquery-3.2.1 references

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

Jquery-ui and Jquery-3.2.1 references

how to add Jquery-ui and Jquery-3.2.1 references globally ? when i add the following 

<@markup id="resources">
<#-- Use this "markup id" to add in a extension's resources -->


<@script type="text/javascript" src="${url.context}/res/js/jquery-3.2.1.js" group="template-common"/>
<@script type="text/javascript" src="${url.context}/res/js/jquery-ui.js" group="template-common"/>
<@script type="text/javascript" src="${url.context}/res/js/tether.js" group="template-common"/>
<@script type="text/javascript" src="${url.context}/res/js/bootstrap.js" group="template-common"/>

<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/tether.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/tether-theme-arrows.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/tether-theme-arrows.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/tether-theme-arrows-dark.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/tether-theme-arrows-dark.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/bootstrap.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/bootstrap-grid.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/bootstrap-reboot.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/jquery-ui.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/jquery-ui.structure.css" group="template-common" />
<@link rel="stylesheet" type="text/css" href="${url.context}/res/css/jquery-ui.theme.css" group="template-common" />

</@>

to the resources.get.html.ftl ,i could see the resources being added. But i get the "multipleDefine" error

How to add these resources globally so it is made available in all pages/dashlet.

6 Replies
Highlighted
Master

Re: Jquery-ui and Jquery-3.2.1 references

Alfresco already includes some jquery version for one dashlet and the calendar view.You'd have to do some template overriding/patching to get in your new version - and then it might break those existing components. A customisation to resources.get.html.ftl web script like you did will only work with non-conflicting files / frameworks.

Generally, it is not recommended to bring in new frameworks or different versions into existing Share components unless Alfresco is not using them anywhere at all... Even within defauit Alfresco there are already conflicts (e.g. between TinyMCE bundled by Share and Aikau)

Highlighted
Active Member II

Re: Jquery-ui and Jquery-3.2.1 references

can you help me out how dojo.js is referred and when it is loaded? 

Highlighted
Master

Re: Jquery-ui and Jquery-3.2.1 references

The Dojo JS file is included by the dojo-bootstrap.get.html.ftl included in the Surf library as part of the base page render. Technically you could configure the file via an override in share-config-custom.xml using the "WebFramework" config section and the dojo-pages > bootstrap-file XML element structure - though I would not recommend it as it could break the Aikau-based functionality.

Highlighted
Active Member II

Re: Jquery-ui and Jquery-3.2.1 references

Am working working with Alfresco Community edition 201707, am unable to locate  dojo-bootstrap.get.html.ftl  as specified by you.

Highlighted
Master

Re: Jquery-ui and Jquery-3.2.1 references

Of course, because it is bundled in the Surf JAR...

Highlighted
Active Member II

Re: Jquery-ui and Jquery-3.2.1 references

Yes. I was able to locate it.