From e8534e4f70a280ffd1932d56e6b81c1dfa002ecc Mon Sep 17 00:00:00 2001 From: huangjx Date: Thu, 7 Oct 2021 10:40:54 +0800 Subject: [PATCH] added title attribute to action button --- lib/Tools/DBConn.php | 2 +- src/ncTable.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Tools/DBConn.php b/lib/Tools/DBConn.php index 5114703..217dcc5 100644 --- a/lib/Tools/DBConn.php +++ b/lib/Tools/DBConn.php @@ -103,7 +103,7 @@ class DBConn public function updateStatus($gid, $status = 1) { $query = $this->queryBuilder; - $query->update('ncdownloader_info') + $query->update($this->table) ->set("status", $query->createNamedParameter($status)) ->where('gid = :gid') ->setParameter('gid', $gid); diff --git a/src/ncTable.js b/src/ncTable.js index da27773..af465de 100644 --- a/src/ncTable.js +++ b/src/ncTable.js @@ -93,7 +93,7 @@ class ncTable { return; } let data = value.data || ''; - container.appendChild(this.createActionButton(value.name, value.path,data)); + container.appendChild(this.createActionButton(value.name, value.path, data)); }) rowItem.appendChild(container); row.appendChild(rowItem); @@ -132,6 +132,10 @@ class ncTable { button.classList.add("icon-" + name); button.setAttribute("path", path); button.setAttribute("data", data); + if (name == 'refresh') { + name = 'Redownload'; + } + button.setAttribute("title", helper.ucfirst(name)); return button; }