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 () {
|
self.init = function () {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
// Show cancel button by default
|
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||||
if (options.showCancelButton !== false) {
|
// FIXME: rename this option to clarify logic
|
||||||
page.querySelector(".btnCancel").classList.remove("hide");
|
if (options.showCancelButton === false) {
|
||||||
} else {
|
|
||||||
page.querySelector(".btnCancel").classList.add("hide");
|
page.querySelector(".btnCancel").classList.add("hide");
|
||||||
|
} else {
|
||||||
|
page.querySelector(".btnCancel").classList.remove("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show submit button by default
|
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||||
if (options.showSubmitButton !== false) {
|
// FIXME: rename this option to clarify logic
|
||||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
if (options.showSubmitButton === false) {
|
||||||
} else {
|
|
||||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||||
|
} else {
|
||||||
|
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".formLogin", page).on("submit", function () {
|
$(".formLogin", page).on("submit", function () {
|
||||||
|
|
|
@ -163,16 +163,20 @@ define(["jQuery", "loading", "emby-checkbox", "emby-input", "listViewStyle", "pa
|
||||||
self.init = function () {
|
self.init = function () {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
if (false !== options.showCancelButton) {
|
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||||
page.querySelector(".btnCancel").classList.remove("hide");
|
// FIXME: rename this option to clarify logic
|
||||||
} else {
|
if (options.showCancelButton === false) {
|
||||||
page.querySelector(".btnCancel").classList.add("hide");
|
page.querySelector(".btnCancel").classList.add("hide");
|
||||||
|
} else {
|
||||||
|
page.querySelector(".btnCancel").classList.remove("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false !== options.showSubmitButton) {
|
// Only hide the button if explicitly set to false; default to showing if undefined or null
|
||||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
// FIXME: rename this option to clarify logic
|
||||||
} else {
|
if (options.showSubmitButton === false) {
|
||||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||||
|
} else {
|
||||||
|
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("form", page).on("submit", function () {
|
$("form", page).on("submit", function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue