Skip to content

Commit 6780661

Browse files
kzmilafriks
authored andcommitted
Fix layout of the topics editing form (#4971)
* Fix layout of the topic edit. - made right-hand column wider so that it has enough space for "Done" button. - fixed issue that jQuery's .show() breaks functionality of the Semantic UI Grid. * 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 e6d54d5 commit 6780661

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
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
@@ -2425,7 +2425,7 @@ function initTopicbar() {
24252425

24262426
mgrBtn.click(function() {
24272427
viewDiv.hide();
2428-
editDiv.show();
2428+
editDiv.css('display', ''); // show Semantic UI Grid
24292429
});
24302430

24312431
function getPrompts() {
@@ -2456,7 +2456,7 @@ function initTopicbar() {
24562456
for (var i=0; i < topicArray.length; i++) {
24572457
$('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
24582458
}
2459-
editDiv.hide();
2459+
editDiv.css('display', 'none'); // hide Semantic UI Grid
24602460
viewDiv.show();
24612461
}
24622462
}).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

+2-2
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">
@@ -40,7 +40,7 @@
4040
</div>
4141
</div>
4242
</div>
43-
<div class="one wide column">
43+
<div class="two wide column">
4444
<a class="ui compact button primary" href="javascript:;" id="save_topic"
4545
data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
4646
</div>

0 commit comments

Comments
 (0)