Skip to content

Commit

Permalink
Merge pull request #2487 from jeedom/alpha
Browse files Browse the repository at this point in the history
Merge 4.4.3
  • Loading branch information
zoic21 authored Apr 9, 2024
2 parents 478d06f + 36abdee commit 1830690
Show file tree
Hide file tree
Showing 30 changed files with 106 additions and 86 deletions.
12 changes: 7 additions & 5 deletions core/class/cmd.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,8 @@ public function getWidgetTemplateCode($_version = 'dashboard', $_clean = true, $
if (!isset($test['state_dark'])) {
$test['state_dark'] = '';
}
$test['state_light'] = str_replace('#value#', '"+_options.value+"', str_replace('"', "'", $test['state_light']));
$test['state_dark'] = str_replace('#value#', '"+_options.value+"', str_replace('"', "'", $test['state_dark']));
$test['state_light'] = str_replace(array('#value#', '#state#', '#unite#', '#raw_unite#'), array('"+_options.value+"', '"+_options.display_value+"', '"+_options.unit+"', '"+_options.raw_unit+"'), str_replace('"', "'", $test['state_light']));
$test['state_dark'] = str_replace(array('#value#', '#state#', '#unite#', '#raw_unite#'), array('"+_options.value+"', '"+_options.display_value+"', '"+_options.unit+"', '"+_options.raw_unit+"'), str_replace('"', "'", $test['state_dark']));
$test['operation'] = str_replace('"', "'", str_replace('#value#', '_options.value', $test['operation']));

//ltrim avoid js variable starting with # error
Expand Down Expand Up @@ -1639,6 +1639,7 @@ public function toHtml($_version = 'dashboard', $_options = '') {
'#history#' => '',
'#hide_history#' => 'hidden',
'#unite#' => $this->getUnite(),
'#raw_unite#' => $this->getUnite(),
'#minValue#' => $this->getConfiguration('minValue', 0),
'#maxValue#' => $this->getConfiguration('maxValue', 100),
'#logicalId#' => $this->getLogicalId(),
Expand Down Expand Up @@ -1867,6 +1868,7 @@ public function event($_value, $_datetime = null, $_loop = 1) {
$this->setValueDate(($repeat) ? $this->getValueDate() : $this->getCollectDate());
$eqLogic->setStatus(array('lastCommunication' => $this->getCollectDate(), 'timeout' => 0));
$unit = $this->getUnite();
$raw_unit = $this->getUnite();
$display_value = $value;
if ($this->getSubType() == 'binary' && $this->getDisplay('invertBinary') == 1) {
$display_value = ($display_value == 1) ? 0 : 1;
Expand All @@ -1886,7 +1888,7 @@ public function event($_value, $_datetime = null, $_loop = 1) {
if ($repeat && $this->getConfiguration('repeatEventManagement', 'never') == 'never') {
$this->addHistoryValue($value, $this->getCollectDate());
$eqLogic->emptyCacheWidget();
event::adds('cmd::update', array(array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate())));
event::adds('cmd::update', array(array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'raw_unit' => $raw_unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate())));
return;
}
$_loop++;
Expand All @@ -1903,7 +1905,7 @@ public function event($_value, $_datetime = null, $_loop = 1) {
$this->setCache(array('value' => $value, 'valueDate' => $this->getValueDate()));
scenario::check($this, false, $this->getGeneric_type(), $object, $value);
$level = $this->checkAlertLevel($value);
$events[] = array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate(), 'alertLevel' => $level);
$events[] = array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'raw_unit' => $raw_unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate(), 'alertLevel' => $level);
$foundInfo = false;
$value_cmd = self::byValue($this->getId(), null, true);
if (is_array($value_cmd) && count($value_cmd) > 0) {
Expand All @@ -1923,7 +1925,7 @@ public function event($_value, $_datetime = null, $_loop = 1) {
listener::backgroundCalculDependencyCmd($this->getId());
}
} else {
$events[] = array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate());
$events[] = array('cmd_id' => $this->getId(), 'value' => $value, 'display_value' => $display_value, 'unit' => $unit, 'raw_unit' => $raw_unit, 'valueDate' => $this->getValueDate(), 'collectDate' => $this->getCollectDate());
}
if (count($events) > 0) {
event::adds('cmd::update', $events);
Expand Down
2 changes: 1 addition & 1 deletion core/class/jeeObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public function orderEqLogicByUsage() {
$usage = $eqLogic->getUsage();
$eqLogics[$eqLogic->getId()] = array(
'eqLogic' => $eqLogic,
'usage' => config::byKey('autoreorder::weight_automation_action') * $usage['automation'] + config::byKey('autoreorder::weight_human_actio') * $usage['ui'] + config::byKey('autoreorder::weight_history') * $usage['history'],
'usage' => config::byKey('autoreorder::weight_automation_action') * $usage['automation'] + config::byKey('autoreorder::weight_human_action') * $usage['ui'] + config::byKey('autoreorder::weight_history') * $usage['history'],
);
}
usort($eqLogics, function ($a, $b) {
Expand Down
4 changes: 2 additions & 2 deletions core/config/default.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ theme_color=#94ca02
css::background-opacity = 1
css::border-radius = 0
css::objectBackgroundBlur = 0
widget::step::width = 220
widget::step::height = 150
widget::step::height = 30
widget::step::width = 40
widget::background-opacity = 1.0
widget::margin = 1
interface::toast::position = toast-bottom-right
Expand Down
3 changes: 3 additions & 0 deletions core/js/jeedom.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ jeedom.changes = function() {
continue
}
if (data.result[i].name == 'eqLogic::update') {
if(jeedomUI?.isEditing){
continue
}
eqLogic_update.push(data.result[i].option)
continue
}
Expand Down
4 changes: 2 additions & 2 deletions core/template/dashboard/cmd.action.slider.button.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
let input = document.querySelector('.cmd[data-cmd_uid="#uid#"] .in_value')
let value = parseFloat(input.value.replace("#unite#", "").replace(" ", "")) + step
if (value > parseFloat('#maxValue#')) value = parseFloat('#maxValue#')
input.value = value
input.value = value + ' #unite#'
clearTimeout(window['timerHandle#id#'])
window['timerHandle#id#'] = setTimeout(function() {
jeedom.cmd.execute({ id: '#id#', value: { slider: value } })
Expand All @@ -37,7 +37,7 @@
let input = document.querySelector('.cmd[data-cmd_uid="#uid#"] .in_value')
let value = parseFloat(input.value.replace("#unite#", "").replace(" ", "")) - step
if (value < parseFloat('#minValue#')) value = parseFloat('#minValue#')
input.value = value
input.value = value + ' #unite#'
clearTimeout(window['timerHandle#id#'])
window['timerHandle#id#'] = setTimeout(function() {
jeedom.cmd.execute({ id: '#id#', value: { slider: value } })
Expand Down
7 changes: 7 additions & 0 deletions core/template/dashboard/cmd.action.slider.value.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
jeedom.cmd.execute({ id: '#id#', value: { slider: values[handle] } })
})

document.querySelector('.cmd[data-cmd_uid="#uid#"] #sliderInput#id#').addEventListener("keyup", function(event) {
if (event.which != 13) {
return;
}
jeedom.cmd.execute({ id: '#id#', value: { slider: parseFloat(this.value) } })
})

if (domUtils.issetWidgetOptParam('#color#', 'color')) {
document.querySelector('.cmd[data-cmd_uid="#uid#"] .noUi-handle').style.setProperty('background-color', '#color#', 'important')
document.querySelector('.cmd[data-cmd_uid="#uid#"] .noUi-connect').style.setProperty('background-color', '#color#', 'important')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
})
})

jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#' }])
jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])
</script>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
})
})

jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#' }])
jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])
</script>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
})
})

jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#' }])
jeedom.cmd.refreshValue([{ cmd_id: '#id#', value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])
</script>
</div>
4 changes: 2 additions & 2 deletions core/template/dashboard/scenario.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
scEl.querySelector('.changeScenarioState[data-state=stop]').seen()
scEl.querySelector('.changeScenarioState[data-state=deactivate]').seen()
} else {
scEl.querySelector('.iconCmd').empty().insertAdjacentHTML('beforeend', '<i class="fas fa-check"></i>')
scEl.querySelector('.iconCmd').empty().insertAdjacentHTML('beforeend', '#icon#')
scEl.querySelector('.changeScenarioState[data-state=start]').seen()
scEl.querySelector('.changeScenarioState[data-state=deactivate]').seen()
}
} else {
scEl.querySelector('.iconCmd').empty().insertAdjacentHTML('beforeend', '<i class="fas fa-times"></i>')
scEl.querySelector('.iconCmd').empty().insertAdjacentHTML('beforeend', '#icon#')
scEl.querySelector('.changeScenarioState[data-state=activate]').seen()
scEl.addClass('inactive')
}
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.action.color.picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
jeedom.cmd.execute({id: '#id#', value: {color: $(this).value()}})
});
});
jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.binary.shutter.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])

if ($.issetWidgetOptParam('#color#', 'color')) {
$('.cmd[data-cmd_id=#id#]').find('div.shuttergauge-value').style('background', '#color#', 'important')
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.binary.tmplicon.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
cmd.find('.iconCmd').empty().append("#_icon_off_#")
}
});
jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.binary.tmpliconline.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.binary.tmplimg.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
})
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])

$('body').on('changeThemeEvent', function (event,theme) {
$('.cmd[data-cmd_id=#id#]').trigger('changeThemeEventCmd',theme)
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.numeric.compass.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cmd#id#.find('.winDir').html(windDir#id#)
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])

if ($.issetWidgetOptParam('#needle_color#', 'needle_color')) {
cmd#id#.find('.widget-compass-needle').css('border-top-color','#needle_color#')
Expand Down
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.numeric.light.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.numeric.line.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
4 changes: 2 additions & 2 deletions core/template/mobile/cmd.info.numeric.tmplmultistate.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
})
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])

$('body').on('changeThemeEvent', function (event,theme) {
$('.cmd[data-cmd_id=#id#]').trigger('changeThemeEventCmd', theme)
});
</script>
</div>
</div>
2 changes: 1 addition & 1 deletion core/template/mobile/cmd.info.string.line.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
</script>
</div>
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 @@ -22,7 +22,7 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])

if (!isNaN(parseInt('#maxHeight#'))) {
$('.cmd[data-cmd_id=#id#]').css('max-height', parseInt('#maxHeight#')+'px')
Expand Down
4 changes: 2 additions & 2 deletions core/template/mobile/cmd.info.string.tmplmultistate.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
})
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])

$('body').on('changeThemeEvent', function (event,theme) {
$('.cmd[data-cmd_id=#id#]').trigger('changeThemeEventCmd',theme)
})
</script>
</div>
</div>
4 changes: 2 additions & 2 deletions core/template/mobile/cmd.info.string.tmplmultistateline.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
}
});

jeedom.cmd.refreshValue([{cmd_id :'#id#',display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#'}])
jeedom.cmd.refreshValue([{cmd_id :'#id#',value: '#value#', display_value: '#state#', valueDate: '#valueDate#', collectDate: '#collectDate#', alertLevel: '#alertLevel#', unit: '#unite#', raw_unit: '#raw_unite#'}])

$('body').on('changeThemeEvent', function (event,theme) {
$('.cmd[data-cmd_id=#id#]').trigger('changeThemeEventCmd',theme)
})
</script>
</div>
</div>
6 changes: 3 additions & 3 deletions desktop/common/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var jeedomUtils = {
backgroundIMG: null,
_elBackground: null
}
jeedomUtils.tileWidthStep = (parseInt(jeedom.theme['widget::step::width']) > 80 ? parseInt(jeedom.theme['widget::step::width']) : 80) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileHeightStep = (parseInt(jeedom.theme['widget::step::height']) > 60 ? parseInt(jeedom.theme['widget::step::height']) : 60) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileWidthStep = (parseInt(jeedom.theme['widget::step::width']) > 1 ? parseInt(jeedom.theme['widget::step::width']) : 1) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileHeightStep = (parseInt(jeedom.theme['widget::step::height']) > 1 ? parseInt(jeedom.theme['widget::step::height']) : 1) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileHeightSteps = Array.apply(null, { length: 50 }).map(function(value, index) { return (index + 1) * jeedomUtils.tileHeightStep })


Expand Down Expand Up @@ -515,7 +515,7 @@ jeedomUtils.triggerThemechange = function() {
}

//trigger event for widgets:
if (document.body.hasAttribute('data-page') && ['dashboard', 'view', 'plan', 'widgets'].includes(document.body.getAttribute('data-page'))) {
if (document.body.hasAttribute('data-page') && ['dashboard', 'view', 'plan', 'widgets', 'panel'].includes(document.body.getAttribute('data-page'))) {
if (currentTheme.endsWith('Dark')) {
document.body.triggerEvent('changeThemeEvent', { detail: { theme: 'Dark' } })
} else {
Expand Down
14 changes: 7 additions & 7 deletions desktop/js/plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ if (!jeeFrontEnd.plan) {

if ((event.ctrlKey || event.metaKey) && event.shiftKey && event.which == 69) { //e
event.preventDefault()
jeeFrontEnd.planEditOption.state = !jeeFrontEnd.planEditOption.state
jeeP.pageContainer.dataset.planEditState = jeeFrontEnd.planEditOption.state
jeeP.initEditOption(jeeFrontEnd.planEditOption.state)
//jeeFrontEnd.planEditOption.state = !jeeFrontEnd.planEditOption.state
jeeP.pageContainer.dataset.planEditState = !jeeFrontEnd.planEditOption.state
jeeP.initEditOption(!jeeFrontEnd.planEditOption.state)
}
})
}
Expand Down Expand Up @@ -698,7 +698,7 @@ if (!jeeFrontEnd.plan) {

jeeP.elementContexMenu.enable()
} else { //Leave Edit mode
if(_state != jeeFrontEnd.planEditOption.state){
if(jeeFrontEnd.planEditOption.state === true){
jeeP.savePlan(false, false)
}
if (jeeP.elementContexMenu) {
Expand Down Expand Up @@ -967,9 +967,9 @@ if (jeedomUtils.userDevice.type == 'desktop' && user_isAdmin == 1) {
name: "{{Edition}}",
icon: 'fas fa-pencil-alt',
callback: function(key, opt) {
jeeFrontEnd.planEditOption.state = !jeeFrontEnd.planEditOption.state
this.setAttribute('data-jeeFrontEnd.planEditOption.state', jeeFrontEnd.planEditOption.state)
jeeP.initEditOption(jeeFrontEnd.planEditOption.state)
//jeeFrontEnd.planEditOption.state = !jeeFrontEnd.planEditOption.state
this.setAttribute('data-jeeFrontEnd.planEditOption.state', !jeeFrontEnd.planEditOption.state)
jeeP.initEditOption(!jeeFrontEnd.planEditOption.state)
}
},
fullscreen: {
Expand Down
Loading

0 comments on commit 1830690

Please sign in to comment.