mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add review panel substate toggling.
This commit is contained in:
parent
db5dc6ef15
commit
f640c17d4d
3 changed files with 61 additions and 2 deletions
|
@ -146,6 +146,22 @@ div.full-size(
|
|||
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'")
|
||||
include ./pdf
|
||||
|
|
|
@ -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 = () ->
|
||||
|
|
|
@ -369,6 +369,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;
|
||||
|
@ -440,11 +473,13 @@
|
|||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.rp-entry-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rp-nav {
|
||||
display: flex;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue