Skip to content

Commit

Permalink
Improve switching visibility of the topic edit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kzmi committed Sep 23, 2018
1 parent 3569777 commit ef2c1ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion public/css/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/js/index.js
Expand Up @@ -2431,7 +2431,7 @@ function initTopicbar() {

mgrBtn.click(function() {
viewDiv.hide();
editDiv.css('display', 'flex'); // show Semantic UI Grid
editDiv.css('display', ''); // show Semantic UI Grid
});

function getPrompts() {
Expand Down Expand Up @@ -2462,7 +2462,7 @@ function initTopicbar() {
for (var i=0; i < topicArray.length; i++) {
$('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
}
editDiv.hide();
editDiv.css('display', 'none'); // hide Semantic UI Grid
viewDiv.show();
}
}).fail(function(xhr){
Expand Down
1 change: 0 additions & 1 deletion public/less/_repository.less
Expand Up @@ -1805,7 +1805,6 @@ tbody.commit-list {

#topic_edit {
margin-top:5px;
display: none;
}

#repo-topic {
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/home.tmpl
Expand Up @@ -28,7 +28,7 @@
{{if .IsRepositoryAdmin}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
</div>
{{if .IsRepositoryAdmin}}
<div class="ui repo-topic-edit grid form segment error" id="topic_edit" >
<div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
<div class="fourteen wide column">
<div class="field">
<div class="ui fluid multiple search selection dropdown">
Expand Down

0 comments on commit ef2c1ed

Please sign in to comment.