Skip to content

Commit ef2c1ed

Browse files
committed
Improve switching visibility of the topic edit
Changes to support old browsers that doesn't support 'flex' keyword. - Removed style "display: none" from index.css so that the grid can be displayed without specifying new "display" style. - Added style "display:none" to the grid element in HTML template as the initial style. - In index.js, visibility of the grid element is changed by set "display:none" style to the element or removing it from the element.
1 parent 3569777 commit ef2c1ed

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

public/css/index.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2431,7 +2431,7 @@ function initTopicbar() {
24312431

24322432
mgrBtn.click(function() {
24332433
viewDiv.hide();
2434-
editDiv.css('display', 'flex'); // show Semantic UI Grid
2434+
editDiv.css('display', ''); // show Semantic UI Grid
24352435
});
24362436

24372437
function getPrompts() {
@@ -2462,7 +2462,7 @@ function initTopicbar() {
24622462
for (var i=0; i < topicArray.length; i++) {
24632463
$('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
24642464
}
2465-
editDiv.hide();
2465+
editDiv.css('display', 'none'); // hide Semantic UI Grid
24662466
viewDiv.show();
24672467
}
24682468
}).fail(function(xhr){

public/less/_repository.less

-1
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,6 @@ tbody.commit-list {
18051805

18061806
#topic_edit {
18071807
margin-top:5px;
1808-
display: none;
18091808
}
18101809

18111810
#repo-topic {

templates/repo/home.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{{if .IsRepositoryAdmin}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
2929
</div>
3030
{{if .IsRepositoryAdmin}}
31-
<div class="ui repo-topic-edit grid form segment error" id="topic_edit" >
31+
<div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
3232
<div class="fourteen wide column">
3333
<div class="field">
3434
<div class="ui fluid multiple search selection dropdown">

0 commit comments

Comments
 (0)