summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/repo/issue/view_content/pull.tmpl4
-rw-r--r--web_src/js/index.js5
-rw-r--r--web_src/less/_repository.less4
3 files changed, 10 insertions, 3 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index facb379a18..06b8162fda 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -363,8 +363,8 @@
{{end}}
</div>
</div>
- <div class="dib ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div>
- <div class="instruct" style="display:none">
+ <div class="instruct-toggle ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div>
+ <div class="instruct-content" style="display:none">
<div class="ui divider"></div>
<div><h3 class="di">{{$.i18n.Tr "step1"}} </h3>{{$.i18n.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
<div class="ui secondary segment">
diff --git a/web_src/js/index.js b/web_src/js/index.js
index d4928a01a3..e55e2febe0 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -1120,6 +1120,8 @@ async function initRepository() {
e.preventDefault();
$(`.${$(this).data('do')}-fields`).show();
$(this).parent().hide();
+ $('.instruct-toggle').hide();
+ $('.instruct-content').hide();
});
$('.merge-button > .dropdown').dropdown({
onChange(_text, _value, $choice) {
@@ -1133,6 +1135,7 @@ async function initRepository() {
e.preventDefault();
$(this).closest('.form').hide();
$mergeButton.parent().show();
+ $('.instruct-toggle').show();
});
initReactionSelector();
}
@@ -1199,7 +1202,7 @@ async function initRepository() {
function initPullRequestMergeInstruction() {
$('.show-instruction').on('click', () => {
- $('.instruct').toggle();
+ $('.instruct-content').toggle();
});
}
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index b35718c29d..7cac37207e 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -593,6 +593,10 @@
}
&.view.issue {
+ .instruct-toggle {
+ display: inline-block;
+ }
+
.title {
padding-bottom: 0 !important;