1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Merge pull request #1426 from manfer/issues-new-edit-forms-autofocus

autofocus for new and edit issue forms
This commit is contained in:
无闻 2015-08-01 10:05:11 +08:00
commit 7241598c19
2 changed files with 2 additions and 1 deletions

View File

@ -770,6 +770,7 @@ function initIssue() {
$("#issue-edit-btn").on("click", function () {
$('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleHide();
$('#issue-edit-title,.issue-edit-content,.issue-edit-cancel,.issue-edit-save').toggleShow();
$('#issue-edit-content').focus();
});
$('.issue-edit-cancel').on("click", function () {
$('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleShow();

View File

@ -12,7 +12,7 @@
</div>
<div class="col-md-8 panel panel-default">
<div class="form-group panel-body">
<input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
<input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" autofocus />
</div>
<div class="form-group panel-body">
{{if .IsRepositoryOwner}}