. */ if (!isConnect('admin')) { throw new Exception('401 - {{Accès non autorisé}}'); } $eqLogic = eqLogic::byId(init('eqLogic_id')); if (!is_object($eqLogic)) { throw new Exception('{{Equipement non trouvé}}' . ' : ' . init('eqLogic_id')); } //cmds setters: $cmds = $eqLogic->getCmd(); $allCmds = []; foreach ($cmds as $cmd) { $allCmds[$cmd->getId()] = jeedom::toHumanReadable(utils::o2a($cmd)); $allCmds[$cmd->getId()]['widgetPossibilityDashboard'] = $cmd->widgetPossibility('custom::widget::dashboard'); $allCmds[$cmd->getId()]['widgetPossibilityMobile'] = $cmd->widgetPossibility('custom::widget::mobile'); } //eqLogic setter: sendVarToJS([ 'jeephp2js.md_eqLogicDashEdit_eqInfo' => utils::o2a($eqLogic), 'jeephp2js.md_eqLogicDashEdit_customOptParams' => $eqLogic->widgetPossibility('custom::optionalParameters'), 'jeephp2js.md_eqLogicDashEdit_customLayout' => $eqLogic->widgetPossibility('custom::layout'), 'jeephp2js.md_eqLogicDashEdit_allCmdsInfo' => $allCmds ]); $cmd_widgetDashboard = cmd::availableWidget('dashboard'); $cmd_widgetMobile = cmd::availableWidget('mobile'); ?>
| $value) { $display .= ' | ' . $value['name'] . ' | '; } echo $display; ?>
|---|---|
| '; if (is_array($parameter['name']) && isset($parameter['name'][translate::getLanguage()])) $echo .= $parameter['name'][translate::getLanguage()]; else $echo .= $parameter['name']; $echo .= ' | '; foreach ((jeedom::getConfiguration('eqLogic:displayType')) as $key => $value) { $echo .= ''; if (!isset($parameter['allow_displayType'])) { continue; } if (!isset($parameter['type'])) { continue; } if (is_array($parameter['allow_displayType']) && !in_array($key, $parameter['allow_displayType'])) { continue; } if ($parameter['allow_displayType'] === false) { continue; } $default = ''; $display = ''; if (isset($parameter['default'])) { $display = ' style="display:none;"'; $default = $parameter['default']; $echo .= ' '; } switch ($parameter['type']) { case 'color': if ($parameter['allow_transparent']) { $echo .= ''; $echo .= ''; $echo .= ' '; $echo .= ''; } else { $echo .= ''; } break; case 'input': $display = ($display != '') ? str_replace(';"', ';width:50%;"', $display) : ''; $echo .= ''; break; case 'number': $display = ($display != '') ? str_replace(';"', ';width:50%;"', $display) : ''; $echo .= ''; break; } $echo .= ' | '; } $echo .= '
| {{Nom}} | '; //visible and td widths: $display .= ' | |
| {{Visible}} | '; foreach ((jeedom::getConfiguration('eqLogic:displayType')) as $key => $value) { $display .= '' . $value['name'] . ' | '; } //generic type: $display .= '|
| {{Type générique}} | '; $display .= '||
| {{Widget}} | '; //select dashboard widget $display .= ''; //select mobile widget: $display .= ''; $display .= '||
| {{Afficher le nom}} | '; $display .= ''; $display .= ' | '; $display .= ' |
| {{Afficher le nom ET l'icône}} | "; $display .= ''; $display .= ' | '; $display .= ' |
| {{Afficher les statistiques}} | '; $display .= ''; $display .= ' | '; $display .= ' |
| {{Retour à la ligne avant}} | '; $display .= '||
| {{Retour à la ligne après}} | '; $display .= '||
| {{Paramètres optionnels}} | '; $display .= '{{Ajouter}} | |
| '; $display .= ''; $display .= ' '; $display .= ''; $display .= ' | '; $display .= '||