diff --git a/desktop/js/z2m.js b/desktop/js/z2m.js index ce9aef4..6ad3df8 100644 --- a/desktop/js/z2m.js +++ b/desktop/js/z2m.js @@ -82,20 +82,23 @@ if ($('.eqLogicAttr[data-l1key=id]').value() in devices_attr) { }); $('#bt_z2mNetwork').off('click').on('click', function () { -$('#md_modal').dialog({title: "{{Configuration du réseau}}"}).load('index.php?v=d&plugin=z2m&modal=network').dialog('open'); + $('#md_modal').dialog({title: "{{Configuration du réseau}}"}).load('index.php?v=d&plugin=z2m&modal=network').dialog('open'); }); function printEqLogic(_eqLogic) { -$('#img_device').attr("src", $('.eqLogicDisplayCard.active img').attr('src')); -if ($('.eqLogicAttr[data-l1key=id]').value() in devices_attr){ -console.log(devices_attr[$('.eqLogicAttr[data-l1key=id]').value()]) - if ('multipleEndpoints' in devices_attr[$('.eqLogicAttr[data-l1key=id]').value()] && devices_attr[$('.eqLogicAttr[data-l1key=id]').value()]['multipleEndpoints']==1){ - $('.childCreate').show(); - } else { - $('.childCreate').hide(); + $('#img_device').attr("src", $('.eqLogicDisplayCard.active img').attr('src')); + if ($('.eqLogicAttr[data-l1key=id]').value() in devices_attr){ + if ('multipleEndpoints' in devices_attr[$('.eqLogicAttr[data-l1key=id]').value()] && devices_attr[$('.eqLogicAttr[data-l1key=id]').value()]['multipleEndpoints']==1){ + $('.childCreate').show(); + } else { + $('.childCreate').hide(); + } } -} -return _eqLogic; + $('#span_z2mLinkToDeviceConfig').empty() + if(_eqLogic.configuration.device && _eqLogic.configuration.device != ''){ + $('#span_z2mLinkToDeviceConfig').html('{{Info}}'); + } + return _eqLogic; } $('.changeIncludeStateEnable').off('click').on('click', function () { diff --git a/desktop/php/z2m.php b/desktop/php/z2m.php index c7732b7..24bc946 100644 --- a/desktop/php/z2m.php +++ b/desktop/php/z2m.php @@ -226,8 +226,11 @@