mirror of https://github.com/go-gitea/gitea.git
Compare commits
3 Commits
f8a40dafb9
...
ef8209a953
Author | SHA1 | Date |
---|---|---|
Giteabot | ef8209a953 | |
Giteabot | 9309098eab | |
Giteabot | 790a79b04c |
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}">
|
||||
<label for="login_name">{{.locale.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||
</div>
|
||||
|
@ -62,12 +62,12 @@
|
|||
<label for="email">{{.locale.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}">
|
||||
<label for="password">{{.locale.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||
</div>
|
||||
|
||||
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
|
||||
<div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label>
|
||||
<input name="must_change_password" type="checkbox" checked>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}hide{{end}}">
|
||||
<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}gt-hidden{{end}}">
|
||||
<div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
|
||||
{{svg "octicon-git-branch"}}
|
||||
<input type="text" name="new_branch_name" value="{{.new_branch_name}}" class="input-contrast gt-mr-2 js-quick-pull-new-branch-name" placeholder="{{.locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}} title="{{.locale.Tr "repo.editor.new_branch_name"}}">
|
||||
|
|
|
@ -2,7 +2,7 @@ import $ from 'jquery';
|
|||
|
||||
const {pageData} = window.config;
|
||||
|
||||
const initInputCitationValue = async ($citationCopyBibtex, $citationCopyApa) => {
|
||||
const initInputCitationValue = async ($citationCopyApa, $citationCopyBibtex) => {
|
||||
const [{Cite, plugins}] = await Promise.all([
|
||||
import(/* webpackChunkName: "citation-js-core" */'@citation-js/core'),
|
||||
import(/* webpackChunkName: "citation-js-formats" */'@citation-js/plugin-software-formats'),
|
||||
|
|
|
@ -418,6 +418,22 @@ function assignMenuAttributes(menu) {
|
|||
return id;
|
||||
}
|
||||
|
||||
export async function handleReply($el) {
|
||||
hideElem($el);
|
||||
const form = $el.closest('.comment-code-cloud').find('.comment-form');
|
||||
form.removeClass('gt-hidden');
|
||||
const $textarea = form.find('textarea');
|
||||
let easyMDE = getAttachedEasyMDE($textarea);
|
||||
if (!easyMDE) {
|
||||
await attachTribute($textarea.get(), {mentions: true, emoji: true});
|
||||
easyMDE = await createCommentEasyMDE($textarea);
|
||||
}
|
||||
$textarea.focus();
|
||||
easyMDE.codemirror.focus();
|
||||
assignMenuAttributes(form.find('.menu'));
|
||||
return easyMDE;
|
||||
}
|
||||
|
||||
export function initRepoPullRequestReview() {
|
||||
if (window.location.hash && window.location.hash.startsWith('#issuecomment-')) {
|
||||
const commentDiv = $(window.location.hash);
|
||||
|
@ -455,19 +471,7 @@ export function initRepoPullRequestReview() {
|
|||
|
||||
$(document).on('click', 'button.comment-form-reply', async function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
hideElem($(this));
|
||||
const form = $(this).closest('.comment-code-cloud').find('.comment-form');
|
||||
form.removeClass('gt-hidden');
|
||||
const $textarea = form.find('textarea');
|
||||
let easyMDE = getAttachedEasyMDE($textarea);
|
||||
if (!easyMDE) {
|
||||
await attachTribute($textarea.get(), {mentions: true, emoji: true});
|
||||
easyMDE = await createCommentEasyMDE($textarea);
|
||||
}
|
||||
$textarea.focus();
|
||||
easyMDE.codemirror.focus();
|
||||
assignMenuAttributes(form.find('.menu'));
|
||||
await handleReply($(this));
|
||||
});
|
||||
|
||||
const $reviewBox = $('.review-box-panel');
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
initRepoIssueBranchSelect, initRepoIssueCodeCommentCancel, initRepoIssueCommentDelete,
|
||||
initRepoIssueComments, initRepoIssueDependencyDelete, initRepoIssueReferenceIssue,
|
||||
initRepoIssueStatusButton, initRepoIssueTitleEdit, initRepoIssueWipToggle,
|
||||
initRepoPullRequestUpdate, updateIssuesMeta,
|
||||
initRepoPullRequestUpdate, updateIssuesMeta, handleReply
|
||||
} from './repo-issue.js';
|
||||
import {initUnicodeEscapeButton} from './repo-unicode-escape.js';
|
||||
import {svg} from '../svg.js';
|
||||
|
@ -613,15 +613,15 @@ function initRepoIssueCommentEdit() {
|
|||
$(document).on('click', '.edit-content', onEditContent);
|
||||
|
||||
// Quote reply
|
||||
$(document).on('click', '.quote-reply', function (event) {
|
||||
$(document).on('click', '.quote-reply', async function (event) {
|
||||
event.preventDefault();
|
||||
const target = $(this).data('target');
|
||||
const quote = $(`#${target}`).text().replace(/\n/g, '\n> ');
|
||||
const content = `> ${quote}\n\n`;
|
||||
let easyMDE;
|
||||
if ($(this).hasClass('quote-reply-diff')) {
|
||||
const $parent = $(this).closest('.comment-code-cloud');
|
||||
$parent.find('button.comment-form-reply').trigger('click');
|
||||
easyMDE = getAttachedEasyMDE($parent.find('[name="content"]'));
|
||||
const $replyBtn = $(this).closest('.comment-code-cloud').find('button.comment-form-reply');
|
||||
easyMDE = await handleReply($replyBtn);
|
||||
} else {
|
||||
// for normal issue/comment page
|
||||
easyMDE = getAttachedEasyMDE($('#comment-form .edit_area'));
|
||||
|
@ -637,6 +637,5 @@ function initRepoIssueCommentEdit() {
|
|||
easyMDE.codemirror.setCursor(easyMDE.codemirror.lineCount(), 0);
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue