Merge branch 'ja-review-panel' of github.com:sharelatex/web-sharelatex into ja-review-panel

This commit is contained in:
James Allen 2016-11-16 13:26:33 +00:00
commit 711f282575
3 changed files with 67 additions and 8 deletions

View file

@ -92,12 +92,12 @@ div.full-size(
span(ng-switch-when="delete") Delete 
del.rp-content-highlight {{ entry.content }}
.rp-entry-actions
a.rp-entry-button(href, ng-click="acceptChange(entry_id)")
i.fa.fa-check
|  Accept
a.rp-entry-button(href, ng-click="rejectChange(entry_id)")
i.fa.fa-times
|  Reject
a.rp-entry-button(href, ng-click="acceptChange(entry_id)")
i.fa.fa-check
|  Accept
div(ng-if="entry.type == 'comment'")
.rp-comment(
ng-repeat="comment in entry.thread"
@ -139,12 +139,28 @@ div.full-size(
placeholder="Add your comment here"
)
.rp-entry-actions
a.rp-entry-button(href, ng-click="submitNewComment()")
i.fa.fa-comment
|  Comment
a.rp-entry-button(href, ng-click="cancelNewComment()")
i.fa.fa-times
|  Cancel
a.rp-entry-button(href, ng-click="submitNewComment()")
i.fa.fa-comment
|  Comment
.rp-nav
a.rp-nav-item(
href
ng-click="setSubView(SubViews.CUR_FILE);"
ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.CUR_FILE }"
)
i.fa.fa-file-text-o
span.rp-nav-label Current file
a.rp-nav-item(
href
ng-click="setSubView(SubViews.OVERVIEW);"
ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.OVERVIEW }"
)
i.fa.fa-list
span.rp-nav-label Overview
.ui-layout-east
div(ng-if="ui.pdfLayout == 'sideBySide'")

View file

@ -5,10 +5,15 @@ define [
"ide/review-panel/ChangesTracker"
], (App, EventEmitter, ColorManager, ChangesTracker) ->
App.controller "ReviewPanelController", ($scope, $element, ide, $timeout) ->
$scope.SubViews =
CUR_FILE : "cur_file"
OVERVIEW : "overview"
$scope.reviewPanel =
entries: {}
trackNewChanges: false
hasEntries: false
subView: $scope.SubViews.CUR_FILE
$scope.commentState =
adding: false
@ -141,6 +146,9 @@ define [
entry.replyContent = ""
$scope.$broadcast "review-panel:layout"
$scope.setSubView = (subView) ->
$scope.reviewPanel.subView = subView
# TODO: Eventually we need to get this from the server, and update it
# when we get an id we don't know. This'll do for client side testing
refreshUsers = () ->

View file

@ -376,6 +376,39 @@
}
}
.rp-nav {
display: none;
position: absolute;
bottom: 0;
width: 100%;
font-size: @rp-icon-large-size;
text-align: center;
background-color: @rp-bg-dim-blue;
border-top: solid 1px @rp-border-grey;
}
.rp-nav-item {
color: lighten(@rp-type-blue, 25%);
flex: 0 0 50%;
border-top: solid 3px transparent;
padding-bottom: 2px;
&:hover,
&:focus {
text-decoration: none;
color: @rp-type-blue;
}
&-active {
color: @rp-type-blue;
border-top: solid 3px @rp-highlight-blue;
}
}
.rp-nav-label {
display: block;
font-size: @rp-base-font-size;
}
.has-entries {
#editor {
right: @review-off-width;
@ -447,8 +480,6 @@
right: 5px;
}
}
}
.rp-entry-callout {
@ -461,4 +492,8 @@
.rp-entry-indicator {
display: none;
}
.rp-nav {
display: flex;
}
}