Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Pullrequest: Change to visibility default setting of review list
Browse files Browse the repository at this point in the history
1. When review thread is empty : hide
2. When review thread exist : shown
  • Loading branch information
insanehong committed Apr 7, 2015
1 parent e4acd2e commit e7df11d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 7 additions & 4 deletions app/views/git/viewChanges.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@
</div>
</div>

<div class="codediff-wrap mt10 @if(requestHeader.cookies.get("diffs-only") != null){diffs-only}">
<button type="button" class="ybtn ybtn-default btn-show-reviewcards">
<div class="codediff-wrap mt10 @if(pull.commentThreads.size == 0) {diffs-only}">
@if(pull.commentThreads.size > 0) {
<button type="button" class="ybtn ybtn-default btn-show-reviewcards">
<i class="yobicon-restore"></i>
</button>

}
<div id="changes" class="diffs-wrap">
<div id="commits" class="btn-group auto mb10">
<button class="btn dropdown-toggle auto" data-toggle="dropdown">
Expand Down Expand Up @@ -150,7 +151,7 @@
}
@** // BlockComment **@
</div>

@if(pull.commentThreads.size > 0) {
<div class="review-wrap">
<div class="review-container">
<button type="button" class="ybtn ybtn-default btn-hide-reviewcards">
Expand All @@ -171,8 +172,10 @@
@partial_reviewlist(pull.getCommentThreadsByState(CommentThread.ThreadState.CLOSED))
</div>
</div>

</div>
</div>
}
</div>
</div>
</div>
Expand Down
6 changes: 0 additions & 6 deletions public/javascripts/service/yobi.code.Diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@
htElement.waBtnToggleReviewWrap.on("click", function(){
htElement.welContainer.toggleClass("diffs-only");

if (htElement.welContainer.hasClass("diffs-only")) {
$.cookie("diffs-only", true, {"expire": 365});
} else {
$.removeCookie("diffs-only");
}

var positionTop = 10;
if(htElement.welReviewContainer.offset().top - positionTop < $(document).scrollTop()){
htElement.welReviewContainer
Expand Down

0 comments on commit e7df11d

Please sign in to comment.