Add bulk actions as in-editor widgets.

This commit is contained in:
Paulo Reis 2017-05-03 11:41:17 +01:00
parent 722d75f6ef
commit 0249a13012
2 changed files with 26 additions and 5 deletions

View file

@ -6,6 +6,22 @@
ng-click="toggleReviewPanel();"
ng-class="{ 'rp-track-changes-indicator-on-dark' : darkTheme }"
) !{translate("track_changes_is_on")}
a.rp-bulk-actions-btn(
href
ng-if="reviewPanel.nSelectedEntries > 0"
ng-click="bulkAccept();"
)
i.fa.fa-check
|  #{translate("accept_all")}
| ({{ reviewPanel.nSelectedEntries }})
a.rp-bulk-actions-btn(
href
ng-if="reviewPanel.nSelectedEntries > 0"
ng-click="bulkReject();"
)
i.fa.fa-times
|  #{translate("reject_all")}
| ({{ reviewPanel.nSelectedEntries }})
a.rp-add-comment-btn(
href
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null"
@ -13,6 +29,7 @@
)
i.fa.fa-comment
|  #{translate("add_comment")}
.review-panel-toolbar
resolved-comments-dropdown(
class="rp-flex-block"
@ -85,7 +102,7 @@
div(ng-if="entry.type === 'bulk-actions'")
bulk-actions-entry(
on-bulk-accept="bulkAccept();"
on-bulk-reject="bulkAccept();"
on-bulk-reject="bulkReject();"
n-entries="reviewPanel.nSelectedEntries"
)

View file

@ -463,19 +463,22 @@
.rp-add-comment-btn,
.rp-bulk-actions-btn {
.rp-button();
display: block;
display: inline-block;
padding: 5px 10px;
border-radius: 3px;
.rp-in-editor-widgets & {
display: block;
white-space: nowrap;
border-radius: 0;
border-bottom-left-radius: 3px;
&:last-child {
border-bottom-left-radius: 3px;
}
}
}
.rp-bulk-actions-btn {
display: inline-block;
border-radius: 0;
&:first-child {
border-top-left-radius: 3px;
@ -484,9 +487,10 @@
&:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
margin-left: 1px;
}
}
.rp-new-comment {
padding: 5px;
}