mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	UI: Fixes for repo topic editor (#5971)
- Properly hides the edit interface when saving a empty topic list - Align the Done button with the edit box
This commit is contained in:
		@@ -2635,16 +2635,15 @@ function initTopicbar() {
 | 
			
		||||
        }, function(data, textStatus, xhr){
 | 
			
		||||
            if (xhr.responseJSON.status === 'ok') {
 | 
			
		||||
                viewDiv.children(".topic").remove();
 | 
			
		||||
                if (topics.length === 0) {
 | 
			
		||||
                    return
 | 
			
		||||
                }
 | 
			
		||||
                if (topics.length) {
 | 
			
		||||
                    var topicArray = topics.split(",");
 | 
			
		||||
 | 
			
		||||
                    var last = viewDiv.children("a").last();
 | 
			
		||||
                    for (var i=0; i < topicArray.length; i++) {
 | 
			
		||||
                        $('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
 | 
			
		||||
                    }
 | 
			
		||||
                editDiv.css('display', 'none'); // hide Semantic UI Grid
 | 
			
		||||
                }
 | 
			
		||||
                editDiv.css('display', 'none');
 | 
			
		||||
                viewDiv.show();
 | 
			
		||||
            }
 | 
			
		||||
        }).fail(function(xhr){
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,7 @@
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="two wide column">
 | 
			
		||||
				<a class="ui compact button primary" href="javascript:;" id="save_topic"
 | 
			
		||||
				<a class="ui button primary" href="javascript:;" id="save_topic"
 | 
			
		||||
				data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user