Ci-dessous les fichiers des templates mobile et dashboard mise à jour v4.
Version DASHBOARD:
Fichier plugins/ecowatt/core/template/dashboard/ecowatt_tempo.html
<div class="eqLogic eqLogic-widget allowResize allowReorderCmd #custom_layout# #eqLogic_class# #class#" data-eqType="#eqType#" data-eqLogic_id="#id#" data-eqLogic_uid="#uid#" data-version="#version#" data-translate-category="#translate_category#" data-category="#category#" data-tags="#tags#" style="width: #width#;height: #height#;#style#">
<center class="widget-name">
<span class="warning" title="#alert_name#">
<i class='#alert_icon#'></i>
</span>
<span class="cmd refresh pull-right cursor" data-cmd_id="#refresh_id#">
<i class="fas fa-sync"></i>
</span>
<span class="reportModeVisible">#name_display# <span class="object_name">#object_name#</span></span>
<a href="#eqLink#" class="reportModeHidden">#name_display# <span class="object_name">#object_name#</span></a>
</center>
<div class="#isVerticalAlign#">
<center>
<span style="font-weight: bold; Cursor:default">Aujourd'hui
<i class="fa fa-circle fa-lg today" style="color : #95a5a6; Cursor:default"></i>
</span>
<br/>
<span style="font-weight: bold; Cursor:default">Demain
<i class="fa fa-circle fa-lg tomorrow" style="color : #95a5a6; Cursor:default"></i>
</span>
<br/><br/>
<span style="font-weight: bold;">Jours restants :</span>
<br/>
</center>
<div style="margin-left:45px">
<i class="fa fa-circle fa-lg" style="color : #005BBB; Cursor:default"></i>
<span> : #blue-remainingDays# / #blue-totalDays#</span><br/>
<i class="fa fa-circle fa-lg" style="color : #DFDFDF; Cursor:default"></i>
<span> : #white-remainingDays# / #white-totalDays#</span><br/>
<i class="fa fa-circle fa-lg" style="color : #F34B32; Cursor:default"></i>
<span> : #red-remainingDays# / #red-totalDays#</span>
</div>
</div>
<script>
if("#today#" == "TEMPO_BLEU"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#005BBB');
}else if("#today#" == "TEMPO_BLANC"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#DFDFDF');
}else if("#today#" == "TEMPO_ROUGE"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#F34B32');
}
if("#tomorrow#" == "TEMPO_BLEU"){
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#005BBB');
} else if("#tomorrow#" == "TEMPO_BLANC") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#DFDFDF');
} else if("#tomorrow#" == "TEMPO_ROUGE") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#F34B32');
} else if("#tomorrow#" == "NON_DEFINI") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#FFA02F');
}
if ('#refresh_id#' != '') {
$('.eqLogic[data-eqLogic_uid=#uid#] .refresh').on('click', function () {
jeedom.cmd.execute({id: '#refresh_id#'})
})
} else {
$('.eqLogic[data-eqLogic_uid=#uid#] .refresh').remove()
}
</script>
</div>
Version MOBILE:
Fichier: plugins/ecowatt/core/template/mobile/ecowatt_tempo.html
<div class="eqLogic eqLogic-widget #class#" data-eqLogic_id="#id#" data-eqType="#eqType#" data-version="#version#" data-eqLogic_uid="#uid#" data-translate-category="#translate_category#" data-category="#category#" data-tags="#tags#" style="#style#">
<span class="cmd refresh pull-right cursor" data-cmd_id="#refresh_id#">
<i class="fas fa-sync"></i>
</span>
<center>
<span class="widget-name">
<span class="warning" title="#alert_name#">
<i class='#alert_icon#'></i>
</span>
<span>#name_display# <span class="object_name">#object_name#</span></span><br/>
</span>
</center>
<div style="padding: 5px;">
<center>
<span style="font-weight: bold; Cursor:default">Aujourd'hui
<i class="fa fa-circle fa-lg today" style="color : #95a5a6; Cursor:default"></i>
</span>
<br/>
<span style="font-weight: bold; Cursor:default">Demain
<i class="fa fa-circle fa-lg tomorrow" style="color : #95a5a6; Cursor:default"></i>
</span>
<br/>
</center>
<div style="margin-left:20px;">
<span style="font-weight: bold; Cursor:default">Jours restants:</span>
<div style="margin-left:20px;">
<i class="fa fa-circle fa-lg" style="color : #005BBB; Cursor:default"></i>
<span> : #blue-remainingDays# / #blue-totalDays#</span><br/>
<i class="fa fa-circle fa-lg" style="color : #DFDFDF; Cursor:default"></i>
<span> : #white-remainingDays# / #white-totalDays#</span><br/>
<i class="fa fa-circle fa-lg" style="color : #F34B32; Cursor:default"></i>
<span> : #red-remainingDays# / #red-totalDays#</span>
</div>
</div>
</div>
<script>
if("#today#" == "TEMPO_BLEU"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#005BBB');
}else if("#today#" == "TEMPO_BLANC"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#DFDFDF');
}else if("#today#" == "TEMPO_ROUGE"){
$('.eqLogic[data-eqLogic_id=#id#] .today').css('color','#F34B32');
}
if("#tomorrow#" == "TEMPO_BLEU"){
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#005BBB');
} else if("#tomorrow#" == "TEMPO_BLANC") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#DFDFDF');
} else if("#tomorrow#" == "TEMPO_ROUGE") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#F34B32');
} else if("#tomorrow#" == "NON_DEFINI") {
$('.eqLogic[data-eqLogic_id=#id#] .tomorrow').css('color','#FFA02F');
}
if ('#refresh_id#' != '') {
$('.eqLogic[data-eqLogic_uid=#uid#] .refresh').on('click', function () {
jeedom.cmd.execute({id: '#refresh_id#'})
})
} else {
$('.eqLogic[data-eqLogic_uid=#uid#] .refresh').remove()
}
</script>
</div>