09-03-2017 06:21 AM
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.
09-04-2017 05:27 AM
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)
09-05-2017 01:26 AM
can you help me out how dojo.js is referred and when it is loaded?
09-05-2017 04:26 AM
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.
09-05-2017 05:10 AM
Am working working with Alfresco Community edition 201707, am unable to locate dojo-bootstrap.get.html.ftl as specified by you.
09-05-2017 05:16 AM
Of course, because it is bundled in the Surf JAR...
09-05-2017 08:04 AM
Yes. I was able to locate it.
Explore our Alfresco products with the links below. Use labels to filter content by product module.