mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #955 from thornbill/fix-schedules-direct
Fix schedules direct buttons being hidden by default
This commit is contained in:
commit
298e36388f
2 changed files with 12 additions and 20 deletions
|
@ -264,17 +264,13 @@ define(["jQuery", "loading", "emby-checkbox", "listViewStyle", "emby-input", "em
|
|||
self.init = function () {
|
||||
options = options || {};
|
||||
|
||||
if (options.showCancelButton) {
|
||||
page.querySelector(".btnCancel").classList.remove("hide");
|
||||
} else {
|
||||
page.querySelector(".btnCancel").classList.add("hide");
|
||||
}
|
||||
// Only hide the buttons if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
var hideCancelButton = options.showCancelButton === false;
|
||||
page.querySelector(".btnCancel").classList.toggle("hide", hideCancelButton);
|
||||
|
||||
if (options.showSubmitButton) {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
} else {
|
||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||
}
|
||||
var hideSubmitButton = options.showSubmitButton === false;
|
||||
page.querySelector(".btnSubmitListings").classList.toggle("hide", hideSubmitButton);
|
||||
|
||||
$(".formLogin", page).on("submit", function () {
|
||||
submitLoginForm();
|
||||
|
|
|
@ -163,17 +163,13 @@ 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 {
|
||||
page.querySelector(".btnCancel").classList.add("hide");
|
||||
}
|
||||
// Only hide the buttons if explicitly set to false; default to showing if undefined or null
|
||||
// FIXME: rename this option to clarify logic
|
||||
var hideCancelButton = options.showCancelButton === false;
|
||||
page.querySelector(".btnCancel").classList.toggle("hide", hideCancelButton);
|
||||
|
||||
if (false !== options.showSubmitButton) {
|
||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
||||
} else {
|
||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
||||
}
|
||||
var hideSubmitButton = options.showSubmitButton === false;
|
||||
page.querySelector(".btnSubmitListings").classList.toggle("hide", hideSubmitButton);
|
||||
|
||||
$("form", page).on("submit", function () {
|
||||
submitListingsForm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue