Bonjour à tous
j’ai revus les widgets suite à ma migration V3, V4
J’ai 3 widgets sur le même principe dont celui ci, qui marchent très bien sur le dashboard ou vue mais pas dans le design (les 3)

si vous avez une idée du problème
<div style="min-width:130px;" class="cmd cmd-widget #history#" data-type="info" data-subtype="numeric" data-template="VentHisto" data-cmd_id="#id#" data-cmd_uid="#uid#" data-version="#version#" data-eqLogic_id="#eqLogic_id#">
<div class="title #hide_name#">
<div class="cmdName">#name_display#</div>
</div>
<div style="text-align:center;">
<div id="thermometreDivIMG#id#" class="thermometre_div_img">
<span class="thermometre_img" id="thermometreIMG#id#"></span>
</div>
<div>
<span class="thermometre_state" id="thermometreState#id#"></span>
<span class="thermometre_unite" id="thermometreUnite#id#">#unite#</span><br/>
<!-- A activer si vous voulez avoir les statistiques -->
<div>
<span lass="#hide_history#" style="line-height:10px;font-size: 0.7em;font-weight: bold;display: inline-block;text-align: justify;#displayHistory#">
<span title="Min" class="tooltips left">Min : </span><span style="float:right;">#minHistoryValue# #unite#</span><br/>
<span title="Moyenne" class="tooltips">Moy : </span><span style="float:right;">#averageHistoryValue# #unite#</span><br/>
<span title="Max" class="tooltips">Max : </span><span style="float:right;">#maxHistoryValue# #unite#</span><br/> <i class="#tendance#"></i>
</span>
</div>
</div>
</div>
<script>
jeedom.cmd.update['#id#'] = function(_options){
$('.cmd[data-cmd_id=#id#]').attr('title','Valeur du '+_options.valueDate+', collectée le '+_options.collectDate)
/* Attributs list :
- position : position of the icon you want : left or right, by default : left
- heightImage : height in pixel of image to show default is 90
- widthImage : width in pixel of image to show default is 90
- fontsizeState : state font size in px or em, default : 2em
- fontsizeUnite : unite font size in px or em, default : 1em
- oneLine : display State and Unite on the same line
*/
var imgWidth;
if (!isNaN(parseFloat("#widthImage#"))) {
imgWidth = "#widthImage#";
} else {
imgWidth = "25";
}
var Tvalue = parseFloat(_options.display_value).toFixed(1);
$('.cmd[data-cmd_id=#id#] .thermometre_state').empty().append(Tvalue);
$("#thermometreIMG#id#").empty();
if (Tvalue <= 15) {
$("#thermometreIMG#id#").append("<img style='width:" + imgWidth + "px;' src='data/customTemplates/dashboard/cmd.info.numeric.ThermometreHisto/TempBleu.png' class='thermometre_img' id='thermometre#id#'/>");
}
else if (Tvalue > 15 && Tvalue <= 23) {
$("#thermometreIMG#id#").append("<img style='width:" + imgWidth + "px;' src='data/customTemplates/dashboard/cmd.info.numeric.ThermometreHisto/TempOrange.png' class='thermometre_img' id='thermometre#id#'/>");
}
else {
$("#thermometreIMG#id#").append("<img style='width:" + imgWidth + "px;' src='data/customTemplates/dashboard/cmd.info.numeric.ThermometreHisto/TempRouge.png' class='thermometre_img' id='thermometre#id#'/>");
}
}
jeedom.cmd.update['#id#']({display_value:'#state#',valueDate:'#valueDate#',collectDate:'#collectDate#',alertLevel:'#alertLevel#'});
</script>
</div>
<style>
[data-cmd_id="#id#"] .thermometre_img {
margin-top: -17px;
}
[data-cmd_id="#id#"] .thermometre_div_img {
margin-left: 5px;
margin-top: 5px;
position:relative;
height: 64px;
width: 62px;
float:left;
}
[data-cmd_id="#id#"] .thermometre_state {
font-size: 2em;
font-weight: bold;
margin-top: 15px;
display: block;
}
[data-cmd_id="#id#"] .thermometre_unite {
font-size: 1em;
font-weight: bold;
margin-top: 5px;
display: block;
}
</style>





