diff options
author | Andrejs Griščenko <andrejs.griscenko@zabbix.com> | 2021-12-08 15:16:20 +0300 |
---|---|---|
committer | Andrejs Griščenko <andrejs.griscenko@zabbix.com> | 2021-12-08 15:16:20 +0300 |
commit | 5ea9a861940fcdc8b567be9c169bfe3739c60722 (patch) | |
tree | a90c03a321d1cb0d86e0aaeee93642995dd7036f | |
parent | 83e05df14ac1a1663863438df83d155617c496e5 (diff) |
..F....... [ZBX-20278] fixed code style
4 files changed, 12 insertions, 12 deletions
diff --git a/ui/app/partials/js/configuration.valuemap.js.php b/ui/app/partials/js/configuration.valuemap.js.php index 3f243c653f3..1e586e849d6 100644 --- a/ui/app/partials/js/configuration.valuemap.js.php +++ b/ui/app/partials/js/configuration.valuemap.js.php @@ -77,7 +77,7 @@ var AddValueMap = class { createNameCell() { const cell = document.createElement('td'); const link = document.createElement('a'); - link.innerText = this.data.name; + link.textContent = this.data.name; link.classList.add('wordwrap'); link.href = 'javascript:void(0);'; link.addEventListener('click', (e) => { @@ -103,7 +103,7 @@ var AddValueMap = class { const btn = document.createElement('button'); btn.type = 'button'; btn.classList.add('btn-link', 'element-table-remove'); - btn.innerText = <?= json_encode(_('Remove')) ?>; + btn.textContent = <?= json_encode(_('Remove')) ?>; btn.addEventListener('click', () => this.row.remove()); cell.appendChild(btn); diff --git a/ui/app/partials/js/scheduledreport.subscription.js.php b/ui/app/partials/js/scheduledreport.subscription.js.php index dd81e46d414..ac9bb49dc5f 100644 --- a/ui/app/partials/js/scheduledreport.subscription.js.php +++ b/ui/app/partials/js/scheduledreport.subscription.js.php @@ -112,7 +112,7 @@ } } - recipient.innerText = this.data.recipient_name; + recipient.textContent = this.data.recipient_name; recipient.setAttribute('title', this.data.recipient_name); cell.appendChild(icon); @@ -129,7 +129,7 @@ const cell = document.createElement('td'); const span = document.createElement('span'); - span.innerText = this.data.creator_name; + span.textContent = this.data.creator_name; span.setAttribute('title', this.data.creator_name); if (this.data.creator_type == <?= ZBX_REPORT_CREATOR_TYPE_RECIPIENT ?> || this.data.creator_inaccessible) { @@ -162,12 +162,12 @@ const input = status.parentNode.querySelector('[name*=exclude]'); if (input.value == <?= ZBX_REPORT_EXCLUDE_USER_TRUE ?>) { - status.innerText = <?= json_encode(_('Include')) ?>; + status.textContent = <?= json_encode(_('Include')) ?>; status.classList.replace('<?= ZBX_STYLE_RED ?>', '<?= ZBX_STYLE_GREEN ?>'); input.value = <?= ZBX_REPORT_EXCLUDE_USER_FALSE ?> } else { - status.innerText = <?= json_encode(_('Exclude')) ?>; + status.textContent = <?= json_encode(_('Exclude')) ?>; status.classList.replace('<?= ZBX_STYLE_GREEN ?>', '<?= ZBX_STYLE_RED ?>'); input.value = <?= ZBX_REPORT_EXCLUDE_USER_TRUE ?> } @@ -178,11 +178,11 @@ } if (this.data.exclude == <?= ZBX_REPORT_EXCLUDE_USER_FALSE ?>) { - status.innerText = <?= json_encode(_('Include')) ?>; + status.textContent = <?= json_encode(_('Include')) ?>; status.classList.add('<?= ZBX_STYLE_GREEN ?>'); } else { - status.innerText = <?= json_encode(_('Exclude')) ?>; + status.textContent = <?= json_encode(_('Exclude')) ?>; status.classList.add('<?= ZBX_STYLE_RED ?>'); } @@ -198,7 +198,7 @@ btn.type = 'button'; btn.classList.add('<?= ZBX_STYLE_BTN_LINK ?>'); - btn.innerText = <?= json_encode(_('Remove')) ?>; + btn.textContent = <?= json_encode(_('Remove')) ?>; if (allowed_edit) { btn.addEventListener('click', () => { diff --git a/ui/app/views/js/administration.userrole.edit.js.php b/ui/app/views/js/administration.userrole.edit.js.php index 1c105e170d6..a95390929ad 100644 --- a/ui/app/views/js/administration.userrole.edit.js.php +++ b/ui/app/views/js/administration.userrole.edit.js.php @@ -137,7 +137,7 @@ .forEach((element) => { element.remove(); }); const update_btn = document.querySelector('#update'); - update_btn.innerText = <?= json_encode(_('Add')) ?>; + update_btn.textContent = <?= json_encode(_('Add')) ?>; update_btn.setAttribute('value', 'userrole.create'); update_btn.setAttribute('id', 'add'); diff --git a/ui/app/views/js/reports.scheduledreport.edit.js.php b/ui/app/views/js/reports.scheduledreport.edit.js.php index c26d7e37907..0d4e4cfbbff 100644 --- a/ui/app/views/js/reports.scheduledreport.edit.js.php +++ b/ui/app/views/js/reports.scheduledreport.edit.js.php @@ -47,7 +47,7 @@ } else if (row.querySelector('[name*=creator_type]').value == <?= ZBX_REPORT_RECIPIENT_TYPE_USER ?>) { const creator = row.querySelector('[name*=creatorid]').parentNode.querySelector('span'); - creator.innerText = current_user_name; + creator.textContent = current_user_name; creator.setAttribute('title', current_user_name); creator.classList.remove('<?= ZBX_STYLE_GREY ?>'); @@ -130,7 +130,7 @@ const update_btn = document.querySelector('#update'); update_btn.setAttribute('id', 'add'); update_btn.setAttribute('value', 'scheduledreport.create'); - update_btn.innerText = <?= json_encode(_('Add')) ?>; + update_btn.textContent = <?= json_encode(_('Add')) ?>; document.querySelectorAll('#reportid, #clone, #delete').forEach((elem) => { elem.remove(); }); }); |