mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	auto-redirect when finish filter branch
This commit is contained in:
		@@ -97,10 +97,9 @@ function initRepository() {
 | 
				
			|||||||
    // Pull request
 | 
					    // Pull request
 | 
				
			||||||
    if ($('.repository.compare.pull').length > 0) {
 | 
					    if ($('.repository.compare.pull').length > 0) {
 | 
				
			||||||
        $('.choose.branch .dropdown').dropdown({
 | 
					        $('.choose.branch .dropdown').dropdown({
 | 
				
			||||||
            action: 'hide',
 | 
					 | 
				
			||||||
            fullTextSearch: true,
 | 
					            fullTextSearch: true,
 | 
				
			||||||
            onNoResults: function () {
 | 
					            onChange: function (text, value, $choice) {
 | 
				
			||||||
                $('.choose.branch .dropdown .active').addClass('selected');
 | 
					                window.location.href = $choice.data('url');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@
 | 
				
			|||||||
	          </div>
 | 
						          </div>
 | 
				
			||||||
	          <div class="items">
 | 
						          <div class="items">
 | 
				
			||||||
		        	{{range .Branches}}
 | 
							        	{{range .Branches}}
 | 
				
			||||||
		          <a class="{{if eq $.BaseBranch .}}active selected{{end}} item" href="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</a>
 | 
							          <div class="{{if eq $.BaseBranch .}}active selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
 | 
				
			||||||
		        	{{end}}
 | 
							        	{{end}}
 | 
				
			||||||
	          </div>
 | 
						          </div>
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
@@ -39,7 +39,7 @@
 | 
				
			|||||||
	          </div>
 | 
						          </div>
 | 
				
			||||||
	          <div class="items">
 | 
						          <div class="items">
 | 
				
			||||||
		        	{{range .HeadBranches}}
 | 
							        	{{range .HeadBranches}}
 | 
				
			||||||
		          <a class="{{if eq $.HeadBranch .}}active selected{{end}} item" href="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</a>
 | 
							          <div class="{{if eq $.HeadBranch .}}active selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
 | 
				
			||||||
		        	{{end}}
 | 
							        	{{end}}
 | 
				
			||||||
	        	</div>
 | 
						        	</div>
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user