File tree Expand file tree Collapse file tree 4 files changed +20
-8
lines changed Expand file tree Collapse file tree 4 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 22	<div class="issue-title" id="issue-title-wrapper">
33		{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
44			<div class="edit-button">
5- 				<div  id="edit-title" class="ui basic secondary not-in-edit button ">{{.locale.Tr "repo.issues.edit"}}</div >
5+ 				<button  id="edit-title" class="ui basic button  secondary not-in-edit">{{.locale.Tr "repo.issues.edit"}}</button >
66			</div>
77		{{end}}
88		<h1>
99			<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}}</span>
1010			<span class="index">#{{.Issue.Index}}</span>
11- 			<div id="edit-title-input" class="ui input" style="display: none">
11+ 			<div id="edit-title-input" class="ui input ml-4 " style="display: none">
1212				<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
1313			</div>
1414		</h1>
1515		{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
1616			<div class="edit-buttons">
17- 				<div  id="cancel-edit-title" class="ui basic secondary in-edit button " style="display: none">{{.locale.Tr "repo.issues.cancel"}}</div >
18- 				<div  id="save-edit-title" class="ui primary in-edit button " style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</div >
17+ 				<button  id="cancel-edit-title" class="ui basic button  secondary in-edit" style="display: none">{{.locale.Tr "repo.issues.cancel"}}</button >
18+ 				<button  id="save-edit-title" class="ui primary button  in-edit" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button >
1919			</div>
2020		{{end}}
2121	</div>
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ export function initGlobalButtonClickOnEnter() {
6060  $ ( document ) . on ( 'keypress' ,  '.ui.button' ,  ( e )  =>  { 
6161    if  ( e . keyCode  ===  13  ||  e . keyCode  ===  32 )  {  // enter key or space bar 
6262      $ ( e . target ) . trigger ( 'click' ) ; 
63+       e . preventDefault ( ) ; 
6364    } 
6465  } ) ; 
6566} 
Original file line number Diff line number Diff line change @@ -605,6 +605,7 @@ export function initRepoIssueTitleEdit() {
605605      const  targetBranch  =  $ ( '#pull-target-branch' ) . data ( 'branch' ) ; 
606606      const  $branchTarget  =  $ ( '#branch_target' ) ; 
607607      if  ( targetBranch  ===  $branchTarget . text ( ) )  { 
608+         window . location . reload ( ) ; 
608609        return  false ; 
609610      } 
610611      $ . post ( update_url ,  { 
@@ -617,19 +618,22 @@ export function initRepoIssueTitleEdit() {
617618      } ) ; 
618619    } ; 
619620
620-     const  pullrequest_target_update_url  =  $ ( this ) . data ( ' target-update-url') ; 
621+     const  pullrequest_target_update_url  =  $ ( this ) . attr ( 'data- target-update-url') ; 
621622    if  ( $editInput . val ( ) . length  ===  0  ||  $editInput . val ( )  ===  $issueTitle . text ( ) )  { 
622623      $editInput . val ( $issueTitle . text ( ) ) ; 
623624      pullrequest_targetbranch_change ( pullrequest_target_update_url ) ; 
624625    }  else  { 
625-       $ . post ( $ ( this ) . data ( ' update-url') ,  { 
626+       $ . post ( $ ( this ) . attr ( 'data- update-url') ,  { 
626627        _csrf : csrfToken , 
627628        title : $editInput . val ( ) 
628629      } ,  ( data )  =>  { 
629630        $editInput . val ( data . title ) ; 
630631        $issueTitle . text ( data . title ) ; 
631-         pullrequest_targetbranch_change ( pullrequest_target_update_url ) ; 
632-         window . location . reload ( ) ; 
632+         if  ( pullrequest_target_update_url )  { 
633+           pullrequest_targetbranch_change ( pullrequest_target_update_url ) ;  // it will reload the window 
634+         }  else  { 
635+           window . location . reload ( ) ; 
636+         } 
633637      } ) ; 
634638    } 
635639    return  false ; 
Original file line number Diff line number Diff line change @@ -2316,6 +2316,13 @@ a.ui.label:hover {
23162316.ui.basic.secondary.buttons  .button :active ,
23172317.ui.basic.secondary.button :active  {
23182318  color : var (--color-secondary-dark-8 ) !important ;
2319+   border-color : var (--color-secondary-dark-1 ) !important ;
2320+ }
2321+ 
2322+ .ui.basic.secondary.button :focus ,
2323+ .ui.basic.secondary.buttons  .button :focus  {
2324+   color : var (--color-secondary-dark-8 ) !important ;
2325+   border-color : var (--color-secondary-dark-3 ) !important ;
23192326}
23202327
23212328.ui.tertiary.button  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments