I 'll try to be as specific as possible:
My target :
display on the dashboard a dashlet with a geo views that I will handle later
the procedure that I followed:
- I create two files to create my dashlet in "Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets": nameOfMyDashlet.get.desc.xml and nameOfMyDashlet.get.html.ftl
file content:
XML:
<webscript>
<shortname>Hello World</shortname>
<description>Displays Hello World text to the user</description>
<family>dashlet</family>
<url>/components/dashlets/hello-world</url>
</webscript>
TEMPLATE:
<@markup id="css" >
<@link rel="stylesheet" href="${url.context}/res/components/dashlets/leaflet/leaflet.css" group="dashlets"/>
<@link rel="stylesheet" href="${url.context}/res/components/dashlets/leaflet/lib/labels/leaflet.label.css" group="dashlets"/>
</@>
<@markup id="js">
<@script type="text/javascript" src="${url.context}/res/components/dashlets/leaflet/leaflet.js" group="dashlets" />
<@script type="text/javascript" src="${url.context}/res/components/dashlets/leaflet/lib/labels/leaflet.label.js" group="dashlets"/>
<@script type="text/javascript" src="${url.context}/res/components/dashlets/carroyage2.js" group="dashlets"/>
<@script type="text/javascript" src="${url.context}/res/components/dashlets/carreau_texte.js" group="dashlets"/>
</@>
<@markup id="widgets">
<@createWidgets group="dashlets"/>
</@>
<style>
#map {
width: 300px;
height: 100px;
margin: auto;
}
.info {
padding: 6px 8px;
font: 14px/16px Arial, Helvetica, sans-serif;
background: white;
background: rgba(255,255,255,0.8);
box-shadow: 0 0 15px rgba(0,0,0,80.2);
border-radius: 5px;
}
.info h4 {
margin: 0 0 5px;
color: #777;
}
.legend {
text-align: left;
line-height: 18px;
color: #555;
}
.legend i {
width: 18px;
height: 18px;
float: left;
margin-right: 8px;
opacity: 0.7;
}
h1{
text-align: center;
}
</style>
<@markup id="html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<div class="dashlet">
<div class="title">Hello World!</div>
<div class="detail-list-item first-item last-item">
<span>Hello</span>
<meta charset="utf-8" />
<h1> Cartographie </h1>
<div id="map"></div>
<div class="info"></div>
<script type="text/javascript">
"My script to initialize my map with options "
</script>
</div>
</div>
</@>
- I I place a library file in the following path: Alfresco\tomcat\webapps\share\components\dashlets\leaflet
- I restart all service of alfresco
- I log on alfresco share dashboard
- I click on customize my dashboard , my dashlet exists but when I add it to the dashboard there is nothing on my dashbord and on the debug tools I have dojo.js error : multipledefine
Sorry, but this time I can not be must specific.
Thank you for your response