From 2392aa2330cd34d2cb1fb1a40a1da523e2c150ab Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 20 Mar 2023 20:34:54 +0200 Subject: show all parts in msd menu --- web/share/js/tools.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web/share/js/tools.js') 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); -- cgit v1.2.3