diff --git a/resources/report/html/loot-plugin-item.html b/resources/report/html/loot-plugin-item.html index c954a4f0..649c5626 100644 --- a/resources/report/html/loot-plugin-item.html +++ b/resources/report/html/loot-plugin-item.html @@ -77,12 +77,12 @@
-
+
- +
@@ -100,12 +100,13 @@ observe: { 'data.userlist': 'onUserlistChange', 'data.modPriority': 'onPriorityChange', - 'data.isGlobalPriority': 'onPriorityChange' + 'data.isGlobalPriority': 'onPriorityIsGlobalChange' }, dataChanged: function(oldValue, newValue) { this.onUserlistChange(); this.onPriorityChange(); + this.onPriorityIsGlobalChange(); }, onUserlistChange: function(oldValue, newValue) { @@ -119,25 +120,25 @@ }, onPriorityChange: function(oldValue, newValue) { - if (this.data) { - if (this.data.modPriority != 0) { - this.shadowRoot.getElementById('secondary').classList.remove('hidden'); - } else { - this.shadowRoot.getElementById('secondary').classList.add('hidden'); - } - if (this.data.isGlobalPriority) { - this.shadowRoot.getElementById('secondary').firstElementChild.classList.remove('hidden'); - } else { - this.shadowRoot.getElementById('secondary').firstElementChild.classList.add('hidden'); - } + if (this.data && this.data.modPriority) { + this.shadowRoot.getElementById('priority').textContent = this.data.modPriority; + this.shadowRoot.getElementById('secondary').classList.remove('hidden'); } else { + this.shadowRoot.getElementById('priority').textContent = ''; this.shadowRoot.getElementById('secondary').classList.add('hidden'); + } + }, + + onPriorityIsGlobalChange: function(oldValue, newValue) { + if (this.data && this.data.isGlobalPriority) { + this.shadowRoot.getElementById('secondary').firstElementChild.classList.remove('hidden'); + } else { this.shadowRoot.getElementById('secondary').firstElementChild.classList.add('hidden'); } }, getName: function() { - return this.querySelector('.name').textContent.trim(); + return this.textContent.trim(); }, handleDragStart: function(evt) { diff --git a/resources/report/report.html b/resources/report/report.html index 71e21289..60035646 100644 --- a/resources/report/report.html +++ b/resources/report/report.html @@ -54,8 +54,7 @@