1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

remove button enable util from legacy scripts

This commit is contained in:
dkanada 2019-09-11 22:16:27 -07:00
parent 100ca5ba45
commit d555840384
4 changed files with 7 additions and 26 deletions

View file

@ -156,10 +156,6 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
}
}
function buttonEnabled(btn, enabled) {
btn.disabled = !enabled;
}
function buttonVisible(btn, enabled) {
if (enabled) {
btn.classList.remove("hide");
@ -172,7 +168,8 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
var all = context.querySelectorAll(".btnCommand");
for (var i = 0, length = all.length; i < length; i++) {
buttonEnabled(all[i], -1 != commands.indexOf(all[i].getAttribute("data-command")));
var enableButton = -1 !== commands.indexOf(all[i].getAttribute("data-command"));
all[i].disabled = !enableButton;
}
}