Skip to content
Merged
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
12 changes: 6 additions & 6 deletions core/js/plugin.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 8 additions & 10 deletions desktop/modal/eqLogic.configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
<div class="tab-content" id="div_displayEqLogicConfigure">
<div role="tabpanel" class="tab-pane active" id="eqLogic_information">
<form class="form-horizontal">

<div class="row">
<div class="col-sm-6">
<legend><i class="fas fa-clipboard-list"></i> {{Général}}</legend>
Expand Down Expand Up @@ -170,9 +169,9 @@
$display .= '<td>';
if ($cmd->getType() == 'info') {
$value = htmlspecialchars($cmd->execCmd());
$title = '{{Date de valeur}} : ' . $cmd->getValueDate() . '<br>{{Date de collecte}} : ' . $cmd->getCollectDate();
$title = '{{Date de valeur}}: ' . $cmd->getValueDate() . '<br>{{Date de collecte}}: ' . $cmd->getCollectDate();
if (strlen($value) > 50) {
$title .= '<br>{{Valeur}} : ' . $value;
$title .= '<br>{{Valeur}}: ' . $value;
$value = trim(substr($value, 0, 50)) . '...';
}
$display .= '<span class="eqLogicConfigure_cmdValue" data-cmd_id="' . $cmd->getid() . '" title=" ' . htmlspecialchars($title) . '">' . $value . ' ' . $cmd->getUnite() . '<span>';
Expand Down Expand Up @@ -612,18 +611,18 @@
//Dynamic values:
document.querySelectorAll('#md_eqLogicConfigure .eqLogicConfigure_cmdValue').forEach(_cmd => {
jeedom.cmd.addUpdateFunction(_cmd.getAttribute('data-cmd_id'), function(_options) {
_options.value = String(_options.value).replace(/<[^>]*>?/gm, '')
let displayValue = String(_options.value).replace(/<[^>]*>?/gm, '')
let cmd = document.querySelector('#md_eqLogicConfigure .eqLogicConfigure_cmdValue[data-cmd_id="' + _options.cmd_id + '"]')
if (cmd === null) {
return
}
let title = '{{Date de valeur}} : ' + _options.valueDate + '<br>{{Date de collecte}} : ' + _options.collectDate
if (_options.value.length > 50) {
title += '<br>{{Valeur}} : ' + _options.value
_options.value = _options.value.trim().substring(0, 50) + '...'
let title = '{{Date de valeur}}: ' + _options.valueDate + '<br>{{Date de collecte}}: ' + _options.collectDate
if (displayValue.length > 50) {
title += '<br>{{Valeur}}: ' + displayValue
displayValue = displayValue.trim().substring(0, 50) + '...'
}
cmd.setAttribute('title', title)
cmd.empty().innerHTML = _options.value + ' ' + _options.unit
cmd.empty().innerHTML = displayValue + ' ' + _options.unit
cmd.style.color = 'var(--logo-primary-color)'
setTimeout(function() {
cmd.style.color = null
Expand Down Expand Up @@ -898,7 +897,6 @@
})
return
}

})

document.getElementById('eqLogic_information')?.addEventListener('dblclick', function(event) {
Expand Down
Loading