Skip to content

Commit

Permalink
Correction de l'implémentation des commandes
Browse files Browse the repository at this point in the history
  • Loading branch information
dough29 committed Nov 9, 2015
1 parent 2177ff8 commit b8d6803
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions core/class/onkyo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function toHtml($_version = 'dashboard') {
// Boucle de création des variables
$idz =array();
foreach ($this->getCmd('action') as $cmd) {
$id = "id_".strtolower($cmd->getName());
$id = "id_".$cmd->getLogicalId();
$idz[$id] = $cmd->getId();

if ($cmd->getIsVisible()) {
Expand All @@ -133,7 +133,7 @@ public function toHtml($_version = 'dashboard') {
foreach ($commands as $type=>$command) {
foreach ($command as $label=>$code) {
if ($type =="action") {
$id = "id_".strtolower($label);
$id = "id_".ereg_replace("[^a-z]", "", strtolower($label));
$replace['#' . $id . '#'] = '';
}
}
Expand All @@ -153,7 +153,7 @@ public function toHtml($_version = 'dashboard') {
foreach ($commands as $type=>$command) {
foreach ($command as $label=>$code) {
if ($type =="action") {
$id = "id_".strtolower($label);
$id = "id_".ereg_replace("[^a-z]", "", strtolower($label));
$replace['#' . $id . '#'] = $idz[$id];
}
}
Expand Down
8 changes: 4 additions & 4 deletions core/template/dashboard/onkyo.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@
$('.cmd[data-cmd_id=#id_unmute#] .action').on('click', function() {
jeedom.cmd.execute({id: '#id_unmute#'});
});
$('.cmd[data-cmd_id=#id_volup#] .action').on('click', function() {
jeedom.cmd.execute({id: '#id_volup#'});
$('.cmd[data-cmd_id=#id_volumeup#] .action').on('click', function() {
jeedom.cmd.execute({id: '#id_volumeup#'});
});
$('.cmd[data-cmd_id=#id_voldown#] .action').on('click', function() {
jeedom.cmd.execute({id: '#id_voldown#'});
$('.cmd[data-cmd_id=#id_volumedown#] .action').on('click', function() {
jeedom.cmd.execute({id: '#id_volumedown#'});
});
$('.cmd[data-cmd_id=#latenightoff#] .action').on('click', function() {
jeedom.cmd.execute({id: '#latenighthigh#'});
Expand Down

0 comments on commit b8d6803

Please sign in to comment.