From b519c33eca9eb60c5d63251ee2baad79f3b4f4be Mon Sep 17 00:00:00 2001 From: sk-ys Date: Wed, 26 Feb 2025 07:38:51 +0900 Subject: [PATCH] Support for Redmine drafts plugin --- .../enhanced_ux/issues/_custom_issue.html.erb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/app/views/enhanced_ux/issues/_custom_issue.html.erb b/app/views/enhanced_ux/issues/_custom_issue.html.erb index fb05267..e6f2334 100644 --- a/app/views/enhanced_ux/issues/_custom_issue.html.erb +++ b/app/views/enhanced_ux/issues/_custom_issue.html.erb @@ -1304,8 +1304,10 @@ $(window).scrollTop() + $(window).height() - 40; if (isOverFlow) { $submitButton.addClass("fixed-position"); + $(".save-draft-button").addClass("fixed-position"); } else { $submitButton.removeClass("fixed-position"); + $(".save-draft-button").removeClass("fixed-position"); } } @@ -1871,7 +1873,7 @@ #wrapper.side-by-side #issue-form - input[type="submit"]:not(.fixed-position) { + :where(input[type="submit"], .save-draft-button):not(.fixed-position) { margin-top: -83px; } } @@ -2223,7 +2225,8 @@ padding-bottom: 120px; } #issue-form { - input[type="submit"] { + input[type="submit"], + .save-draft-button { position: absolute; border-radius: 50%; width: 70px; @@ -2248,6 +2251,13 @@ box-shadow: none; } } + + .save-draft-button ~ input[type="submit"] { + left: 80px; + &.fixed-position { + left: 95px; + } + } } #content #enable_side_by_side_mode { @@ -2276,14 +2286,15 @@ #update form.edit_issue > div.box { padding-bottom: 90px; } - #issue-form input[type="submit"]:not(.fixed-position) { + #issue-form + :where(input[type="submit"], .save-draft-button):not(.fixed-position) { margin-top: -110px; } @media screen and (width > 1280px) { #wrapper.side-by-side #issue-form - input[type="submit"]:not(.fixed-position) { + :where(input[type="submit"], .save-draft-button):not(.fixed-position) { margin-top: -80px; } }