Merge branch 'ent-5225-Bug-visual-en-demo-visual-console-2-meta' into 'develop'

Ent 5225 bug visual en demo visual console 2 meta

See merge request artica/pandorafms!3002
This commit is contained in:
Daniel Rodriguez 2020-01-13 18:22:45 +01:00
commit 9cf16d91f8
1 changed files with 5 additions and 5 deletions

View File

@ -1593,6 +1593,7 @@ function visual_map_print_item(
case CLOCK: case CLOCK:
if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) { if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) {
$image_prefix = (is_metaconsole()) ? '../../' : '';
if ($width == 0) { if ($width == 0) {
if ($layoutData['id_metaconsole'] != 0) { if ($layoutData['id_metaconsole'] != 0) {
if ($layoutData['clock_animation'] == 'analogic_1') { if ($layoutData['clock_animation'] == 'analogic_1') {
@ -1606,17 +1607,16 @@ function visual_map_print_item(
} }
} else { } else {
if ($layoutData['clock_animation'] == 'analogic_1') { if ($layoutData['clock_animation'] == 'analogic_1') {
$img = '<img src="images/console/signes/clock.png" style="width:200px;height:240px;">'; $img = '<img src="'.$image_prefix.'images/console/signes/clock.png" style="width:200px;height:240px;">';
} else { } else {
if ($layoutData['time_format'] == 'time') { if ($layoutData['time_format'] == 'time') {
$img = '<img src="images/console/signes/digital-clock.png" style="width:200px;height:71px">'; $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" style="width:200px;height:71px">';
} else { } else {
$img = '<img src="images/console/signes/digital-clock.png" style="width:200px;height:91px">'; $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" style="width:200px;height:91px">';
} }
} }
} }
} else { } else {
$image_prefix = ($layoutData['id_metaconsole'] != 0) ? '../../' : '';
if ($layoutData['clock_animation'] == 'analogic_1') { if ($layoutData['clock_animation'] == 'analogic_1') {
$img = '<img src="'.$image_prefix.'images/console/signes/clock.png" style="width:'.$width.'px;height:'.($width + 40).'px;">'; $img = '<img src="'.$image_prefix.'images/console/signes/clock.png" style="width:'.$width.'px;height:'.($width + 40).'px;">';
} else { } else {