mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add FIXME to revisit show/hide button logic for tv providers
This commit is contained in:
parent
c5cdea622a
commit
69a3c7cd53
2 changed files with 20 additions and 14 deletions
|
@ -264,18 +264,20 @@ define(["jQuery", "loading", "emby-checkbox", "listViewStyle", "emby-input", "em
|
|||
self.init = function () {
|
||||
options = options || {};
|
||||
|
||||
// Show cancel button by default
|
||||
if (options.showCancelButton !== false) {
|
||||
page.querySelector(".btnCancel").classList.remove("hide");
|
||||
} else {
|
||||
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
if (options.showCancelButton === false) {
|
||||
page.querySelector(".btnCancel").classList.add("hide");
|
||||
} else {
|
||||
page.querySelector(".btnCancel").classList.remove("hide");
|
||||
}
|
||||
|
||||
// Show submit button by default
|
||||
if (options.showSubmitButton !== false) {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
} else {
|
||||
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
if (options.showSubmitButton === false) {
|
||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||
} else {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
}
|
||||
|
||||
$(".formLogin", page).on("submit", function () {
|
||||
|
|
|
@ -163,16 +163,20 @@ define(["jQuery", "loading", "emby-checkbox", "emby-input", "listViewStyle", "pa
|
|||
self.init = function () {
|
||||
options = options || {};
|
||||
|
||||
if (false !== options.showCancelButton) {
|
||||
page.querySelector(".btnCancel").classList.remove("hide");
|
||||
} else {
|
||||
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
if (options.showCancelButton === false) {
|
||||
page.querySelector(".btnCancel").classList.add("hide");
|
||||
} else {
|
||||
page.querySelector(".btnCancel").classList.remove("hide");
|
||||
}
|
||||
|
||||
if (false !== options.showSubmitButton) {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
} else {
|
||||
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
if (options.showSubmitButton === false) {
|
||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||
} else {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
}
|
||||
|
||||
$("form", page).on("submit", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue