Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions core/js/plugin.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ if (!jeeFrontEnd.pluginTemplate) {
if (isset(data) && isset(data.timeout) && data.timeout == 0) {
data.timeout = ''
}
if(document.getElementById('img_device') != null && document.querySelector('.eqLogicDisplayCard.active img').getAttribute('src') != ''){
document.getElementById('img_device').setAttribute("src",document.querySelector('.eqLogicDisplayCard.active img').getAttribute('src'));
if (document.getElementById('img_device') != null && document.querySelector('.eqLogicDisplayCard.active img').getAttribute('src') != '') {
document.getElementById('img_device').setAttribute("src", document.querySelector('.eqLogicDisplayCard.active img').getAttribute('src'))
}
document.getElementById('div_mainContainer').setJeeValues(data, '.eqLogicAttr')
if (!isset(data.category.opening)) try { document.querySelector('input[data-l2key="opening"]').checked = false } catch (e) { }
Expand All @@ -113,7 +113,7 @@ if (!jeeFrontEnd.pluginTemplate) {
data.cmd[i].state = String(data.cmd[i].state).replace(/<[^>]*>?/gm, '')
data.cmd[i]['htmlstate'] = '<span class="cmdTableState"'
data.cmd[i]['htmlstate'] += 'data-cmd_id="' + data.cmd[i].id + '"'
data.cmd[i]['htmlstate'] += 'title="{{Date de valeur}} : ' + data.cmd[i].valueDate + '<br/>{{Date de collecte}} : ' + data.cmd[i].collectDate
data.cmd[i]['htmlstate'] += 'title="{{Date de valeur}}: ' + data.cmd[i].valueDate + '<br/>{{Date de collecte}}: ' + data.cmd[i].collectDate
if (data.cmd[i].state.length > 50) {
data.cmd[i]['htmlstate'] += '<br/>' + data.cmd[i].state.replaceAll('"', '&quot;')
}
Expand All @@ -132,17 +132,17 @@ if (!jeeFrontEnd.pluginTemplate) {
}
document.querySelectorAll('.cmdTableState').forEach(_cmdState => {
jeedom.cmd.addUpdateFunction(_cmdState.getAttribute('data-cmd_id'), function(_options) {
_options.value = String(_options.value).replace(/<[^>]*>?/gm, '')
let displayValue = String(_options.value).replace(/<[^>]*>?/gm, '')
const cmd = document.querySelector('.cmdTableState[data-cmd_id="' + _options.cmd_id + '"]')
if (cmd === null) {
return
}
let title = '{{Date de collecte}} : ' + _options.collectDate + '<br/>{{Date de valeur}} ' + _options.valueDate
if (_options.value.length > 50) {
title += ' - ' + _options.value
let title = '{{Date de valeur}}: ' + _options.valueDate + '<br>{{Date de collecte}}: ' + _options.collectDate
if (displayValue.length > 50) {
title += ' - ' + displayValue
}
cmd.setAttribute('title', title)
cmd.empty().innerHTML = _options.value.substring(0, 50) + ' ' + _options.raw_unit
cmd.empty().innerHTML = displayValue.substring(0, 50) + ' ' + _options.raw_unit
cmd.style.color = 'var(--logo-primary-color)'
setTimeout(function() {
cmd.style.color = null
Expand Down
2 changes: 1 addition & 1 deletion core/template/dashboard/cmd.action.slider.shutter.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

jeedom.cmd.addUpdateFunction('#id#', function(_options) {
if (is_object(cmd = document.querySelector('.cmd[data-cmd_uid="#uid#"]'))) {
cmd.setAttribute('title', '{{Date de valeur}} : ' + _options.valueDate + '<br>{{Date de collecte}} : ' + _options.collectDate)
cmd.setAttribute('title', '{{Date de valeur}}: ' + _options.valueDate + '<br>{{Date de collecte}}: ' + _options.collectDate)
if ('#time#' == 'duration' || '#time#' == 'date') {
jeedom.cmd.displayDuration(_options.valueDate, cmd.querySelector('.timeCmd'), '#time#')
}
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.numeric.rain.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
cmd#id#.find('.widget-rain-water').css('background', "url('data:image/svg+xml;base64," + waterSvg64#id# + "')")

jeedom.cmd.addUpdateFunction('#id#',function(_options) {
cmd#id#.attr('title','{{Date de valeur}} : '+_options.valueDate+'<br/>{{Date de collecte}} : '+_options.collectDate+'<br/>{{Valeur}} : '+_options.display_value+_options.unit)
cmd#id#.attr('title','{{Date de valeur}}: '+_options.valueDate+'<br/>{{Date de collecte}}: '+_options.collectDate+'<br/>{{Valeur}}: '+_options.display_value+_options.unit)
cmd#id#.find('.unit').empty().append(_options.unit);

var value_#id# = parseFloat(_options.value)
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.string.multiline.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script>
jeedom.cmd.addUpdateFunction('#id#',function(_options) {
cmd = $('.cmd[data-cmd_id=#id#]')
cmd.attr('title','Date de valeur : '+_options.valueDate+'<br/>Date de collecte : '+_options.collectDate)
cmd.attr('title','{{Date de valeur}}: '+_options.valueDate+'<br/>{{Date de collecte}}: '+_options.collectDate)
cmd.find('.state').empty().append(_options.display_value+' #unite#')

if (_options.alertLevel) {
Expand Down
Loading