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 () {
|
self.init = function () {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
if (options.showCancelButton) {
|
// Only hide the buttons 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 {
|
var hideCancelButton = options.showCancelButton === false;
|
||||||
page.querySelector(".btnCancel").classList.add("hide");
|
page.querySelector(".btnCancel").classList.toggle("hide", hideCancelButton);
|
||||||
}
|
|
||||||
|
|
||||||
if (options.showSubmitButton) {
|
var hideSubmitButton = options.showSubmitButton === false;
|
||||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
page.querySelector(".btnSubmitListings").classList.toggle("hide", hideSubmitButton);
|
||||||
} else {
|
|
||||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".formLogin", page).on("submit", function () {
|
$(".formLogin", page).on("submit", function () {
|
||||||
submitLoginForm();
|
submitLoginForm();
|
||||||
|
|
|
@ -163,17 +163,13 @@ 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 buttons 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 {
|
var hideCancelButton = options.showCancelButton === false;
|
||||||
page.querySelector(".btnCancel").classList.add("hide");
|
page.querySelector(".btnCancel").classList.toggle("hide", hideCancelButton);
|
||||||
}
|
|
||||||
|
|
||||||
if (false !== options.showSubmitButton) {
|
var hideSubmitButton = options.showSubmitButton === false;
|
||||||
page.querySelector(".btnSubmitListings").classList.remove("hide");
|
page.querySelector(".btnSubmitListings").classList.toggle("hide", hideSubmitButton);
|
||||||
} else {
|
|
||||||
page.querySelector(".btnSubmitListings").classList.add("hide");
|
|
||||||
}
|
|
||||||
|
|
||||||
$("form", page).on("submit", function () {
|
$("form", page).on("submit", function () {
|
||||||
submitListingsForm();
|
submitListingsForm();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue