Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/class/eqLogic.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()->getDisplayName() : __('Aucun', __FILE__),
'#height#' => $this->getDisplay('height', 'auto'),
'#width#' => $this->getDisplay('width', 'auto'),
'#uid#' => $uid,
Expand Down
11 changes: 8 additions & 3 deletions core/class/jeeObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1036,16 +1036,21 @@ 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) {
if ($_tag) {
if ($_prettify) {
if ($this->getConfiguration('useCustomColor') == 1) {
return '<span class="label" style="background-color:' . $this->getDisplay('tagColor') . ' ;color:' . $this->getDisplay('tagTextColor', 'white') . '">' . $this->getDisplay('icon') . ' ' . $this->getName() . '</span>';
return '<span class="label" style="background-color:' . $this->getDisplay('tagColor') . ' ;color:' . $this->getDisplay('tagTextColor', 'white') . '">' . $this->getDisplay('icon') . ' ' . $this->getDisplayName() . '</span>';
} else {
return '<span class="label labelObjectHuman">' . $this->getDisplay('icon') . ' ' . $this->getName() . '</span>';
return '<span class="label labelObjectHuman">' . $this->getDisplay('icon') . ' ' . $this->getDisplayName() . '</span>';
}
} else {
return $this->getDisplay('icon') . ' ' . $this->getName();
return $this->getDisplay('icon') . ' ' . $this->getDisplayName();
}
} else {
return '[' . $this->getName() . ']';
Expand Down
4 changes: 2 additions & 2 deletions mobile/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function initHome() {
if (isset(objects[i].configuration) && isset(objects[i].configuration.parentNumber)) {
decay = objects[i].configuration.parentNumber
}
li += '<a href="#" class="link ui-bottom-sheet-link ui-btn ui-btn-inline waves-effect waves-button" data-page="equipment" data-title="' + icon.replace(/\"/g, "\'") + ' ' + objects[i].name.replace(/\"/g, "\'") + '" data-option="' + objects[i].id + '">'
li += '<span>' + '&nbsp;&nbsp;'.repeat(decay) + icon + '</span> ' + objects[i].name
li += '<a href="#" class="link ui-bottom-sheet-link ui-btn ui-btn-inline waves-effect waves-button" data-page="equipment" data-title="' + icon.replace(/\"/g, "\'") + ' ' + (objects[i].configuration?.display_name || objects[i].name).replace(/\"/g, "\'") + '" data-option="' + objects[i].id + '">'
li += '<span>' + '&nbsp;&nbsp;'.repeat(decay) + icon + '</span> ' + (objects[i].configuration?.display_name || objects[i].name)
li += '<span class="summaryMenu"><span class="objectSummary'+objects[i].id+'" data-version="mobile"></span></span></a>'
summaries.push({object_id : objects[i].id})
}
Expand Down