mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
WebUI: Access element attribute/property natively in log tables
#21007 changed pretty much everything already but I spotted some leftovers and replaced them too. PR #22294.
This commit is contained in:
@@ -3262,7 +3262,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
initColumnsFunctions: function() {
|
initColumnsFunctions: function() {
|
||||||
this.columns["timestamp"].updateTd = function(td, row) {
|
this.columns["timestamp"].updateTd = function(td, row) {
|
||||||
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
||||||
td.set({ text: date, title: date });
|
td.textContent = date;
|
||||||
|
td.title = date;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.columns["type"].updateTd = function(td, row) {
|
this.columns["type"].updateTd = function(td, row) {
|
||||||
@@ -3290,7 +3291,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
addClass = "logUnknown";
|
addClass = "logUnknown";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
td.set({ text: logLevel, title: logLevel });
|
td.textContent = logLevel;
|
||||||
|
td.title = logLevel;
|
||||||
td.closest("tr").className = `logTableRow${addClass}`;
|
td.closest("tr").className = `logTableRow${addClass}`;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -3337,7 +3339,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
|
|
||||||
this.columns["timestamp"].updateTd = function(td, row) {
|
this.columns["timestamp"].updateTd = function(td, row) {
|
||||||
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
||||||
td.set({ text: date, title: date });
|
td.textContent = date;
|
||||||
|
td.title = date;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.columns["blocked"].updateTd = function(td, row) {
|
this.columns["blocked"].updateTd = function(td, row) {
|
||||||
@@ -3350,7 +3353,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
status = "QBT_TR(Banned)QBT_TR[CONTEXT=ExecutionLogWidget]";
|
status = "QBT_TR(Banned)QBT_TR[CONTEXT=ExecutionLogWidget]";
|
||||||
addClass = "peerBanned";
|
addClass = "peerBanned";
|
||||||
}
|
}
|
||||||
td.set({ text: status, title: status });
|
td.textContent = status;
|
||||||
|
td.title = status;
|
||||||
td.closest("tr").className = `logTableRow${addClass}`;
|
td.closest("tr").className = `logTableRow${addClass}`;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user