diff options
author | Maxim Devaev <[email protected]> | 2023-03-20 20:34:54 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-03-20 20:51:02 +0200 |
commit | 2392aa2330cd34d2cb1fb1a40a1da523e2c150ab (patch) | |
tree | fd3197380c83b26abd9bab33e13da0936f1339a7 /web/share/js/tools.js | |
parent | 4f70060d5ed68d114be7c421a9a21e9fbca98601 (diff) |
show all parts in msd menu
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r-- | web/share/js/tools.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js index 07c8da19..13183659 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -66,6 +66,10 @@ export var tools = new function() { return id; }; + self.makeIdByText = function(text) { + return btoa(text).replace("=", "_"); + }; + self.formatSize = function(size) { if (size > 0) { let index = Math.floor( Math.log(size) / Math.log(1024) ); @@ -298,7 +302,7 @@ export var tools = new function() { return { "setValue": function(el, title, percent) { el.setAttribute("data-label", title); - $(`${el.id}-value`).style.width = `${percent}%`; + el.querySelector(".progress-value").style.width = `${percent}%`; }, "setPercentOf": function(el, max, value) { let percent = Math.round(value * 100 / max); |