From 84fe999eefb10060fade4547eec3b37f692c048d Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Sat, 28 Mar 2026 01:49:45 +0100 Subject: [PATCH 1/6] Update for display_name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complément en lien avec ce commit : https://github.com/jeedom/core/commit/efad4aa50be20a6c2e90fc5248a958b50afd1c64 Permet de prendre le nom à afficher dans le menu de jeedom --- desktop/php/index.php | 2 +- mobile/js/home.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/php/index.php b/desktop/php/index.php index f0eba67380..04d953f19b 100644 --- a/desktop/php/index.php +++ b/desktop/php/index.php @@ -357,7 +357,7 @@ function setTheme() { ' . str_repeat('  ', $object_li->getConfiguration('parentNumber')) . $object_li->getHumanName(true) . ''; + $echo .= '
  • ' . str_repeat('  ', $object_li->getConfiguration('parentNumber')) . $object_li->getConfiguration('display_name', $object_li->getName()) . '
  • '; } echo $echo; ?> diff --git a/mobile/js/home.js b/mobile/js/home.js index 953733e3c5..56ad89b7a0 100644 --- a/mobile/js/home.js +++ b/mobile/js/home.js @@ -58,8 +58,8 @@ function initHome() { if (isset(objects[i].configuration) && isset(objects[i].configuration.parentNumber)) { decay = objects[i].configuration.parentNumber } - li += '' - li += '' + '  '.repeat(decay) + icon + ' ' + objects[i].name + li += '' + li += '' + '  '.repeat(decay) + icon + ' ' + (objects[i].configuration?.display_name || objects[i].name) li += '' summaries.push({object_id : objects[i].id}) } From aa325b1bf5920677963043b425b9371c952e81a6 Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Sat, 28 Mar 2026 02:00:20 +0100 Subject: [PATCH 2/6] Update for display_name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complément en lien avec ce commit : https://github.com/jeedom/core/commit/efad4aa50be20a6c2e90fc5248a958b50afd1c64 Permet de prendre le nom à afficher dans le menu de jeedom --- core/class/eqLogic.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/eqLogic.class.php b/core/class/eqLogic.class.php index 5c677485fb..44526b6b12 100644 --- a/core/class/eqLogic.class.php +++ b/core/class/eqLogic.class.php @@ -775,7 +775,7 @@ public function preToHtml($_version = 'dashboard', $_default = array(), $_noCach '#translate_category#' => $translate_category, '#style#' => '', '#logicalId#' => $this->getLogicalId(), - '#object_name#' => (is_object($this->getObject())) ? $this->getObject()->getName() : __('Aucun', __FILE__), + '#object_name#' => (is_object($this->getObject())) ? $this->getObject()->getConfiguration('display_name', $this->getObject()->getName()) : __('Aucun', __FILE__), '#height#' => $this->getDisplay('height', 'auto'), '#width#' => $this->getDisplay('width', 'auto'), '#uid#' => $uid, From 544ac6799302f509c8dbd37d8aaad87570fccbcb Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Sat, 28 Mar 2026 14:08:33 +0100 Subject: [PATCH 3/6] Update index.php Annulation du changement pour displayname pour modification directement du getHumanName --- desktop/php/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/php/index.php b/desktop/php/index.php index 04d953f19b..f0eba67380 100644 --- a/desktop/php/index.php +++ b/desktop/php/index.php @@ -357,7 +357,7 @@ function setTheme() { ' . str_repeat('  ', $object_li->getConfiguration('parentNumber')) . $object_li->getConfiguration('display_name', $object_li->getName()) . ''; + $echo .= '
  • ' . str_repeat('  ', $object_li->getConfiguration('parentNumber')) . $object_li->getHumanName(true) . '
  • '; } echo $echo; ?> From ccf1360a1ed123e616ee4d80128671f478e6c6f7 Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Sat, 28 Mar 2026 14:14:44 +0100 Subject: [PATCH 4/6] Update getHumanName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout d'une fonction getDisplayName et mise à jour de getHumanName (sauf dernière partie car probablement utilisé pour d'autres fonctionnalités par pas mal d'utilisateurs (ou alors il faut ajouter un troisième paramètre ?) --- core/class/jeeObject.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/class/jeeObject.class.php b/core/class/jeeObject.class.php index 39f6884f0a..d8dfd8ac29 100644 --- a/core/class/jeeObject.class.php +++ b/core/class/jeeObject.class.php @@ -1036,16 +1036,22 @@ public function parentNumber() { return 0; } + public function getDisplayName() { + $display_name = $this->getConfiguration('display_name', ''); + return ($display_name != '') ? $display_name : $this->getName(); + } + public function getHumanName($_tag = false, $_prettify = false) { + $name = $this->getDisplayName(); if ($_tag) { if ($_prettify) { if ($this->getConfiguration('useCustomColor') == 1) { - return '' . $this->getDisplay('icon') . ' ' . $this->getName() . ''; + return '' . $this->getDisplay('icon') . ' ' . $name . ''; } else { - return '' . $this->getDisplay('icon') . ' ' . $this->getName() . ''; + return '' . $this->getDisplay('icon') . ' ' . $name . ''; } } else { - return $this->getDisplay('icon') . ' ' . $this->getName(); + return $this->getDisplay('icon') . ' ' . $name; } } else { return '[' . $this->getName() . ']'; From 8a05ec8f3e3b1ef48434adf5b6363468e15c77ac Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Sat, 28 Mar 2026 14:20:24 +0100 Subject: [PATCH 5/6] Utilisation de getDisplayName --- core/class/eqLogic.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/eqLogic.class.php b/core/class/eqLogic.class.php index 44526b6b12..e98e8fb639 100644 --- a/core/class/eqLogic.class.php +++ b/core/class/eqLogic.class.php @@ -775,7 +775,7 @@ public function preToHtml($_version = 'dashboard', $_default = array(), $_noCach '#translate_category#' => $translate_category, '#style#' => '', '#logicalId#' => $this->getLogicalId(), - '#object_name#' => (is_object($this->getObject())) ? $this->getObject()->getConfiguration('display_name', $this->getObject()->getName()) : __('Aucun', __FILE__), + '#object_name#' => (is_object($this->getObject())) ? $this->getObject()->getDisplayName() : __('Aucun', __FILE__), '#height#' => $this->getDisplay('height', 'auto'), '#width#' => $this->getDisplay('width', 'auto'), '#uid#' => $uid, From b28c8400f9a742b23dd9ee840c7e5b6316bd51c8 Mon Sep 17 00:00:00 2001 From: Caelion <48852394+Caelion@users.noreply.github.com> Date: Wed, 1 Apr 2026 21:16:53 +0200 Subject: [PATCH 6/6] =?UTF-8?q?Homog=C3=A9n=C3=A9isation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/jeeObject.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/class/jeeObject.class.php b/core/class/jeeObject.class.php index d8dfd8ac29..b7d6b23959 100644 --- a/core/class/jeeObject.class.php +++ b/core/class/jeeObject.class.php @@ -1042,16 +1042,15 @@ public function getDisplayName() { } public function getHumanName($_tag = false, $_prettify = false) { - $name = $this->getDisplayName(); if ($_tag) { if ($_prettify) { if ($this->getConfiguration('useCustomColor') == 1) { - return '' . $this->getDisplay('icon') . ' ' . $name . ''; + return '' . $this->getDisplay('icon') . ' ' . $this->getDisplayName() . ''; } else { - return '' . $this->getDisplay('icon') . ' ' . $name . ''; + return '' . $this->getDisplay('icon') . ' ' . $this->getDisplayName() . ''; } } else { - return $this->getDisplay('icon') . ' ' . $name; + return $this->getDisplay('icon') . ' ' . $this->getDisplayName(); } } else { return '[' . $this->getName() . ']';