Make new add comment button styles as the default; removed old add comment button code.

This commit is contained in:
Paulo Reis 2017-04-04 10:40:53 +01:00
parent 567edbfb31
commit 15de552c2c
5 changed files with 7 additions and 23 deletions

View file

@ -20,7 +20,6 @@ div.full-size(
'rp-size-expanded': ui.reviewPanelOpen,\
'rp-layout-left': reviewPanel.layoutToLeft,\
'rp-loading-threads': reviewPanel.loadingThreads,\
'rp-new-comment-ui': reviewPanel.newAddCommentUI\
}"
)
.loading-panel(ng-show="!editor.sharejs_doc || editor.opening")

View file

@ -81,8 +81,6 @@
on-start-new="startNewComment();"
on-submit="submitNewComment(content);"
on-cancel="cancelNewComment();"
on-indicator-click="toggleReviewPanel();"
layout-to-left="reviewPanel.layoutToLeft"
)
.rp-entry-list(
@ -322,14 +320,6 @@ script(type='text/ng-template', id='resolvedCommentEntryTemplate')
script(type='text/ng-template', id='addCommentEntryTemplate')
div
.rp-entry-callout.rp-entry-callout-add-comment
.rp-entry-indicator.rp-entry-indicator-add-comment(
ng-if="!commentState.adding"
ng-click="startNewComment(); onIndicatorClick();"
tooltip=translate("add_comment")
tooltip-placement="{{ layoutToLeft ? 'left' : 'right' }}"
tooltip-append-to-body="true"
)
i.fa.fa-commenting
.rp-entry.rp-entry-add-comment(
ng-class="[ (state.isAdding ? 'rp-entry-adding-comment' : ''), (entry.focused ? 'rp-entry-focused' : '')]"
)

View file

@ -24,7 +24,6 @@ define [
loading: false
commentThreads: {}
resolvedThreadIds: {}
layoutToLeft: false
rendererData: {}
loadingThreads: false
@ -37,11 +36,9 @@ define [
localStorage("docs_collapsed_state:#{$scope.project_id}", valToStore)
$scope.$on "layout:pdf:linked", (event, state) ->
$scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed)
$scope.$broadcast "review-panel:layout"
$scope.$on "layout:pdf:resize", (event, state) ->
$scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed)
$scope.$broadcast "review-panel:layout", false
$scope.$on "expandable-text-area:resize", (event) ->
@ -51,9 +48,6 @@ define [
$scope.$on "review-panel:sizes", (e, sizes) ->
$scope.$broadcast "editor:set-scroll-size", sizes
$scope.$watch "ui.pdfLayout", (layout) ->
$scope.reviewPanel.layoutToLeft = (layout == "flat")
$scope.$watch "project.features.trackChangesVisible", (visible) ->
return if !visible?
if !visible

View file

@ -8,7 +8,6 @@ define [
onStartNew: "&"
onSubmit: "&"
onCancel: "&"
onIndicatorClick: "&"
layoutToLeft: "="
link: (scope, element, attrs) ->
scope.state =

View file

@ -96,10 +96,12 @@
flex-direction: column;
width: @review-panel-width;
overflow: visible;
border-left-width: 1px;
}
.rp-size-mini & {
width: @review-off-width;
z-index: 6;
border-left-width: 1px;
}
position: absolute;
@ -107,7 +109,7 @@
bottom: 0px;
right: 0px;
background-color: @rp-bg-blue;
border-left: solid 1px @rp-border-grey;
border-left: solid 0px @rp-border-grey;
font-size: @rp-base-font-size;
color: @rp-type-blue;
z-index: 6;
@ -181,6 +183,9 @@
.rp-size-mini & {
display: block;
}
.rp-size-mini &-add-comment {
display: none;
}
position: absolute;
left: 2px;
right: 2px;
@ -200,9 +205,6 @@
z-index: 1;
}
.rp-new-comment-ui &-add-comment {
display: none;
}
}
.rp-entry-wrapper {
@ -576,7 +578,7 @@
}
}
.rp-size-mini.rp-new-comment-ui &-add-comment {
.rp-size-mini &-add-comment {
display: none;
}
}